Need Very Little Help
#1

Hi guys i want that on login window the player who try to login.His/Her name come up where i have written NAME in code how i can do that.

My Code
Code:
public OnPlayerConnect(playerid)
{
    Rules(playerid);

   	if(fexist(UserPath(playerid)))
    {
        INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
        ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"{FFFFFF}CnR {FFFFFF}Login",""COL_WHITE"{0066FF}SERVER NAME HERE\n\n{0099FF}Player Login\n\n{FFFFFF}This nick,NAME,is Registered.\nIf this is not your account,please quit and change your nick.\n\nPlease {FFFF66}Enter Your Password {FFFFFF}To Login:","Login","Cancel");
    }
    else
Reply
#2

PHP Code:
if(fexist(UserPath(playerid)))
{
    
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
    new 
pName[MAX_PLAYER_NAME];
    
GetPlayerName(playerid, pName, sizeof(pName));
    
format(string, sizeof(string), ""COL_WHITE"{0066FF}SERVER_NAME_HERE\n\n{0099FF}Player Log-in\n\n{FFFFFF}Nickname %s is already registered.\nIf this is not your account, please quit and change to your nick.\n\nPlease {FFFF66}Enter Your Password {FFFFFF}To Login:", pName);
    
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, ""COL_WHITE"{FFFFFF}CnR {FFFFFF}Login", string, "Login", "Cancel");
} 
Reply
#3

Gives Errors
Quote:

C:\Users\Anurag\Desktop\Billu Gang Cops And Robbers\gamemodes\MWCNR.pwn(4850) : error 017: undefined symbol "string"
C:\Users\Anurag\Desktop\Billu Gang Cops And Robbers\gamemodes\MWCNR.pwn(4850) : error 017: undefined symbol "string"
C:\Users\Anurag\Desktop\Billu Gang Cops And Robbers\gamemodes\MWCNR.pwn(4850) : error 029: invalid expression, assumed zero
C:\Users\Anurag\Desktop\Billu Gang Cops And Robbers\gamemodes\MWCNR.pwn(4850) : fatal error 107: too many error messages on one line

Reply
#4

PHP Code:
if(fexist(UserPath(playerid))) 
{ 
    new 
string [ 200 ];
    
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid); 

    new 
pName[MAX_PLAYER_NAME]; 
    
GetPlayerName(playerid, pName, sizeof(pName)); 

    
format(string, sizeof(string), ""COL_WHITE"{0066FF}SERVER_NAME_HERE\n\n{0099FF}Player Log-in\n\n{FFFFFF}Nickname %s is already registered.\nIf this is not your account, please quit and change to your nick.\n\nPlease {FFFF66}Enter Your Password {FFFFFF}To Login:", pName); 
    
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, ""COL_WHITE"{FFFFFF}CnR {FFFFFF}Login", string, "Login", "Cancel"); 
} 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)