SA-MP Forums Archive
Goto command problem - 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: Goto command problem (/showthread.php?tid=386431)



Goto command problem - nickbouwhuis - 20.10.2012

I followed a tutorial by the user Lorizz, and his script doesn't work

Everytime I use it, it says "USAGE: /goto [ID]".

Can someone help me? Code at: http://pastebin.com/BwKN8LCR


Thanks!


Re: Goto command problem - PaulDinam - 20.10.2012

Код:
CMD:goto(playerid, params[])
{
	if(PlayerInfo[playerid][pAdmin] < 2) return SCM(playerid, COLOR_GREY,"You are not authorized to use this command");
	new targetid;
	if(sscanf(params,"d",targetid)) return SyntaxMessage(playerid, "/goto [playerid]");
	if(!IsPlayerConnected(targetid)) SCM(playerid, 0xF97804FF, "Player is not connected!");
	new Float:x,Float:y,Float:z;
	GetPlayerPos(targetid, x, y, z);
	SetPlayerPos(playerid, x+1, y+1, z);
	return 1;
}



Re: Goto command problem - RedJohn - 20.10.2012

/goto playerid [/goto 0]

Try to update sscanf.