How to show a playersname when they spawn - 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)
+--- Thread: How to show a playersname when they spawn (
/showthread.php?tid=395356)
How to show a playersname when they spawn -
cluckintucker - 25.11.2012
Hello, I just wanna know how to get a players name when they spawn for ex:
when they finish registering it shows "welcome the persons name". I just need someone to put a code for me.
Thanks. And another thingy im making a cmd /o i want it to say the persons name and show theere message help please thanks.
Re: How to show a playersname when they spawn -
iTzZh - 25.11.2012
Код:
new UsernameString[MAX_PLAYER_NAME], WelcomeString[15 + MAX_PLAYER_NAME];
GetPlayerName(playerid, UserNameString, MAX_PLAYER_NAME);
format(WelcomeString, sizeof(WelcomeString), "Welcome %s!", UserNameString);
SendClientMessage(playerid, -1, WelcomeString);
That will welcome the user with their name in the message as well.
Re: How to show a playersname when they spawn -
cluckintucker - 27.11.2012
ok thanks +rep since your the only one who helped