SA-MP Forums Archive
Need Very Little Help - 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: Need Very Little Help (/showthread.php?tid=609786)



Need Very Little Help - CarRamper - 16.06.2016

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



Re: Need Very Little Help - luke49 - 16.06.2016

PHP Code:
if(fexist(UserPath(playerid)))
{
    
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra true, .extra playerid);
    new 
pName[MAX_PLAYER_NAME];
    
GetPlayerName(playeridpNamesizeof(pName));
    
format(stringsizeof(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(playeridDIALOG_LOGINDIALOG_STYLE_INPUT""COL_WHITE"{FFFFFF}CnR {FFFFFF}Login"string"Login""Cancel");




Re: Need Very Little Help - CarRamper - 16.06.2016

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




Re: Need Very Little Help - luke49 - 16.06.2016

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(playeridpNamesizeof(pName)); 

    
format(stringsizeof(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(playeridDIALOG_LOGINDIALOG_STYLE_INPUT""COL_WHITE"{FFFFFF}CnR {FFFFFF}Login"string"Login""Cancel");