SA-MP Forums Archive
How to make a /gethere «id» and /goto «id» 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How to make a /gethere «id» and /goto «id» command? (/showthread.php?tid=111385)



How to make a /gethere «id» and /goto «id» command? - Rubennnnn - 01.12.2009

Hi,

Can anybody help me with a /gethere «id» and /goto «id» command?


Re: How to make a /gethere «id» and /goto «id» command? - Rubennnnn - 01.12.2009

someone?


Re: How to make a /gethere «id» and /goto «id» command? - Streetplaya - 01.12.2009

Firstly, you should wait longer than 20 minutes before bumping your topic.
Secondly, search.


Re: How to make a /gethere «id» and /goto «id» command? - Rubennnnn - 01.12.2009

Anyone?


Re: How to make a /gethere «id» and /goto «id» command? - Correlli - 01.12.2009

Quote:
Originally Posted by Rubennnnn
Anyone?
Like MaVe already told you:
Quote:
Originally Posted by MaVe - leeturl.de
Firstly, you should wait longer than 20 minutes before bumping your topic.
Secondly, search.



Re: How to make a /gethere «id» and /goto «id» command? - saiberfun - 01.12.2009

Quote:
Originally Posted by MaVe - leeturl.de
Firstly, you should wait longer than 20 minutes before bumping your topic.
Secondly, search.
12hours tho

second just use this link: LINK

Tags:
adminscripts like seif admin for example


Re: How to make a /gethere «id» and /goto «id» command? - Deat_Itself - 01.12.2009

i will help you now but next time check test_cmds FS and other FSs and then search it if you doesnt find it so make a topic then
Code:
if ( strcmp( cmd, "/goto", true ) == 0 )
	{
	  new tmp[256];
	  tmp = strtok( cmdtext, idx );

	  if ( !strlen( tmp ) ) { return 1; }

	  new Float:X, Float:Y, Float:Z;

	  if ( GetPlayerVehicleID( playerid ) )
	  {
		  GetPlayerPos( strval(tmp), X, Y, Z );
		  SetVehiclePos( GetPlayerVehicleID(playerid), X+2, Y+2, Z );
	  } else {
		  GetPlayerPos( strval(tmp), X, Y, Z );
		  SetPlayerPos( playerid, X+2, Y+2, Z );
	  }

	  return 1;
	}

	if ( strcmp( cmd, "/gethere", true ) == 0 )
	{
	  new tmp[256];
	  tmp = strtok( cmdtext, idx );


	  if ( !strlen( tmp ) ) { return 1; }

	  new Float:X, Float:Y, Float:Z;

	  if ( GetPlayerVehicleID( strval(tmp) ) )
	  {
		  GetPlayerPos( playerid, X, Y, Z );
		  SetVehiclePos( GetPlayerVehicleID(strval(tmp)), X+2, Y+2, Z );
	  } else {
		  GetPlayerPos( playerid, X, Y, Z );
		  SetPlayerPos( strval(tmp), X+2, Y+2, Z );
	  }

	  return 1;
	}



Re: How to make a /gethere «id» and /goto «id» command? - Streetplaya - 01.12.2009

_Saif_, you're not "helping" him as of make him understand, you're providing full finished code.


Re: How to make a /gethere «id» and /goto «id» command? - Deat_Itself - 01.12.2009

Quote:
Originally Posted by MaVe - leeturl.de
_Saif_, you're not "helping" him as of make him understand, you're providing full finished code.
he is a big noob and what i said next time i will nor help any one

thanks btw


Re: How to make a /gethere «id» and /goto «id» command? - Rubennnnn - 01.12.2009

Quote:
Originally Posted by _Saif_
i will help you now but next time check test_cmds FS and other FSs and then search it if you doesnt find it so make a topic then
Code:
if ( strcmp( cmd, "/goto", true ) == 0 )
	{
	  new tmp[256];
	  tmp = strtok( cmdtext, idx );

	  if ( !strlen( tmp ) ) { return 1; }

	  new Float:X, Float:Y, Float:Z;

	  if ( GetPlayerVehicleID( playerid ) )
	  {
		  GetPlayerPos( strval(tmp), X, Y, Z );
		  SetVehiclePos( GetPlayerVehicleID(playerid), X+2, Y+2, Z );
	  } else {
		  GetPlayerPos( strval(tmp), X, Y, Z );
		  SetPlayerPos( playerid, X+2, Y+2, Z );
	  }

	  return 1;
	}

	if ( strcmp( cmd, "/gethere", true ) == 0 )
	{
	  new tmp[256];
	  tmp = strtok( cmdtext, idx );


	  if ( !strlen( tmp ) ) { return 1; }

	  new Float:X, Float:Y, Float:Z;

	  if ( GetPlayerVehicleID( strval(tmp) ) )
	  {
		  GetPlayerPos( playerid, X, Y, Z );
		  SetVehiclePos( GetPlayerVehicleID(strval(tmp)), X+2, Y+2, Z );
	  } else {
		  GetPlayerPos( playerid, X, Y, Z );
		  SetPlayerPos( strval(tmp), X+2, Y+2, Z );
	  }

	  return 1;
	}
Code:
C:\Users\Ruben\Desktop\GTA SA MP server\gamemodes\rubendion.pwn(183) : error 017: undefined symbol "cmd"
C:\Users\Ruben\Desktop\GTA SA MP server\gamemodes\rubendion.pwn(186) : error 017: undefined symbol "strtok"
C:\Users\Ruben\Desktop\GTA SA MP server\gamemodes\rubendion.pwn(186) : error 033: array must be indexed (variable "tmp")
C:\Users\Ruben\Desktop\GTA SA MP server\gamemodes\rubendion.pwn(204) : error 017: undefined symbol "cmd"
C:\Users\Ruben\Desktop\GTA SA MP server\gamemodes\rubendion.pwn(207) : error 017: undefined symbol "strtok"
C:\Users\Ruben\Desktop\GTA SA MP server\gamemodes\rubendion.pwn(207) : error 033: array must be indexed (variable "tmp")
I get this. The "cmd" error I can fix by changing it to "cmdtext" but the rest?