IP banned after relog - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: IP banned after relog (
/showthread.php?tid=323210)
IP banned after relog -
VIPAwesome - 05.03.2012
Hello,
I made a cmd /relog with ZCMD but when someone do /relog that player's ip got banned
My script:
pawn Код:
CMD:relog(playerid, params[]) {
new
i = 0,
cmd[32] = "banip "
;
while(++i != 10) {
SendClientMessage(playerid, -1, " ");
}
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Reconnecting...");
GetPlayerIp(playerid, cmd[6], (sizeof cmd - 6));
SetPVarString(playerid, "reconnect", cmd[6]);
SendRconCommand(cmd);
return true;
}
Re: IP banned after relog -
Snipa - 05.03.2012
You need to unbanip on OnPlayerDisconnect
Re: IP banned after relog -
VIPAwesome - 05.03.2012
How Can you please script it
Re: IP banned after relog -
VIPAwesome - 05.03.2012
Please Help Me
Re: IP banned after relog -
iTorran - 05.03.2012
pawn Код:
new IP[MAX_PLAYERS][16], reconnect[MAX_PLAYERS];
CMD:reconnect(playerid, params[])
{
reconnect[playerid] = 1;
GetPlayerIp(playerid, IP[playerid], 16);
new cmd[30];
format(cmd, sizeof cmd, "banip %s", IP[playerid]);
SendRconCommand(cmd);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
if(reconnect[playerid] == 1)
{
new cmd[30];
format(cmd, sizeof cmd, "unbanip %s", IP[playerid]);
SendRconCommand(cmd);
reconnect[playerid] = 0;
}
return 1;
}
Not tested
Re: IP banned after relog -
VIPAwesome - 05.03.2012
Thnx i'll test it