15.08.2013, 16:02
hey i got this code, how i can make /setwanted and it removed all stars form player ,I dont need /setwanted id amount,
PHP код:
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;
}