SA-MP Forums Archive
How to make it say when a player teleports and where to? - 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 it say when a player teleports and where to? (/showthread.php?tid=119322)



How to make it say when a player teleports and where to? - Sampiscool123 - 07.01.2010

Hey,

How do i make it say when a player has teleported and where they have teleported to? For example "Sampiscool123 has teleported to the abondened airport! /aa to go there!"

Thank You


Re: How to make it say when a player teleports and where to? - Correlli - 07.01.2010

Search for the zone script.


Re: How to make it say when a player teleports and where to? - Emmet_ - 07.01.2010

SendClientMessageToAll(YOURCOLORHERE, %s has teleported to the abandoned airport! /aa to go there!,sendername);

I used that on my PowerX beta server I was planning to develope, worked well.

Post if you get errors.


Re: How to make it say when a player teleports and where to? - Sampiscool123 - 07.01.2010

: error 017: undefined symbol "sendername"


Re: How to make it say when a player teleports and where to? - Emmet_ - 07.01.2010

Quote:
Originally Posted by Sampiscool123
: error 017: undefined symbol "sendername"
Код:
GetPlayerName(playerid, sendername, sizeof(sendername));
SendClientMessageToAll(YOURCOLORHERE, "%s has teleported to the abandoned airport! /aa to go there!",sendername);
Try it now. It should work.


Re: How to make it say when a player teleports and where to? - Correlli - 07.01.2010

You need to define the sendername:
pawn Код:
new
    sendername[MAX_PLAYER_NAME];



Re: How to make it say when a player teleports and where to? - _Vortex - 07.01.2010

Under your teleport command:
Код:
	new string[128];
	format(string,128,"%s has teleported to area (/command)",ReturnPlayerName(playerid));
	SendClientMessageToAll(COLOR_,string);
Somewhere in the gamemode/filterscript:
Код:
stock ReturnPlayerName(playerid) //By Alex "******" Cole
{
	new pname[MAX_PLAYER_NAME];
	pname="Invalid PlayerID";
	if(IsPlayerConnected(playerid))
	{
		GetPlayerName(playerid, pname, sizeof (pname));
	}
	return pname;
}
Easiest way imo.



Re: How to make it say when a player teleports and where to? - Sampiscool123 - 07.01.2010

Thank You