25.01.2016, 15:42
OnPlayerDeath
OnPlayerSpawn
Код:
public OnPlayerDeath(playerid, killerid, reason) { SetPlayerVirtualWorld(playerid, 0); if(pLogado[playerid] == true) SalvarDados(playerid); return 1; }
Код:
public OnPlayerSpawn(playerid) { Erro[playerid] = 0; TogglePlayerSpectating(playerid, false); TogglePlayerControllable(playerid, true); SetCameraBehindPlayer(playerid); if(SpawnPos[playerid] == true) SetPlayerPos(playerid, PlayerInfo[playerid][pPosX], PlayerInfo[playerid][pPosY], PlayerInfo[playerid][pPosZ]), SetPlayerFacingAngle(playerid, PlayerInfo[playerid][pPosA]), SpawnPos[playerid] = false, SetPlayerCameraPos(playerid, PlayerInfo[playerid][pCamX], PlayerInfo[playerid][pCamY], PlayerInfo[playerid][pCamZ]), SetPlayerInterior(playerid, PlayerInfo[playerid][pInterior]); format(File, 56, "pAdmin/Agendados/%s.ini", pNomeOriginal[playerid]); if(DOF2_FileExists(File)) { format(Str, 256, "INFO SERVE: O(s) Administrador(es) %s te agendou(aram) a cumprir %i minuto(s) de pena. Motivo(s): %s", DOF2_GetString(File, "Administrador"), DOF2_GetInt(File, "Tempo"), DOF2_GetString(File, "Motivo")); printf("%s", Str); SendClientMessage(playerid, CorErro, Str); DOF2_RemoveFile(File); } if(PlayerInfo[playerid][pCongelado] == true) TogglePlayerControllable(playerid, false); return 1; }