20.04.2014, 13:34
I believe you could use sscanf to split the entry by using comma as the delimiter.
However, the spaces should be removed between the coordinate text. (140.17,1366.07,1083.65)
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;
}