Set Wanted cmd
#1

Sorry I have no clue how to make it searched for it too didn't find it.
I want to make a cmd where you can set someones wanted level by /setwanted.
How can I do this?
Reply
#2

pawn Код:
COMMAND:setwanted(playerid, params[])
{
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You need to be admin to use this command!");
    new Target, Level;
    if(!sscanf(params, "ui", Target, Level))
    {
        new string[128], string1[128], myname[24], targetname[24];
        GetPlayerName(playerid, myname, 24);GetPlayerName(Target, targetname, 24);
        SetPlayerWantedLevel(Target, Level);
        format(string, sizeof string, "%s changed your wanted level. ", myname);
        format(string1, sizeof string1, "You changed %s's wanted level. ", targetname);
        SendClientMessage(playerid, -1, string1);
        SendClientMessage(Target, -1, string);
    } else return SendClientMessage(playerid, -1, "Usage: /setwanted [playerid] [wanted level]");
    return 1;
}
You will need zcmd & sscanf for this.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)