SA-MP Forums Archive
Teleport - 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: Teleport (/showthread.php?tid=154652)



Teleport - Jonny_lockhart - 14.06.2010

Can someone make me a teleport command, /cc
Goes to these coords: -2310.3762, -1685.2257, 481.9977

And says to everyone in there server,

Playername has gone to Caddy Carnage (/cc)!


Re: Teleport - Naxix - 14.06.2010

Код:
new name[MAX_PLAYER_NAME],str[45];
GetPlayerName(playerid,name,sizeof(name));
format(str,sizeof(str),"%s has gone to Caddy Carnage (/cc)!",name);
SendClientMessageToAll(color,string);
SetPlayerPos(playerid,-2310.3762, -1685.2257, 481.9977);
That should work, just put it into your command, idk if you use strcmp,dcmd or zcmd.


Re: Teleport - Jonny_lockhart - 14.06.2010

I get:

Код:
(133) : error 010: invalid function or declaration
(135) : error 020: invalid symbol name ""
Line 133:
Код:
if (strcmp("/cc", cmdtext, true, 10) == 0)
Line 135:
Код:
new name[MAX_PLAYER_NAME],str[45];
Any clue?



Re: Teleport - Naxix - 14.06.2010

I don't use strcmp, so i'm not usre at the first one.

At the second one, i would try changing the "name" to something else, like:
Код:
new name2[MAX_PLAYER_NAME],str[45];
GetPlayerName(playerid,name2,sizeof(name2));
format(str,sizeof(str),"%s has gone to Caddy Carnage (/cc)!",name2);
SendClientMessageToAll(color,string);
SetPlayerPos(playerid,-2310.3762, -1685.2257, 481.9977);



Re: Teleport - Despare - 14.06.2010

Try this

Код:
if(strcmp(cmd, "/cc", true) == 0)
	{
		new playername[MAX_PLAYER_NAME];
  	GetPlayerName(playerid, playername, sizeof(playername));
  	format(string, sizeof(string), "%s has gone to Caddy Carnage (/cc).", playername);
		SendClientMessageToAll(color, string);
		SetPlayerPos(playerid, 1529.6,-1691.2,13.3);
		return 1;
	}



Re: Teleport - VinceQc - 14.06.2010

Quote:
Originally Posted by |>Daniel<|
Try this

Код:
if(strcmp(cmd, "/cc", true) == 0)
	{
		new playername[MAX_PLAYER_NAME];
  	GetPlayerName(playerid, playername, sizeof(playername));
  	format(string, sizeof(string), "%s has gone to Caddy Carnage (/cc).", playername);
		SendClientMessageToAll(color, string);
		SetPlayerPos(playerid, 1529.6,-1691.2,13.3);
		return 1;
	}
That should actually work, anyways Jonny, if you need any further help contact me on MSN