Help with time OnPlayerDeath
#2

PHP код:
public OnPlayerSpawn(playerid)
{
if (
Hspawn[playerid] == 1)
{
if(
GetPlayerMoney(playerid) > 100)
{
Hspawn[playerid] = 0;
SetPlayerHealth(playerid50.5);
SetPlayerCameraPos(playeridxyz);
SetPlayerCameraLookAt(playeridxyz);
TogglePlayerControllable(playeridtrue);
SetTimerEx("SpawnPlayerToHospital"200000"%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(playeridfalse);
SetPlayerPos(playerid,1176.6060,-1323.7875,14.0296);
SetCameraBehindPlayer(playerid);

remember to change the xyz of the camera.
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)