#1

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");
Reply
#2

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");
Reply
#3

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");
Reply
#4

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

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

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);
Reply
#6

Same error on the same line?
Reply
#7

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.
Reply
#8

Hmm, But I have seen it in a server ..
Reply
#9

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

Ah well thanks for helping
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)