15.06.2011, 20:20
PHP код:
forward SairHosp(playerid);
public OnPlayerConnect(playerid)
{
SetPVarInt(playerid, "Hospital", 1);
return 1;
}
public OnPlayerSpawn(playerid)
{
if(GetPVarInt(playerid, "Hospital") == 1)
{
SetPlayerPos(playerid, X, Y, Z);
SetTimerEx("SairHosp", 60000, false, "i", playerid);
return 1;
}
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
SetPVarInt(playerid, "Hospital", 1);
return 1;
}
public SairHosp(playerid)
{
GivePlayerMoney(playerid, -500);
SendClientMessage(playerid, -1, "Vocк curado pelos mйdicos e isto te custou 500 $.");
SetPlayerPos(playerid, X, Y, Z);
SetPVarInt(playerid, "Hospital", 0);
return 1;
}