#1

I have 1 error this one:

Код:
W:\Users\Magdy\Desktop\Server 3.0e\filterscripts\MyAdmin.pwn(323) : warning 213: tag mismatch
Script:

pawn Код:
CMD:kick(playerid,params[])
{
    new id,reason;
Line 323 if(PlayerInfo[playerid][AdminLevel] < 1) return SendClientMessage(playerid,COLOR_RED,"[ERROR] You've to be an level 1 admin to use this command.");
    else if(sscanf(params,"us",id,reason)) return SendClientMessage(playerid,COLOR_WHITE,"[SYNTAX] Usage: /kick [playerid] [Reason]");
    else if(id == playerid)SendClientMessage(playerid,COLOR_WHITE,"[ERROR] You cannot kick yourself!");
    else if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid,COLOR_RED,"[ERROR] That player isn't connected.");
    else
    {
    new string[124];
    new name[MAX_PLAYER_NAME];
    new nname[MAX_PLAYER_NAME];
    GetPlayerName(id,name,MAX_PLAYER_NAME);
    GetPlayerName(playerid,nname,MAX_PLAYER_NAME);
    format(string,sizeof(string),"[KICK] %s has been kicked by %s [Reason: %s]",name,nname,string);
    SendClientMessageToAll(COLOR_RED,string);
    Kick(id);
    }
    return 1;
}
Also can you check if this kick command will work.
Reply
#2

pawn Код:
new id,reason[50];
Reason has to be a string, not an integer.
Reply
#3

I already fixed it, but thanks for your respond.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)