How to make a /gethere «id» and /goto «id» command?
#1

Hi,

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

someone?
Reply
#3

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

Anyone?
Reply
#5

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.
Reply
#6

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
Reply
#7

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;
	}
Reply
#8

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

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
Reply
#10

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?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)