SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 01/12/2009, 07:12 PM   #1
Rubennnnn
Big Clucker
 
Join Date: Dec 2009
Posts: 79
Reputation: 0
Default How to make a /gethere «id» and /goto «id» command?

Hi,

Can anybody help me with a /gethere «id» and /goto «id» command?
Rubennnnn is offline  
Old 01/12/2009, 07:19 PM   #2
Rubennnnn
Big Clucker
 
Join Date: Dec 2009
Posts: 79
Reputation: 0
Default Re: How to make a /gethere «id» and /goto «id» command?

someone?
Rubennnnn is offline  
Old 01/12/2009, 07:31 PM   #3
Streetplaya
Gangsta
 
Join Date: Nov 2007
Posts: 718
Reputation: 1
Default Re: How to make a /gethere «id» and /goto «id» command?

Firstly, you should wait longer than 20 minutes before bumping your topic.
Secondly, search.
Streetplaya is offline  
Old 01/12/2009, 07:42 PM   #4
Rubennnnn
Big Clucker
 
Join Date: Dec 2009
Posts: 79
Reputation: 0
Default Re: How to make a /gethere «id» and /goto «id» command?

Anyone?
Rubennnnn is offline  
Old 01/12/2009, 07:43 PM   #5
Correlli
Godfather
 
Correlli's Avatar
 
Join Date: May 2009
Posts: 7,031
Reputation: 105
Default Re: How to make a /gethere «id» and /goto «id» command?

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.
Correlli is offline  
Old 01/12/2009, 07:44 PM   #6
saiberfun
High-roller
 
saiberfun's Avatar
 
Join Date: Nov 2008
Location: Germany
Posts: 3,612
Reputation: 381
Default Re: How to make a /gethere «id» and /goto «id» command?

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
__________________
This could be your space to advertise. :3
saiberfun is offline  
Old 01/12/2009, 07:45 PM   #7
Deat_Itself
Gangsta
 
Join Date: May 2009
Location: UAE (Abudhabi,Shahama)
Posts: 603
Reputation: 4
Default Re: How to make a /gethere «id» and /goto «id» command?

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;
	}
Deat_Itself is offline  
Old 01/12/2009, 07:46 PM   #8
Streetplaya
Gangsta
 
Join Date: Nov 2007
Posts: 718
Reputation: 1
Default Re: How to make a /gethere «id» and /goto «id» command?

_Saif_, you're not "helping" him as of make him understand, you're providing full finished code.
Streetplaya is offline  
Old 01/12/2009, 07:48 PM   #9
Deat_Itself
Gangsta
 
Join Date: May 2009
Location: UAE (Abudhabi,Shahama)
Posts: 603
Reputation: 4
Default Re: How to make a /gethere «id» and /goto «id» command?

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
Deat_Itself is offline  
Old 01/12/2009, 08:06 PM   #10
Rubennnnn
Big Clucker
 
Join Date: Dec 2009
Posts: 79
Reputation: 0
Default Re: How to make a /gethere «id» and /goto «id» command?

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?
Rubennnnn is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with /goto command sobolanux Help Archive 0 10/04/2010 01:35 PM
How to make player goto jail on spawn Torran Help Archive 8 12/03/2010 09:13 PM
/goto [ID] mrbubl3s Help Archive 2 10/02/2010 04:35 AM
/getgun & /armour & /goto command WanabePC Help Archive 3 22/04/2009 06:49 PM


All times are GMT. The time now is 03:22 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.