15.08.2011, 14:13
I can try to make it but I won't succeed can someone give me the cmd for /setwanted so you can set someones wanted level
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;
}
I can try to make it but I won't succeed can someone give me the cmd for /setwanted so you can set someones wanted level
|
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;
}
(232) : error 029: invalid expression, assumed zero (232) : error 017: undefined symbol "cmd_setwanted" (232) : error 029: invalid expression, assumed zero (232) : fatal error 107: too many error messages on one line