27.11.2011, 04:35
Here is my command:
I get this error:
When I remove the Ex at the end of 'GetPlayerNameEx' I get these warnings:
Код:
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; }
Код:
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.
Код:
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.