Help!!
#1

Hey guys i have made a /kick command
When i compile it every thing is OK but 1 warning
pawn Код:
D:\Gta\Pwano\filterscripts\BJAdmSystem.pwn(366) : warning 203: symbol is never used: "kick"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Warning.
Can someone please tell me how to fix this warning?
Reply
#2

show us the code :d
Reply
#3

can we see your command? we can't do anything without it
Reply
#4

Код:
CMD:kick(playerid,params[])
{
    new id,reason[128];
    if(PlayerInfo[playerid][pAdminLevel] < 1) return SendClientMessage(playerid,COLOR_RED,"You've To Be Admin To Use This Command");
    if(sscanf(params,"us[128]",id,reason)) return SendClientMessage(playerid,COLOR_RED,"Usage : /kick [playerid] [Reason]");
    if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid,COLOR_RED,"Player Doesn't Exist");
    new pName[24],name[24];
    GetPlayerName(playerid,pName,24);
    GetPlayerName(id,name,24);
    new string[128];
    format(string,128,"You've Kicked from the server %s.Reason: %s",name,reason);
    SendClientMessage(playerid,COLOR_YELLOW,string);
    format(string,128,"You've Been Kicked from this server By %s. Reason : %s",pName,reason);
    SendClientMessage(id,COLOR_RED,string);
    format(string,128,"Admin %s has Kicked %s. Reason: %s",pName,name,reason);
    SendClientMessageToAll(COLOR_YELLOW,string);
    Kick(id);
    format(string,sizeof(string),"%s Has been Kicked %s: Reason: %s",pName,name,reason);
    return 1;
This is the code
Reply
#5

Line 366 = ? have you put the last } ?
Reply
#6

Your script is a real mess. Here, use this:

pawn Код:
CMD:kick(playerid, params[]) {
    new id, r;
    if(sscanf(params, "uz", id, r)) {
        if(IsPlayerAdmin(playerid)) {
            if(id != INVALID_PLAYER_ID) {
                new name[MAX_PLAYER_NAME], str[128];
                GetPlayerName(id, name, MAX_PLAYER_NAME);
                format(str, sizeof(str), "An Admin has kicked %s. Reason: %s", name, r);
                SendClientMessageToAll(COLOR_LIGHTBLUE, str);
                Kick(id);
            }
            else return SendClientMessage(playerid, COLOR_GREY, "Error: Player not found");
        }
        else return SendClientMessage(playerid, COLOR_BRIGHTRED, "You have no acces to this command");
    }
    else return SendClientMessage(playerid, COLOR_ORANGE, "Syntax Error: /kick [playerid/partofname] [reason (optional)]");
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)