SA-MP Forums Archive
i need the command - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: i need the command (/showthread.php?tid=507468)



i need the command - oFFiCiaLBr - 17.04.2014

i need the command /gotoc (c=coordonate)

ex: /gotoc 288.745971,169.350997,1007.171875


Re: i need the command - CutX - 17.04.2014

Quote:
Originally Posted by oFFiCiaLBr
Посмотреть сообщение
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
pawn Код:
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;
}



Re: i need the command - Konstantinos - 17.04.2014

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:
pawn Код:
if (sscanf(params, "p<,>fff", p[0], p[1], p[2])) ...