07.12.2016, 13:19
Queria o comando tipo /reconectar ai o player voltase pro comeзo de quando ele logou no servidor a tela de login...
new bool: isRelogging[MAX_PLAYERS], relogPlayerIP[MAX_PLAYERS][17];
public OnPlayerDisconnect(playerid)
{
if(isRelogging[playerid])
{
new string[30];
isRelogging[playerid] = false;
format(string, sizeof(string), "unbanip %s", relogPlayerIP[playerid]);
SendRconCommand(string);
}
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/relogar", true))
{
new string[30];
isRelogging[playerid] = true;
GetPlayerIp(playerid, relogPlayerIP[playerid], 17);
format(string, sizeof(string), "banip %s", relogPlayerIP[playerid]);
SendRconCommand(string);
SendClientMessage(playerid, -1, "Reconnecting...");
return 1;
}
return 0;
}
CMD:desbugar(playerid, params[]) {
new idplayer, aname[MAX_PLAYER_NAME], string[124];
if(sscanf(params, "d", idplayer)) return SendClientMessage(playerid, 0xFF0000AA, "[ERRO] use: /desbugar [playerid]");
if(!IsPlayerConnected(idplayer)) return SendClientMessage(playerid, 0xFF0000AA, "[ERRO] este player nгo estб conectado!");
SpawnPlayer(idplayer);
GetPlayerName(idplayer, aname, sizeof(aname));
format(string, sizeof(string), "O(A) Player %s foi desbugado(a)!", aname);
SendClientMessageToAll(0x0080FFAA, string);
return 1;
}