SA-MP Forums Archive
NPC list TAB - 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)
+--- Thread: NPC list TAB (/showthread.php?tid=418692)



NPC list TAB - toi - 25.02.2013

How do I appear in my NPC list TAB? for example:

[SERVERBOT_COPPER] id 1
[SERVERBOT_ROBBERS] id 2
[SERVERBOT_SHIP] id 3
Tanks


Re: NPC list TAB - Hoss - 25.02.2013

Impossible.


Re: NPC list TAB - toi - 25.02.2013

and assign a specific id for each bot?


Re: NPC list TAB - Jefff - 25.02.2013

Create this in gui


Re: NPC list TAB - toi - 25.02.2013

how do I?


Re: NPC list TAB - Jefff - 25.02.2013

pawn Код:
new Nick[MAX_PLAYER_NAME],str[128] = "ID\tNick";
foreach(new ID : Bot)
{
    GetPlayerName(ID,Nick,MAX_PLAYER_NAME);
    format(str,sizeof(str),"%s{%06x}%d\t%s\n",str,(GetPlayerColor(ID) >>> 8),ID,Nick);
}

or

for(new ID; ID != MAX_PLAYERS; ID++)
    if(IsPlayerConnected(ID) && IsPlayerNPC(ID))
    {
        GetPlayerName(ID,Nick,MAX_PLAYER_NAME);
        format(str,sizeof(str),"%s{%06x}%d\t%s\n",str,(GetPlayerColor(ID) >>> 8),ID,Nick);
    }

ShowPlayerDialog(playerid,911,DIALOG_STYLE_LIST,"Server Bot List",str,"OK","");