Relog command?!
#1

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(playeridrelogPlayerIP[playerid], 17);
        
format(stringsizeof(string), "banip %s"relogPlayerIP[playerid]);
        
SetTimerEx("reloging",11000,0,"i",playerid);
        
SendRconCommand(string);
        
SetPlayerInterior(playerid0);
        
SetPlayerCameraPos(playerid1020.8905, -1782.404290.0785);
        
SetPlayerCameraLookAt(playerid556.1578, -1441.977480.5746);
        
InterpolateCameraLookAt(playerid1020.8905, -1782.404290.0785556.1578, -1441.977480.574620000CAMERA_MOVE);
        
InterpolateCameraPos(playerid1020.8905, -1782.404290.0785556.1578, -1441.977480.574625000CAMERA_MOVE);
        
GetPlayerTag(playerid);
        
SendMessage(playeridCOLOR_NITROEX"Your relog request is proccesing ...");
        return 
1;
    } 
PHP код:
new boolisRelogging[MAX_PLAYERS], relogPlayerIP[MAX_PLAYERS][17]; 
PHP код:
    if(isRelogging[playerid] == true)
    {
        new 
string[30];
        
isRelogging[playerid] = false;
        
format(stringsizeof(string), "unbanip %s"relogPlayerIP[playerid]);
        
SCM(playeridCOLOR_REDstring);
        
SendRconCommand(string);
    } 
PHP код:
forward reloging(playerid);
public 
reloging(playerid) {
    new 
string[30];
    
isRelogging[playerid] = false;
    
format(stringsizeof(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.
Reply
#2

You mean you want to stop the server for 0.5 seconds and then start it again?
Reply
#3

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
Reply
#4

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
pawn Код:
TogglePlayerSpectating
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.
Reply
#5

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
pawn Код:
TogglePlayerSpectating
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
Reply
#6

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.
Reply
#7

Have you tried changing 11000 to anything else? Try changing it to 600, 650
Reply
#8

Just like that:
http://www.mediafire.com/file/58hkjq...ously.wmv/file
Reply
#9

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
Reply
#10

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?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)