GetPlayerName - 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: GetPlayerName (
/showthread.php?tid=619417)
GetPlayerName -
MrCesar - 17.10.2016
This doesn't show up the name..any solution?
Код:
new name[MAX_PLAYER_NAME], string[24+MAX_PLAYER_NAME];
GetPlayerName(playerid, string, sizeof(name));
format(string, sizeof(string), "You are logged in as %s, enjoy your stay!", name);
SendClientMessage(playerid, COLOR_GREEN, string);
Re: GetPlayerName -
jlalt - 17.10.2016
Код:
GetPlayerName(playerid, string, sizeof(name));
you had to use name instead of string
PHP код:
GetPlayerName(playerid, name, sizeof(name));
full code:
PHP код:
new name[MAX_PLAYER_NAME], string[24+MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "You are logged in as %s, enjoy your stay!", name);
SendClientMessage(playerid, COLOR_GREEN, string);
Re: GetPlayerName -
MrCesar - 17.10.2016
Quote:
Originally Posted by jlalt
Код:
GetPlayerName(playerid, string, sizeof(name));
you had to use name instead of string
PHP код:
GetPlayerName(playerid, name, sizeof(name));
full code:
PHP код:
new name[MAX_PLAYER_NAME], string[24+MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "You are logged in as %s, enjoy your stay!", name);
SendClientMessage(playerid, COLOR_GREEN, string);
|
missed that out, thanks!