SA-MP Forums Archive
sscanf with dialogs? - 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: sscanf with dialogs? (/showthread.php?tid=532264)



sscanf with dialogs? - Derexi - 17.08.2014

I was wondering how to use sscanf with dialogs.

For example, I have a dialog where you have to enter x, y, and z coordinates.

How would I use sscanf to check that the person has entered 3 coordinates separated by spaces or commas?

if(sscanf(inputtext, "fff... or whatever...


Re: sscanf with dialogs? - MicroD - 17.08.2014

Код:
new coord[3];
if(!sscanf(inputtext, "fff", coord[0], coord[1], coord[2]))
SetPlayerPos(playerid, coord[0], coord[1], coord[2]);//Example