goto cordinate
#2

You need to use strtok.
If you haven't strtok, tell me.
OnPlayerCommandText:
Код:
new cmd[50];
cmd = strtok(cmdtext, idx);
if(!strcmp(cmd, "/Teleport", true))
{
new tmp[128], tmp2[128];
cmd = strtok(cmdtext, idx);
tmp = strtok(cmdtext, idx);
tmp2 = strtok(cmdtext, idx);
if(!strlen(cmd) || !strlen(tmp) || !strlen(tmp2)) return SendClientMessage(playerid, 0x808080FF, "/Teleport [x] [y] [z]");
new Float:x = Floatstr(cmd), Float:y = Floatstr(tmp), Float:z = Floatsr(tmp2));
SetPlayerPos(playerid, x, y, z);
return SendClientMessage(playerid, 0xFFFFFFFF, "You have been teleported succesfully.");
}
*Write in the forum.
Reply


Messages In This Thread
goto cordinate - by Admin22 - 19.08.2013, 14:20
Re: goto cordinate - by AfikAtashga - 19.08.2013, 14:28
Re: goto cordinate - by Admin22 - 19.08.2013, 14:31
Re: goto cordinate - by Vanter - 19.08.2013, 14:52
Re: goto cordinate - by Max5 - 19.08.2013, 21:10

Forum Jump:


Users browsing this thread: 1 Guest(s)