help me with this please.
#2

pawn Код:
CMD:kick(playerid, params[]) // or CMD:mycommand(playerid, params[])
{
    new id;
    new str[128];
    if(IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_RED,"You may not use this command");
    if(sscanf(params,"us",id,str)) return SendClientMessage(playerid,-1,"{000000}You may not use this command");
    {
    else if(id == playerid) {
        return SendClientMessage(playerid,COLOR_RED,"You can kick your self");
    }
    else if(IsPlayerAdmin(id)) {
        return SendClientMessage(playerid, COLOR_RED, "You can't kick a nother admin");
    }
    else if(id == INVALID_PLAYER_ID) {
        return SendClientMessage(playerid,COLOR_RED, "That player isn't connected");
    }
    else{
        new KickMessage[128]
        new vName[MAX_PLAYER_NAME];
        new pName[MAX_PLAYER_NAME];
        GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
        GetPlayerName(id,vName,MAX_PLAYER_NAME);
        format(KickMessage,sizeof(KickMessage),"Admin: %s(%d) has kick %s(%d) Reason %s",pName,playerid,vName,id);
        Kick(id);
    }
    return 1;
}
just a typo and forgot a semicolon
Reply


Messages In This Thread
help me with this please. - by Gangster-rocks - 14.07.2012, 13:31
Re: help me with this please. - by Andi_Evandy - 14.07.2012, 13:37
Re: help me with this please. - by Gangster-rocks - 14.07.2012, 13:46
Re: help me with this please. - by [MM]RoXoR[FS] - 14.07.2012, 13:50
Re: help me with this please. - by Devilxz97 - 14.07.2012, 13:55
Re: help me with this please. - by Andi_Evandy - 14.07.2012, 13:57
Re: help me with this please. - by clarencecuzz - 14.07.2012, 13:58
Re: help me with this please. - by Andi_Evandy - 14.07.2012, 13:59
Re: help me with this please. - by clarencecuzz - 14.07.2012, 14:03
Re: help me with this please. - by leonardo1434 - 14.07.2012, 14:08

Forum Jump:


Users browsing this thread: 2 Guest(s)