Setwanted
#2

Using ZCMD & sscanf2:

pawn Код:
CMD:setwanted( playerid, cmdtext[] )
{
    if(IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "You are not authorized to use this command.");
   
    new target, level;
    if(sscanf(cmdtext, "ui", target, level) return SendClientMessage(playerid, 0xFF0000FF, "USE: /setwanted [Player] [Level]");
   
    new msg[64], name[MAX_PLAYER_NAME], tname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof name);
    GetPlayerName(target, tname, sizeof tname);
   
    SetPlayerWantedLevel(target, level);
   
    format(msg, sizeof msg, "You have set %s's wanted level to %i.", tname, level);
    SendClientMessage(playerid, 0x00FF00FF, msg);
   
    format(msg, sizeof msg, "Admin %s has set your wanted level to %i!", name, level);
    SendClientMessage(target, 0x00FF00FF, msg);
   
    return true;
}
Reply


Messages In This Thread
Setwanted - by muhib777 - 15.08.2011, 14:13
Re: Setwanted - by iPLEOMAX - 15.08.2011, 14:23
Re: Setwanted - by Horrible - 15.08.2011, 14:24
Re: Setwanted - by muhib777 - 15.08.2011, 14:45
Re: Setwanted - by iPLEOMAX - 15.08.2011, 15:10
Re: Setwanted - by Darnell - 15.08.2011, 15:15

Forum Jump:


Users browsing this thread: 2 Guest(s)