03.05.2014, 04:07
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(PlayerUsingLoopingAnim[playerid])
{
PlayerUsingLoopingAnim[playerid] = 0;
}
PlayerInfo[playerid][pDeath] = 1;
return 1;
}
pawn Код:
public OnPlayerSpawn(playerid)
{
if(PlayerInfo[playerid][pDeath] == 1)
{
new time = (1 + random(4)), string[200];
new nurse = random(sizeof(NurseNames));
new bill = time*120;
SetPlayerCameraPos(playerid, -2660.750244, 580.064697, 29.793859);
SetPlayerCameraLookAt(playerid, -2660.882568, 584.698120, 27.919254);
SetTimerEx("OnDeath", 60000, false, "d", playerid);
SetVirtualWorld(playerid, 50000);
SendClientMessage(playerid, -1, ""Pink"Hospital"White": San Fierro");
format(string, sizeof(string), ""Pink"Nurse"White": %s", NurseNames[nurse]);
SendClientMessage(playerid, -1, string);
format(string, sizeof(string), ""Pink"Bill"White": $%d", bill);
SendClientMessage(playerid, -1, string);
format(string, sizeof(string), ""Pink"Time"White": %d minute(s)", time);
SendClientMessage(playerid, -1, string);
PlayerInfo[playerid][pDeath] = time;
GiveCash(playerid, -bill);
return 1;
}
return 1;
}