GetPlayerName
#1

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

Код:
GetPlayerName(playerid, string, sizeof(name));
you had to use name instead of string
PHP код:
GetPlayerName(playeridnamesizeof(name)); 
full code:
PHP код:
    new name[MAX_PLAYER_NAME], string[24+MAX_PLAYER_NAME];
    
GetPlayerName(playeridnamesizeof(name));
    
format(stringsizeof(string), "You are logged in as %s, enjoy your stay!"name);
    
SendClientMessage(playeridCOLOR_GREENstring); 
Reply
#3

Quote:
Originally Posted by jlalt
Посмотреть сообщение
Код:
GetPlayerName(playerid, string, sizeof(name));
you had to use name instead of string
PHP код:
GetPlayerName(playeridnamesizeof(name)); 
full code:
PHP код:
    new name[MAX_PLAYER_NAME], string[24+MAX_PLAYER_NAME];
    
GetPlayerName(playeridnamesizeof(name));
    
format(stringsizeof(string), "You are logged in as %s, enjoy your stay!"name);
    
SendClientMessage(playeridCOLOR_GREENstring); 
missed that out, thanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)