![]() |
#1 |
Little Clucker
![]() Join Date: Jun 2017
Posts: 34
Reputation: 0
|
![]()
Hey guys I was trying to learn Login and register system of samp and i was wondering how can I add the user name in the login/register dialog... for example,
Welcome Crackerz! Please login below... My dialog code : HTML Code:
public OnPlayerConnect(playerid) { if(fexist(UserPath(playerid))) { 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"); } else { ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COL_WHITE"Registering...",""COL_WHITE"Type your password below to register a new account.","Register","Quit"); } return 1; } |
![]() |
![]() |
![]() |
#2 |
Gangsta
![]() ![]() ![]() ![]() Join Date: Jul 2017
Posts: 477
Reputation: 44
|
![]()
Here's an example:
PHP Code:
|
![]() |
![]() |
![]() |
#3 |
Little Clucker
![]() Join Date: Jun 2017
Posts: 34
Reputation: 0
|
![]()
where do i add that?
|
![]() |
![]() |
![]() |
#4 |
Gangsta
![]() ![]() ![]() ![]() Join Date: Jul 2017
Posts: 477
Reputation: 44
|
![]()
To your code:
PHP Code:
|
![]() |
![]() |
![]() |
#5 |
Huge Clucker
![]() ![]() ![]() Join Date: Jan 2016
Location: Jordan
Posts: 432
Reputation: 22
|
![]() Code:
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; } |
![]() |
![]() |
![]() |
#6 |
Little Clucker
![]() Join Date: Jun 2017
Posts: 34
Reputation: 0
|
![]()
I can use it globally?
|
![]() |
![]() |
![]() |
#7 | |
Gangsta
![]() ![]() ![]() ![]() Join Date: Jul 2017
Posts: 477
Reputation: 44
|
![]() Quote:
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. |
|
![]() |
![]() |
![]() |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to show textdraw[MAX_PLAYERS] show for a player? | Maheerali | Scripting Help | 2 | 14/08/2016 02:17 PM |
simple show player money with textdraw will show player money to all !!!!LOL | dash5487 | Scripting Help | 10 | 15/04/2015 08:43 PM |
Textdraw doesn't show on spawn sometimes it even doesn't show | Immortal_LTU | Scripting Help | 10 | 24/10/2013 07:52 AM |
Key show on 3D | Qur | Scripting Help | 18 | 25/11/2011 03:59 PM |
/show | /show ID | Milf | Help Archive | 0 | 20/08/2011 02:25 AM |