help pls
#2

pawn Код:
CMD:ban(playerid, params[])
{
    new id, reason[64];
    if(sscanf(params, "us[64]", id, reason)) return SendClientMessage(playerid, -1, "USAGE: /ban [id] [reason]");
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "That player isn't connected!");
    if(IsPlayerAdmin(playerid))
    {
        new name[MAX_PLAYER_NAME];
        GetPlayerName(id, name, sizeof(name));
        new string[128];
        format(string, sizeof(string), "%s was banned for %s", name, reason);
        SendClientMessageToAll(-1, string);
        Ban(id);
    }
    else {
        SendClientMessage(playerid, -1, "You aren't admin!");
    }
    return 1;
}
Reply


Messages In This Thread
help pls - by tanush - 01.03.2011, 23:54
Re: help pls - by Antonio [G-RP] - 01.03.2011, 23:58
Re: help pls - by tanush - 02.03.2011, 00:07
Re: help pls - by mprofitt - 02.03.2011, 00:09
Re: help pls - by tanush - 02.03.2011, 00:14
Re: help pls - by Tee - 02.03.2011, 00:20
Re: help pls - by Antonio [G-RP] - 02.03.2011, 00:20
Re: help pls - by tanush - 02.03.2011, 00:28
Re: help pls - by Antonio [G-RP] - 02.03.2011, 00:30
Re: help pls - by Mean - 02.03.2011, 09:29

Forum Jump:


Users browsing this thread: 2 Guest(s)