PDA

View Full Version : sscanf with dialogs?


Derexi
17/08/2014, 01:09 PM
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...

MicroD
17/08/2014, 01:13 PM
new coord[3];
if(!sscanf(inputtext, "fff", coord[0], coord[1], coord[2]))
SetPlayerPos(playerid, coord[0], coord[1], coord[2]);//Example