Teleport
#1

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)!
Reply
#2

Код:
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.
Reply
#3

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

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);
Reply
#5

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

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
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)