[Help] /wanted
#1

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
Reply
#2

Bumpedy
Reply
#3

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)