Wanted list wont work
#2

pawn Код:
CMD:wanted(playerid, params[])
{
    if(pTeam[playerid] == 7)
    {
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            new string[400];//we will create a little big string coz 128 is too small, also we will make it outside loop because we don't
            // wait it to new emprty string is created MAX_PLAYER times
            if(GetPlayerWantedLevel(i) > 0)
            {
                format(string, sizeof(string), "%s{E60000}%s {FFFFFF}(Wanted Level: {E60000}%d{FFFFFF})\n", string,Name(i), GetPlayerWantedLevel(i)); //we add old string into new string
            }
        }
        ShowPlayerDialog(playerid, DIALOG_WANTED, DIALOG_STYLE_LIST, "SASP - Wanted List", string, "Done", ""); //we also show him dialog after loop is done. Your code would show him around
        //15 dialogs at same same so he would see only last one.
    }
    else
    {
        SendClientMessage(playerid, COLOR_VIOLET, "INFO: {FFFFFF}You're not in the SASP.");
    }
    return 1;
}
Follow comments in script.
Reply


Messages In This Thread
Wanted list wont work - by Luis- - 21.04.2012, 21:52
Re: Wanted list wont work - by [MG]Dimi - 21.04.2012, 22:14
Re: Wanted list wont work - by PrawkC - 21.04.2012, 22:15
Re: Wanted list wont work - by ReneG - 22.04.2012, 02:43
Re: Wanted list wont work - by MP2 - 22.04.2012, 02:47
Respuesta: Wanted list wont work - by Marricio - 22.04.2012, 03:35
Re: Wanted list wont work - by MP2 - 22.04.2012, 03:42
Respuesta: Wanted list wont work - by Marricio - 22.04.2012, 03:46

Forum Jump:


Users browsing this thread: 2 Guest(s)