new string[128], name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, MAX_PLAYER_NAME); switch(reason) { case 0: format(string, sizeof(string)," [SERVIDOR] \"%s\" (%d) perdeu a conexгo.", name, playerid); case 1: format(string, sizeof(string)," [SERVIDOR] \"%s\" (%d) saiu do servidor.", name, playerid); // case 2: format(string, sizeof(string)," [SERVIDOR] \"%s\" (%d) foi expulso do servidor.", name,playerid); } SendClientMessageToAll(COLOR_CONNECTION, string); SendDeathMessage(INVALID_PLAYER_ID, playerid, 201);
if(!strcmp("Toba", pNome(playerid), true)) { return 0; } Delete3DTextLabel(Recompensa[playerid]); KillTimer(SkinClass[playerid][SpawnTimer] ); PlayerProps[playerid] = 0; EarningsForPlayer[playerid] = 0; new string[128], name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, MAX_PLAYER_NAME); SavePlayer(playerid);
tem isso:
Код:
if(!strcmp("Toba", pNome(playerid), true)) { return 0; } Delete3DTextLabel(Recompensa[playerid]); KillTimer(SkinClass[playerid][SpawnTimer] ); PlayerProps[playerid] = 0; EarningsForPlayer[playerid] = 0; new string[128], name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, MAX_PLAYER_NAME); SavePlayer(playerid); |
public OnPlayerDisconnect(playerid,reason)