[Help] /wanted - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [Help] /wanted (
/showthread.php?tid=162256)
[Help] /wanted -
iRemix - 22.07.2010
Hello,
I was wondering if I could get a little help with a certain command.
I needed a command which would allow me to see who ever has been 'wanted'. I've got the basics of it written, but I just carn't figure out to show the people that are wanted.
I hope someone can help me
Btw, my commands are written in DCMD, so It would be nice it could go along with my other commands.
Thanks
Re: [Help] /wanted -
iRemix - 23.07.2010
Bumpedy
Re: [Help] /wanted -
ViruZZzZ_ChiLLL - 23.07.2010
Not sure if this will work, but either way, try it :
pawn Код:
dcmd_wanted(playerid, params[])
{
new count = 0;
new str[96];
new name[MAX_PLAYER_NAME];
SendClientMessage(playerid, Red, "Listing Currently Wanted Players:");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && GetPlayerWantedLevel(i) > 0)
{
GetPlayerName(i, name, sizeof(name));
format(str, sizeof(str), "Name : %s (ID : %d)(Wanted Leve : %d)", name, i, GetPlayerWantedLevel(i));
SendClientMessage(playerid, Color, str);
count++;
}
}
if(count == 0)
{
SendClientMessage(playerid, Color, "SERVER : There are no muted players at the moment!");
}
return 1;
}
I used Sscanf.