Help with time OnPlayerDeath
#8

pawn Код:
public OnPlayerDeath(playerid)
{
Hspawn[playerid] = 1;

return 0;
}

public OnPlayerSpawn(playerid)
{
if (Hspawn[playerid] == 1)
{
if(GetPlayerMoney(playerid) > 100)
{
Hspawn[playerid] = 0;
SetPlayerHealth(playerid, 50.5);
SetPlayerCameraPos(playerid, 1190.1182,-1323.4784,13.566);
SetPlayerCameraLookAt(playerid, 1178.7699,-1323.2892,14.1365);
TogglePlayerControllable(playerid, true);
SetTimerEx("SpawnPlayerToHospital", 20000, 0, "%d", playerid);
SendClientMessage(playerid,0xDD000096,"You spawned at the Los Santos hospital.");
SendClientMessage(playerid,0xFFFFFF96,"|-----------------------------------|");
SendClientMessage(playerid,0xDD000096,"Your medical bill cost: 100$");
GivePlayerMoney(playerid, -100);
return 1;
}
}
return 1;
}

forward SpawnPlayerToHospital(playerid);
public SpawnPlayerToHospital(playerid)
{
TogglePlayerControllable(playerid, false);
SetPlayerPos(playerid,1176.6060,-1323.7875,14.0296);
SetCameraBehindPlayer(playerid);
}
Reply


Messages In This Thread
Help with time OnPlayerDeath - by abrantley - 18.03.2011, 06:44
Re: Help with time OnPlayerDeath - by xDeadlyBoy - 18.03.2011, 06:54
Re: Help with time OnPlayerDeath - by abrantley - 18.03.2011, 07:18
Re: Help with time OnPlayerDeath - by xDeadlyBoy - 18.03.2011, 07:30
Re: Help with time OnPlayerDeath - by abrantley - 18.03.2011, 07:41
Re: Help with time OnPlayerDeath - by Haydz - 18.03.2011, 07:44
Re: Help with time OnPlayerDeath - by abrantley - 18.03.2011, 07:50
Re: Help with time OnPlayerDeath - by xDeadlyBoy - 18.03.2011, 08:12
Re: Help with time OnPlayerDeath - by abrantley - 18.03.2011, 08:33

Forum Jump:


Users browsing this thread: 1 Guest(s)