help| not working
#1

no error + no work


in game no metter if i putt correct password or uncorrect its give me kick



PHP код:
        if(dialogid == logind)
        {
            if(!
response)
            {
                
ShowPlayerDialog(playeridlogindDIALOG_STYLE_INPUT"Login""You Muyst Enter Password To Login \nPlease Enter Pass""Login""Leave");
                return 
1;
                }
                if(
strlen(inputtext) > 15 || strlen(inputtext) < 5)
            {
                
SCM(playeridCOLOR_RED"ERROR: Lenght Must Be 5-25");
                
ShowPlayerDialog(playeridlogindDIALOG_STYLE_INPUT"Login""You Muyst Enter Password To Login \nPlease Enter Pass""Login""Leave");
                return 
1;
                }
                new 
tmp;
                
tmp dini_Int(file"Password");
            if(
strcmp(inputtext) != tmp)
            {
                
SCM(playeridCOLOR_RED"ERROR: Wrong Password!! bye");
                
Kick(playerid);
                
logged[playerid] = 0;
                }
            else
            {
                
logged[playerid] = 1;
                
SCM(playeridCOLOR_YELLOW" You Seccessfull logged");
                return 
1;
            }
            } 
Reply
#2

Change
pawn Код:
if(strcmp(inputtext) != tmp)
{
    SendClientMessage(playerid, COLOR_RED, "ERROR: Wrong Password!! bye");
    Kick(playerid);
    logged[playerid] = 0;
}
to
pawn Код:
if(strcmp(inputtext) != tmp)
{
    SendClientMessage(playerid, COLOR_RED, "ERROR: Wrong Password!! bye");
    Kick(playerid);
    logged[playerid] = 0;
    return 1; // if you don't add this, it tells the script to keep going into anything else within the function
}
Reply
#3

PHP код:
            if(strcmp(inputtext) != tmp
PHP код:
 warning 202number of arguments does not match definition 
and no metter if password correct or not its say login succesfull
and why if i do spawn its spawn with the dialog(bifor im done to put password);
Reply
#4

please help
Reply
#5

pawn Код:
if(strval(inputtext) != tmp)
You get an Integer (dini_INT) so you have to compare the value of the variables (strval).
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)