Help +rep
#1

Guys When i Use /kick To kick player he can' back he said to himServer Closed
Reply
#2

I'm not sure I am understanding what you're saying. Are you saying that when you /kick a player, when they go to log back in it says Server Closed the Connection?
Reply
#3

Show us your kick cmd code.
Reply
#4

Quote:
Originally Posted by Blade_Cervetti
Посмотреть сообщение
I'm not sure I am understanding what you're saying. Are you saying that when you /kick a player, when they go to log back in it says Server Closed the Connection?
Yes

Code
PHP код:
YCMD:kick(playeridparams[], help)
{
        
#pragma unused help
        
if(P_Data[playerid][pAdmin] == 0) return SCM(playeridCOLOR_RED"You aren't an admin!");
        new
            
string[128],pplayeridreason[48];
        if(
sscanf(params"us[48]"pplayeridreason)) return SCM(playeridCOLOR_RED"Usage: /kick [Player ID/Player Name] [Reason]");
        if(
pplayerid == IPI) return SCM(playeridCOLOR_RED"Wrong playerid!");
        if(
P_Data[pplayerid][pAdmin] == 5) return SCM(playeridCOLOR_RED"You can't ban admin level 5!");
        
format(string,sizeof(string),""COL_RED"Admin "COL_WHITE"%s "COL_RED"is kick player "COL_WHITE"%s  "COL_RED"Reason: %s",GetName(playerid),GetName(pplayerid),reason);
        
SCMToAll(-1,string);
        
Kick(pplayerid);
        return 
1;

Reply
#5

when i /kick a player, when they go to log back , when he choose skin it says Server Closed the Connection
Reply
#6

Quote:
Originally Posted by AYOUYOU
Посмотреть сообщение
when i /kick a player, when they go to log back , when he choose skin it says Server Closed the Connection
The feature you're asking for seems more like a ban one.

pawn Код:
YCMD:ban(playerid, params[], help)
{
    #pragma unused help
    if(P_Data[playerid][pAdmin] == 0) return SCM(playerid, COLOR_RED, "You aren't an admin!");
    new
        string[128],pplayerid, reason[48];
    if(sscanf(params, "us[48]", pplayerid, reason)) return SCM(playerid, COLOR_RED, "Usage: /ban [Player ID/Player Name] [Reason]");
    if(pplayerid == IPI) return SCM(playerid, COLOR_RED, "Wrong playerid!");
    if(P_Data[pplayerid][pAdmin] == 5) return SCM(playerid, COLOR_RED, "You can't ban admin level 5!");
    format(string,sizeof(string),""COL_RED"Admin "COL_WHITE"%s "COL_RED"is kick player "COL_WHITE"%s  "COL_RED"Reason: %s",GetName(playerid),GetName(pplayerid),reason);
    SCMToAll(-1,string);
    BanEx(pplayerid, reason);
    return 1;
}
Reply
#7

No, he means that when someone is kicked, it bans them instead (I think).

Here's a /kick command that works fully.

pawn Код:
CMD:kick(playerid, params[])
{
    new targetid, reason[64], string[128];
    [ADMIN SYSTEM HERE] return SendClientMessageEx(playerid, COLOR_GREY, "You are not authourized to use this command.");
    else if(sscanf(params, "us[64]", targetid, reason)) return SendClientMessageEx(playerid, COLOR_GREY, "Usage: /kick [playerid] [reason]");
    else if(!IsPlayerConnectedEx(targetid) || !IsPlayerLogged(targetid)) return SendClientMessageEx(playerid, COLOR_GREY, "Invalid player specified.");
    else if(PlayerInfo[targetid][pAdminLevel] > PlayerInfo[playerid][pAdminLevel]) return SendClientMessageEx(playerid, COLOR_GREY, "You cannot kick administrators of a higher rank.");
    format(string, sizeof(string), "SERVER: %s was kicked by %s, reason: %s", GetPlayerNameEx(targetid), GetPlayerNameEx(playerid), reason);
    SendClientMessageToAllEx(COLOR_LIGHTRED, string);
    format(string, sizeof(string), "%s was kicked by %s, reason: %s", GetPlayerNameEx(targetid), GetPlayerNameEx(playerid), reason);
    Log("kick.txt", string);
    Kick(targetid);
    return 1;
}
Reply
#8

When i have warn player 5/5 he get a kick when he back for log he choose skin and he tell him Serer closed the conection
Reply
#9

Quote:
Originally Posted by AYOUYOU
Посмотреть сообщение
When i have warn player 5/5 he get a kick when he back for log he choose skin and he tell him Serer closed the conection
Uhm this sound weird to me (and im little confused right now)
- Did you check if he is ban file (i mean if his account is banned)? I mean if you kick someone his account will be saved
Example
Ban=1 (true)
Reply
#10

Maybe you've made the warning system ban him at the end of the progress. Did you copy and paste the script?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)