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=433035)
relog command -
Stanford - 25.04.2013
Ey, is it possible to create a command that if an adminstrator uses it on a certain player it makes him disconnect from the server and connect without quiting from the game? (heading to client and re-connect from there)
Re: relog command -
MP2 - 25.04.2013
This used to be possible, but a bug introduced in 0.3x/0.3e made it not work properly anymore.
Re: relog command -
Avi Raj - 25.04.2013
Try :-
Not sure if it will work or not.
pawn Код:
CMD:relog(playerid, params[])
{
new targetid;
SetPlayerSkin(targetid, 301);
return 1;
}
Re: relog command -
[MM]Eminem - 25.04.2013
Quote:
Originally Posted by Avi Raj
Try :-
Not sure if it will work or not.
pawn Код:
CMD:relog(playerid, params[]) { SetPlayerSkin(playerid, 301); return 1; }
|
He doesn't wants a playing crashing command, he wants a relog command.
Also, it will crash the player who uses the command, not the playerid/name specified lol.
Re: relog command -
Avi Raj - 25.04.2013
Oh yes.
Hmm i dont think their's any command to relog a player?
EDIT:Added target id.
Re: relog command -
Stanford - 25.04.2013
I'll test and I'll inform you, thanks for the help.
Re: relog command -
MP2 - 25.04.2013
That'll CRASH a player, NOT make them reconnect.
Re: relog command -
Stanford - 25.04.2013
Guys I believe that the reconnecting feature is now exist since I saw a server that owns that feature, can anyone help me finding it!?!
Re: relog command -
MP2 - 25.04.2013
It does exist - I said that. It just doesn't work 100% correctly due to a newly introduced bug.
A simple ****** search could have found you this answer in 5 seconds, instead of 27 minutes.
http://lmgtfy.com/?q=samp+force+reconnect
Re: relog command -
Avi Raj - 25.04.2013
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;
}
By SuperViper :
Link.