Dialog Not Showing [REP ++]
#1

Hi All.I need help with Dialog becouse he dont showing :/ I maked a Login/Register system with Timers..

Code:

The Timer

pawn Код:
//-----------------------------------------------
forward LoginTimer(playerid, classid);
public LoginTimer(playerid, classid)
{
//-----------------
    if (RegistrationStep[playerid] == 0 && gPlayerLogged[playerid] != 1 && IsPlayerNPC(playerid) !=1)
    {
        ClearChatbox(playerid, 20);
        if (gPlayerAccount[playerid] != 0)
        {
            new loginstring[512];
            new loginname[64];
            GetPlayerName(playerid,loginname,sizeof(loginname));
            format(loginstring, sizeof(loginstring), "{FFFFFF}Dobrodojdovte Gospodine %s\n{0080FF}>{FFFFFF}Vasiot akaunt e registriran i e uspesno vcitan zatoa ve molime\nvnesete ja vasata lozinka za da se logirate na vasiot akaunt\n\n", loginname);
            strcat(loginstring, "{0080FF}>{FFFFFF}Otkako ke se logirate ne zaboravajte na RP Pravilata\nkoj treba da gi pocituvate vo sprotivno ke sleduvaat\nkazni od Admin/GM timot sto e nadlezen zatoa\n\n");
            strcat(loginstring, "{0080FF}>{FFFFFF}DreamCast Gaming vi posakuva mnogu zabava i druzenje\n");
            strcat(loginstring, "{0080FF}>{FFFFFF}Dokolku imate nekoj problem posetete {FFFF00}www.dreamcast-game.tk");
            ShowPlayerDialog(playerid, 12346,DIALOG_STYLE_PASSWORD,"{FF4242}Logiranje",loginstring,"Ok","Izlez");
        }
        else
        {
            gPlayerAccount[playerid] = 0;
            new regstring[512];
            new regname[64];
            GetPlayerName(playerid,regname,sizeof(regname));
            format(regstring, sizeof(regstring), "{FFFFFF}Dobrodojdovte Gospodine %s\n{0080FF}>{FFFFFF}Vasiot akaunt ne registriran i ne e uspesno vcitan zatoa ve molime\nvnesete ja vasata lozinka za da go registrirate vasiot akaunt\n\n", regname);
            strcat(regstring, "{0080FF}>{FFFFFF}Otkako ke se registrirate ne zaboravajte na RP Pravilata\nkoj treba da gi pocituvate vo sprotivno ke sleduvaat\nkazni od Admin/GM timot sto e nadlezen zatoa\n\n");
            strcat(regstring, "{0080FF}>{FFFFFF}DreamCast Gaming vi posakuva mnogu zabava i druzenje\n");
            strcat(regstring, "{0080FF}>{FFFFFF}Dokolku imate nekoj problem posetete {FFFF00}www.dreamcast-game.tk");
            ShowPlayerDialog(playerid, 12346,DIALOG_STYLE_PASSWORD,"{FF4242}Registracija",regstring,"Ok","Izlez");
        }
        PlayerPlaySound(playerid, 1187, 0.0, 0.0, 0.0);
        PlayerInfo[playerid][pModel] = Peds[classid][0];
        SetPlayerTeamFromClass(playerid,classid);
    } else SpawnPlayer(playerid);
    return 1;
}
OnPlayerRequestClass

pawn Код:
//-----------------------------------------------
public OnPlayerRequestClass(playerid, classid)
{
    PlayerPlaySound(playerid, 1067, 0.0, 0.0, 0.0);
    SetTimer("LoginTimer", 7000, 0);
    new RandomStart;
    RandomStart = random(2);
    switch(RandomStart)
    {
        case 0:
        {
         InterpolateCameraPos(playerid, 1167.263549, -953.536621, 44.003799, 1238.583618, -933.317016, 41.953529, 10000, 1);
         InterpolateCameraLookAt(playerid, 1168.216918, -953.339111, 43.775718, 1242.507446, -932.542785, 41.891162, 10000, 1);
         PlayerInfo[playerid][pInt] = 0;
         SetPlayerInterior(playerid, 0);
         SetPlayerPos(playerid, 1134.3859,-910.9868,62.9894);
        }
        case 1:
        {
         InterpolateCameraPos(playerid, 1291.788452, -807.976135, 88.962501, 1248.348632, -804.083923, 98.385025, 3000, 1);
         InterpolateCameraLookAt(playerid, 1291.308471, -808.819519, 89.203948, 1244.513427, -803.718261, 99.460784, 3000, 1);
         PlayerInfo[playerid][pInt] = 0;
         SetPlayerInterior(playerid, 0);
         SetPlayerPos(playerid, 1134.3859,-910.9868,62.9894);
         }
     }
     return 1;
  }
But passing 100+ seconds and showing dialog Why ? :/ REP !
Reply
#2

Set:

pawn Код:
RegistrationStep[playerid] = 0;
Before timer in OnPlayerRequestClass.

Just, make sure that, this statement is passed:
pawn Код:
if (RegistrationStep[playerid] == 0 && gPlayerLogged[playerid] != 1 && IsPlayerNPC(playerid) !=1)
Reply
#3

i maked if(RegistrationStep[playerid] == 0)
{
...

Its ok ?
Reply
#4

Did you read my post? Make sure, that your if statement is passed. So your RegistrationStep array must be equal to 0, gPlayerLogged array must be different than 1 and Player can't be NPC.
Reply
#5

FIXEED THANKS BROOOOO <3333
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)