Quote:
Originally Posted by Calgon
I believe you could use sscanf to split the entry by using comma as the delimiter.
pawn Код:
public OnPlayerText(playerid, text[]) { new Float: fCoordinates[3];
if(sscanf(text, "p<,>fff", fCoordinates[0], fCoordinates[1], fCoordinates[2])) return 1; // Error: Invalid coordinates
SetPlayerPos(playerid, fCoordinates[0], fCoordinates[1], fCoordinates[2]); return 1; }
However, the spaces should be removed between the coordinate text. (140.17,1366.07,1083.65)
|
Brilliant, thank you. I didn't even think to use sscanf.