30.11.2013, 20:47
Quote:
It's not working, because I'm guessing this is how you created the variables:
pawn Код:
Edit: Try using this: pawn Код:
|
Код:
public OnPlayerEnterDynamicZone(playerid, zoneid) { if(IsPlayerInDynamicZone(playerid, sfhospzone) && PlayerInfo[playerid][pDead] == 0 && JustDied[playerid] == 0) { PlayerInfo[playerid][pSF] = 1; return 1; } if(IsPlayerInDynamicZone(playerid, lsashospzone) && PlayerInfo[playerid][pDead] == 0 && JustDied[playerid] == 0) { PlayerInfo[playerid][pLSAS] = 1; return 1; } if(IsPlayerInDynamicZone(playerid, lscghospzone) && PlayerInfo[playerid][pDead] == 0 && JustDied[playerid] == 0) { PlayerInfo[playerid][pLSCG] = 1; return 1; } return 1; }
Код:
forward DeadCountdown(playerid); public DeadCountdown(playerid) { if(DeadTimer[playerid] == 0 && PlayerInfo[playerid][pSF] == 0 && PlayerInfo[playerid][pLSAS] == 0 && PlayerInfo[playerid][pLSCG] == 0) { KillTimer(deadt[playerid]); PlayerInfo[playerid][pDead] = 0; SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]); SetPlayerPos(playerid, -2557.6716,661.3848,14.4531); SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, 0); SetCameraBehindPlayer(playerid); ClearChat(playerid); SendClientMessage(playerid, COLOR_SPRINGGREEN, "The Hospital said you made a full recovery! Be more careful next time!"); SendClientMessage(playerid, COLOR_SPRINGGREEN, "You have spawned at San Fierro Medical Centre"); TogglePlayerControllable(playerid, 1); return 1; } if(DeadTimer[playerid] == 0 && PlayerInfo[playerid][pSF] == 1) { KillTimer(deadt[playerid]); PlayerInfo[playerid][pDead] = 0; SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]); SetPlayerPos(playerid, -2557.6716,661.3848,14.4531); SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, 0); SetCameraBehindPlayer(playerid); ClearChat(playerid); SendClientMessage(playerid, COLOR_SPRINGGREEN, "The Hospital said you made a full recovery! Be more careful next time!"); SendClientMessage(playerid, COLOR_SPRINGGREEN, "You have spawned at San Fierro Medical Centre"); TogglePlayerControllable(playerid, 1); return 1; } if(DeadTimer[playerid] == 0 && PlayerInfo[playerid][pLSAS] == 1) { KillTimer(deadt[playerid]); PlayerInfo[playerid][pDead] = 0; SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]); SetPlayerPos(playerid, 1178.5688,-1323.7841,14.1265); SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, 0); SetCameraBehindPlayer(playerid); ClearChat(playerid); SendClientMessage(playerid, COLOR_SPRINGGREEN, "The Hospital said you made a full recovery! Be more careful next time!"); SendClientMessage(playerid, COLOR_SPRINGGREEN, "You have spawned at Los Santos/All Saints Hospital"); TogglePlayerControllable(playerid, 1); return 1; } if(DeadTimer[playerid] == 0 && PlayerInfo[playerid][pLSCG] == 1) { KillTimer(deadt[playerid]); PlayerInfo[playerid][pDead] = 0; SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]); SetPlayerPos(playerid, 2034.2024,-1405.9485,17.2210); SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, 0); SetCameraBehindPlayer(playerid); ClearChat(playerid); SendClientMessage(playerid, COLOR_SPRINGGREEN, "The Hospital said you made a full recovery! Be more careful next time!"); SendClientMessage(playerid, COLOR_SPRINGGREEN, "You have spawned at Los Santos/County General Hospital"); TogglePlayerControllable(playerid, 1); return 1; } DeadTimer[playerid] --; new string[128]; format(string, sizeof(string), "~g~Seconds Left: ~w~ %d", DeadTimer[playerid]); GameTextForPlayer(playerid, string, 3000, 4); return 1; }