SA-MP Forums Archive
Everyone must see who teles to where. - 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: Everyone must see who teles to where. (/showthread.php?tid=142989)



Everyone must see who teles to where. - [Ha]Lommo - 20.04.2010

Код:
SendClientMessageToAll(0xFF0000AA, "Someone has teleported to Los Santos", playerid);
Player%s or %d doesnt works ,then it shows a number


Re: Everyone must see who teles to where. - Hiddos - 20.04.2010

pawn Код:
new PlayerName[MAX_PLAYER_NAME],string[128];
GetPlayerName(playerid,PlayerName,sizeof(PlayerName));
format(string,sizeof(string),"Player %s has teleported to Los Santos",PlayerName);
SendClientMessageToAll(0xFF0000AA,string);



Re: Everyone must see who teles to where. - Torran - 20.04.2010

You dont need the (

So rather than:
pawn Код:
GetPlayerName(playerid,PlayerName,sizeof(PlayerName));
You can do:
pawn Код:
GetPlayerName(playerid,PlayerName,sizeof PlayerName);



Re: Everyone must see who teles to where. - Correlli - 20.04.2010

More efficient:
pawn Код:
new
    myArray[128];
GetPlayerName(playerid, myArray, MAX_PLAYER_NAME);
format(myArray, sizeof(myArray), "Player %s has teleported to Los Santos.", myArray);
SendClientMessageToAll(0xFF0000AA, myArray);