Help with /kick command.
#1

Here is my command:
Код:
COMMAND:kick(playerid, params[]) //using ZCMD this is how your command will start off looking like.
{
    if(PlayerInfo[playerid][pAdmin] <= 2)
    {
        new otherplayerid, reason[128];
        if(sscanf(params, "uz", otherplayerid, reason)) // split input string and check level value 0 to 5
            SendClientMessage(playerid, 0xFFFFFFFF, "/kick [playerid/name] [reason]");
        else if(otherplayerid == INVALID_PLAYER_ID) // Check player connected
            SendClientMessage(playerid, 0xFFFFFFFF, "This player is not connected");
        else
        {
            new string[32];
            format(string, sizeof(string), "Admin %s kicked %s | Reason: %s", GetPlayerNameEx(playerid), GetPlayerNameEx(otherplayerid), reason);
            SendClientMessageToAll(0xFFFFFFFF,string);
            Kick(otherplayerid);
        }
    }
    else
    {
        SendClientMessage(playerid, 0xAAAAAAAA, "You are not admin or the required level.");
    }
    return 1;
}
I get this error:
Код:
C:\Users\admin\Desktop\Server\gamemodes\Server.pwn(884) : error 017: undefined symbol "GetPlayerNameEx"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
When I remove the Ex at the end of 'GetPlayerNameEx' I get these warnings:
Код:
C:\Users\admin\Desktop\Server\gamemodes\Server.pwn(884) : warning 202: number of arguments does not match definition
C:\Users\admin\Desktop\Server\gamemodes\Server.pwn(884) : warning 202: number of arguments does not match definition
C:\Users\admin\Desktop\Server\gamemodes\Server.pwn(884) : warning 202: number of arguments does not match definition
C:\Users\admin\Desktop\Server\gamemodes\Server.pwn(884) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Warnings.
Reply


Messages In This Thread
Help with /kick command. - by Vic1990 - 27.11.2011, 04:35
Re: Help with /kick command. - by GAMER_PS2 - 27.11.2011, 04:41
Re: Help with /kick command. - by Vic1990 - 27.11.2011, 04:43
Re: Help with /kick command. - by GAMER_PS2 - 27.11.2011, 04:56

Forum Jump:


Users browsing this thread: 1 Guest(s)