rendered paste body/*-------------------------------------------------------------
00000 000 0 0 000 00000 0000 000
0 0 0 0 0 0 0 0 0 0
00000 0 0 00000 0 0000 0000 0
0 0 0 0 0 0 0 0 0
0 000 0 0 000 0 0000 000 By: Splitx
----------------------------------------------------------------
This Is A player On Hospital [FS] By Splitx.
Thx To: Sandra For Help With CountDown.
----------------------------------------------------------------*/
//------------------[INCLUDES]---------------------
#include <a_samp>
//------------------[DEFINES]----------------------
#define FILTERSCRIPT
#if defined FILTERSCRIPT
#define CG 0xB8860BAA
//----------------------[NEW]-----------------------
new Count[MAX_PLAYERS];
new CountdownTimer[MAX_PLAYERS];
//-------------------[FORWARDS]---------------------
forward HospitalCountdown(playerid);
//----------------[OnFilterScriptInit]---------------
public OnFilterScriptInit()
{
//--------------------------------------------------------
print("-----------[Poh [FS] By: Splitx]-------------");
return 1;
//--------------------------------------------------------
}
//----------------[OnPlayerDeath]--------------
public OnPlayerDeath(playerid, killerid, reason)
{
TogglePlayerControllable(playerid, 0);
SetPlayerPos(playerid,1183.4017,-1297.4088,14.2143);
SetPlayerCameraPos(playerid,1197.5721,-1325.6716,26.9214);
SetPlayerCameraLookAt(playerid, 1177.6808,-1324.3663,14.0827);
CountdownTimer[playerid] = SetTimerEx("HospitalCountdown", 1000, 1, "i", playerid);
Count[playerid] = 60;
return 1;
}
//---------------[ThePublicTimers]-----------------------
public HospitalCountdown(playerid)
{
new string[64];
format(string, sizeof(string), "~g~You Will Be ~n~~y~Healed And Spawn In ~n~~b~%d Sec...", Count[playerid]);
GameTextForPlayer(playerid, string, 1500, 3);
if(Count[playerid] == 0)
{
KillTimer(CountdownTimer[playerid]);
SpawnPlayer(playerid);
SetPlayerHealth(playerid, 100.00);
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid, 1);
SendClientMessage(playerid, CG,"You Are Healed And Spawned");
}
Count[playerid]--;
}
#endif
/*_______________________________________________|
|----0000 00000-0-----0-00000000000-0-----0------|
|----0 ---0---0-0-----0------0-------0---0-------|
|----0000-00000-0-----0------0--------0-0--------|
|-------0-0-----0-----0------0---------0---------|
|----0000-0-----00000-0------0--------0-0--------|
|----PlayerOnHospital(PHO)-----------0---0-------|
|----Made By: Splitx----------------0-----0------|
|________________________________________________|*/