warn command
#2

Made it now.. Not tested:
pawn Код:
CMD:warn(playeid, params[])
{
    if(PlayerInfo[playerid][AdminLevel] >= 1)
    {
        new id; new reason; new string[64];
        if(!sscanf(params, "us", id, reason))
        {
            new Name[MAX_PLAYER_NAME]; new PlayerName[MAX_PLAYER_NAME];
            GetPlayerName(playerid, Name, sizeof(Name));
            GetPlayerName(id, PlayerName, sizeof(PlayerName));
            format(string, sizeof(string), "Administrator %s has warned %s for %s", Name, PlayerName, reason);
            SendClientMessageToAll(0xFFFFFFFF, string);
            PlayerInfo[id][Warns] = PlayerInfo[id][Warns]+1;
            return 1;
        }
        else return SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /warn [PlayerId][Reason]");
    }
    else return SendClientMessage(playerid, 0xFFFFFFFF, "You are not allowed to use this command.");
}
Reply


Messages In This Thread
warn command - by trulis - 14.02.2012, 12:04
Re : warn command - by ricardo178 - 14.02.2012, 12:13
Re: warn command - by trulis - 14.02.2012, 17:09
Re: warn command - by fordawinzz - 14.02.2012, 18:19
Re: warn command - by trulis - 20.02.2012, 11:26

Forum Jump:


Users browsing this thread: 1 Guest(s)