19.06.2011, 16:38
Код:
public SetPlayerSpawn(playerid) { if(IsPlayerConnected(playerid)) { for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { ResetBeacons(i); } } SetPlayerWorldBounds(playerid, 20000.0000, -20000.0000, 20000.0000, -20000.0000); SetTimerEx("ResetSpawnTimer", 8000, 0, "d", playerid); if(pStats[playerid][pJailed] > 0) { if(pStats[playerid][pJailed] == 1) { SetPlayerVirtualWorld(playerid,2); SetPlayerInterior(playerid, 6); SetPlayerPos(playerid,264.5743,77.5118,1001.0391); SendClientMessage(playerid, COLOR_WHITE, "Sinu vangistus ei ole veel lдbi!"); return 1; } else if(pStats[playerid][pJailed] == 3) { SetPlayerInterior(playerid, 0); SetPlayerPos(playerid, -10.9203,2328.7659,24.3034); SendClientMessage(playerid, COLOR_WHITE, "Sinu vangistus ei ole veel lдbi!"); return 1; } } if(pStats[playerid][pCrashed] == 1) { if(pStats[playerid][pHospitalized] != 1) { SetPlayerPos(playerid,pStats[playerid][pCrashX],pStats[playerid][pCrashY],pStats[playerid][pCrashZ]); SetPlayerInterior(playerid,pStats[playerid][pCrashInt]); SetPlayerVirtualWorld(playerid,pStats[playerid][pCrashW]); pStats[playerid][pCrashed] = 0; } } else { SetPlayerPos(playerid,pStats[playerid][pCrashX], pStats[playerid][pCrashY], pStats[playerid][pCrashZ]); SetPlayerVirtualWorld(playerid, pStats[playerid][pCrashW]); SetPlayerInterior(playerid, pStats[playerid][pCrashInt]); SetPlayerHealth(playerid, 100); } if(AdminDuty[playerid]) { SetPlayerHealth(playerid,99999); SetPlayerArmour(playerid,99999); } return 1; } return 1; }