Relog command?! -
SiNaGaMeR - 06.09.2018
I just want a relog command that this command call too fast and when you do /relog the server connect again in 0.5 seconds
( it possible because I saw this /relog command in one server that like this )
(( sorry for my bad english ))
THESE ARE MY EDITIONS:
PHP код:
if(!strcmp(cmd, "/relog", true)) {
new string[30];
isRelogging[playerid] = true;
GetPlayerIp(playerid, relogPlayerIP[playerid], 17);
format(string, sizeof(string), "banip %s", relogPlayerIP[playerid]);
SetTimerEx("reloging",11000,0,"i",playerid);
SendRconCommand(string);
SetPlayerInterior(playerid, 0);
SetPlayerCameraPos(playerid, 1020.8905, -1782.4042, 90.0785);
SetPlayerCameraLookAt(playerid, 556.1578, -1441.9774, 80.5746);
InterpolateCameraLookAt(playerid, 1020.8905, -1782.4042, 90.0785, 556.1578, -1441.9774, 80.5746, 20000, CAMERA_MOVE);
InterpolateCameraPos(playerid, 1020.8905, -1782.4042, 90.0785, 556.1578, -1441.9774, 80.5746, 25000, CAMERA_MOVE);
GetPlayerTag(playerid);
SendMessage(playerid, COLOR_NITROEX, "Your relog request is proccesing ...");
return 1;
}
PHP код:
new bool: isRelogging[MAX_PLAYERS], relogPlayerIP[MAX_PLAYERS][17];
PHP код:
if(isRelogging[playerid] == true)
{
new string[30];
isRelogging[playerid] = false;
format(string, sizeof(string), "unbanip %s", relogPlayerIP[playerid]);
SCM(playerid, COLOR_RED, string);
SendRconCommand(string);
}
PHP код:
forward reloging(playerid);
public reloging(playerid) {
new string[30];
isRelogging[playerid] = false;
format(string, sizeof(string), "unbanip %s", relogPlayerIP[playerid]);
SendRconCommand(string);
print(string);
}
PAY ATTENTION!
if I change this line:
PHP код:
SetTimerEx("reloging",11000,0,"i",playerid);
to:
PHP код:
SetTimerEx("reloging",500,0,"i",playerid);
that doesn't work and just like that you playing normal and you don't anything.
Re: Relog command?! -
solstice_ - 06.09.2018
You mean you want to stop the server for 0.5 seconds and then start it again?
Re: Relog command?! -
SiNaGaMeR - 06.09.2018
Quote:
Originally Posted by willbedie
You mean you want to stop the server for 0.5 seconds and then start it again?
|
no I mean the player who used /relog disconnect from server and fast connect again
Re: Relog command?! -
solstice_ - 06.09.2018
Quote:
Originally Posted by SiNaGaMeR
no I mean the player who used /relog disconnect from server and fast connect again
|
I'm not sure if that's possible but you can clear the chat once he does /relog and use
and show him the login dialog again, if that's what you mean.. Because you can't just kick the player and then let the script automatically relog him, because as soon as he gets kicked he has to quit the game and join once again.
Re: Relog command?! -
SiNaGaMeR - 06.09.2018
Quote:
Originally Posted by willbedie
I'm not sure if that's possible but you can clear the chat once he does /relog and use and show him the login dialog again, if that's what you mean.. Because you can't just kick the player and then let the script automatically relog him, because as soon as he gets kicked he has to quit the game and join once again.
|
you can test this command on this IP:
AGSA.ArSaCiA.iR:7777
Re: Relog command?! -
solstice_ - 06.09.2018
Quote:
Originally Posted by SiNaGaMeR
you can test this command on this IP:
AGSA.ArSaCiA.iR:7777
|
Imma test it real quick and update my post.
EDIT: That ip doesn't even work, PM me the current IP the server is using, don't post it here because there's something called server advertising where you can't advertise your (or) another server on any forum except Server Advertising.
Re: Relog command?! -
solstice_ - 06.09.2018
Have you tried changing 11000 to anything else? Try changing it to 600, 650
Re: Relog command?! -
SiNaGaMeR - 06.09.2018
Just like that:
http://www.mediafire.com/file/58hkjq...ously.wmv/file
Re: Relog command?! -
SiNaGaMeR - 06.09.2018
Quote:
Originally Posted by willbedie
Have you tried changing 11000 to anything else? Try changing it to 600, 650
|
Yes, I tried but when I use 11000- this will not work I mean for EX you do /relog this command doesn't work just like you don't do anything
Re: Relog command?! -
solstice_ - 06.09.2018
Yeah i see, that's not kicking the player and it does not automatically relog him, i feel like it doesn't even load any data from the database or whatever the gamemode uses. Does it happen the same with your code? Does it disconnect the player like that and then relogs him again?