05.01.2019, 04:17
https://sampforum.blast.hk/showthread.php?tid=570904
Further to the point above, "SendClientMessage" uses "playerid" NOT "pid". "OnPlayerConnect" is called when the player connects, "Response" is called when the player clicks something on the dialog (which could be many hours later if they\'re AFK). Despite this fact, you can still use "playerid" (and any other variable from the enclosing function) inside "Response" thanks to a feature called "closures".
That eliminates the need for a two dimensional array.
Further to the point above, "SendClientMessage" uses "playerid" NOT "pid". "OnPlayerConnect" is called when the player connects, "Response" is called when the player clicks something on the dialog (which could be many hours later if they\'re AFK). Despite this fact, you can still use "playerid" (and any other variable from the enclosing function) inside "Response" thanks to a feature called "closures".
That eliminates the need for a two dimensional array.