Quote:
Originally Posted by SuperViper
pawn Код:
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, "/relog", 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; }
or if you use ZCMD....
pawn Код:
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; }
COMMAND:relog(playerid, params[]) { 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; }
|
Hi. when i try to use it, it says Reconecting to the server..
and then it says "You are banned from the server",
though I'm actually not banned. When i quit and start again i can play again.
but i wanted a code that doesnt make you quit.
is that possible?