Relog command - 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: Relog command (
/showthread.php?tid=381149)
Relog command -
Snir_sofer - 28.09.2012
Nothing.....
Re: Relog command -
SuperViper - 28.09.2012
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;
}
Re: Relog command -
RayDcosta - 15.10.2013
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?
Re: Relog command -
Konstantinos - 15.10.2013
It doesn't work anymore.
Original:
https://sampforum.blast.hk/showthread.php?tid=178575
Read the last posts.
And it wasn't necessary to bump 1 year old thread, but you could search first or create your own thread about asking why it does not work.