Show name!
#7

Quote:
Originally Posted by RedRex
Посмотреть сообщение
Код:
public OnPlayerConnect(playerid)
{
	if(fexist(UserPath(playerid)))
        new string[144], name[MAX_PLAYER_NAME + 1]; 
        GetPlayerName(playerid, name, sizeof(name)); 
	{
		INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
  		ShowPlayerDialog(playerid, DIALOG_LOGIN,DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE"Welcome to Pak Gaming Roleplay, Please login below to start wih your account!","Login","Quit");
         format(string, sizeof(string), "Hello %s Please login..", name); 

	}
	else
	{
 		ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COL_WHITE"Regist
	}ering...",""COL_WHITE"Type your password below to register a new account.","Register","Quit");
	return 1;
}
Try this?
Oh, god! Don't try this if you want to save yourself some seconds of your life.

Quote:
Originally Posted by Crackerz
Посмотреть сообщение
I can use it globally?
The player's name is being stored in a local variable, you'd have to get the player's name everywhere you want to display it.
Reply


Messages In This Thread
Show name! - by Crackerz - 17.07.2017, 21:16
Re: Show name! - by Paulice - 17.07.2017, 21:20
Re: Show name! - by Crackerz - 17.07.2017, 21:21
Re: Show name! - by Paulice - 17.07.2017, 21:26
Re: Show name! - by RedRex - 17.07.2017, 21:26
Re: Show name! - by Crackerz - 17.07.2017, 21:29
Re: Show name! - by Paulice - 17.07.2017, 22:22

Forum Jump:


Users browsing this thread: 1 Guest(s)