PDA

View Full Version : i need the command


oFFiCiaLBr
17/04/2014, 08:23 PM
i need the command /gotoc (c=coordonate)

ex: /gotoc 288.745971,169.350997,1007.171875

CutX
17/04/2014, 08:29 PM
i need the command /gotoc (c=coordonate)

ex: /gotoc 288.745971,169.350997,1007.171875

then just make one :)
ain't that hard...
see this YCMD example
YCMD:gotoc(playerid,params[],help)
{
if(help) SendClientMessage(playerid,gray,"/gotoc Is used to teleport yourself to a specific position on the map.");
//add some admin restrictions or use the features offered by YCMD
new Float:p[3];
if(sscanf(params,"fff",p[0],p[1],p[2])) return SendClientMessage(playerid,red,"USAGE: /gotoc [X] [Y] [Z]");
//could add some check here if player is in car or not
SetPlayerPos(playerid,p[0],p[1],p[2]);
GameTextForPlayer(playerid,"Teleported!",3000,3);
return 1;
}

Konstantinos
17/04/2014, 08:38 PM
Although with the above command, you will need to use space instead of comma. If you want with it commas, replace the sscanf line with:

if (sscanf(params, "p<,>fff", p[0], p[1], p[2])) ...