Get playerid from listitem.
#5

If it's ever not conveniently formatted to use with sscanf, you could always do something like:

pawn Code:
new tmpstr[80];

format(tmpstr, sizeof(tmpstr), "PLIST_%i_USERID", countPlayers);
SetPVarInt(playerid, tmpstr, get_players_id);
That would be inside your iteration. How do you use it?

pawn Code:
new tmpstr[80], get_player_id;

format(tmpstr, sizeof(tmpstr), "PLIST_%i_USERID", listitem);
get_player_id = GetPVarInt(playerid, tmpstr);
Inside your OnDialogResponse. Delete it after.

We're using the listitem the player would be at in OnDialogResponse and setting their ID through the PVar.

listitems start at 0 and as does your countPlayers variable.

It's pretty simple and self explanatory but if you don't understand, let me know and I'll explain further.
Reply


Messages In This Thread
Get playerid from listitem. - by CherryMond - 02.01.2019, 17:41
Re: Get playerid from listitem. - by NaS - 02.01.2019, 17:50
Re: Get playerid from listitem. - by CherryMond - 02.01.2019, 18:12
Re: Get playerid from listitem. - by RoboN1X - 03.01.2019, 03:34
Re: Get playerid from listitem. - by Kane - 03.01.2019, 08:40
Re: Get playerid from listitem. - by CherryMond - 03.01.2019, 20:27
Re: Get playerid from listitem. - by BlackBank - 03.01.2019, 22:33
Re: Get playerid from listitem. - by cessil - 03.01.2019, 23:04
Re: Get playerid from listitem. - by BlackBank - 03.01.2019, 23:11
Re: Get playerid from listitem. - by Y_Less - 04.01.2019, 00:16
Re: Get playerid from listitem. - by Threshold - 04.01.2019, 05:58
Re: Get playerid from listitem. - by cessil - 04.01.2019, 07:10
Re: Get playerid from listitem. - by Y_Less - 04.01.2019, 11:12
Re: Get playerid from listitem. - by BlackBank - 04.01.2019, 19:50
Re: Get playerid from listitem. - by CherryMond - 04.01.2019, 22:54
Re: Get playerid from listitem. - by Pottus - 05.01.2019, 04:17

Forum Jump:


Users browsing this thread: 1 Guest(s)