SA-MP Forums Archive
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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help? (/showthread.php?tid=184068)



Help? - Luis- - 17.10.2010

I have used a tut for the Register Script and I want it to say the players name in the Dialog?

pawn Код:
Login[playerid] = 0;
    new nombre[MAX_PLAYER_NAME], archivo[256];
    GetPlayerName(playerid, nombre, sizeof(nombre));
    new getplayer[MAX_PLAYER_NAME];
    format(archivo, sizeof(archivo), "/Users/%s.ini", nombre);
    if (!dini_Exists(archivo))
    {
        ShowPlayerDialog(playerid, Register, DIALOG_STYLE_INPUT, "Foxx Role Play - Register", "Please enter a safe Passwsord for your Account", "Register", "Quit");
    }
    else
    {
        ShowPlayerDialog(playerid, Logged, DIALOG_STYLE_INPUT, "Foxx Role Play - Login", "Please type your Password for the Account '%s'", "Login", "Quit");
    }
    return 1;
}
Here is were I want it to say the Players Name;

pawn Код:
ShowPlayerDialog(playerid, Logged, DIALOG_STYLE_INPUT, "Foxx Role Play - Login", "Please type your Password for the Account '%s'", "Login", "Quit");



Re: Help? - [L3th4l] - 17.10.2010

pawn Код:
new Str[128], Name[MAX_PLAYER_NAME];
GetPlayerName(playerid, Name, sizeof(Name));
format(Str, sizeof(Str), "Please type your Password for the Account '%s'", Name);
ShowPlayerDialog(...."Foxx Role Play - Login", Str, "Login", "Quit");



Re: Help? - Luis- - 17.10.2010

I get a error
Код:
C:\Users\BooNii3\Foxx RP\Foxx RP\Core\gamemodes\Core1.pwn(401) : error 035: argument type mismatch (argument 2)
For this line

pawn Код:
ShowPlayerDialog(playerid, Login, DIALOG_STYLE_INPUT, "Foxx Role Play - Login", Str, "Login", "Quit");



Re: Help? - [L3th4l] - 17.10.2010

On the first post, you used; ShowPlayerDialog(playerid, Logged,... )

in this one u using : ShowPlayerDialog(playerid, Login..)


Re: Help? - Scenario - 17.10.2010

I'm not sure you can add a string to a dialog...

Try this though..

pawn Код:
new string[128], Name[MAX_PLAYER_NAME];
GetPlayerName(playerid, Name, sizeof(Name));
format(string, sizeof(string), "Foxx Role Play - Login", "Please type your Password for the Account '%s'", "Login", "Quit", Name);
ShowPlayerDialog(playerid, Login, DIALOG_STYLE_INPUT, string);



Re: Help? - Luis- - 17.10.2010

Same error on the same line?


Re: Help? - Scenario - 17.10.2010

Okay, so you can't have a players name in the dialog... Just send a "client message" along when you pop-open the dialog. It'll work just as good.


Re: Help? - Luis- - 17.10.2010

Hmm, But I have seen it in a server ..


Re: Help? - Scenario - 17.10.2010

Well... Put it this way, it may be possible, but I don't know how to do it.


Re: Help? - Luis- - 17.10.2010

Ah well thanks for helping