#1

why isn't working the input ?
y typed other numbers of pPinKod and isn't working, if my pinkod is 2222 and me type 1111, succes is why ?
how to create on the pPinKod, if the player haves pPinKod 2222 to enter only 2222 and other to kick him ?
Код:
  if(dialogid == 136)
  {
		if(response)
        {
         {
         if(strval(inputtext) == PlayerInfo[playerid][pPinKod])
         {
           SendClientMessage(playerid,COLOR_WHITE,"INFO:Uspesno se logiravte na Admin Panelot.");
         }
		if(PlayerInfo[playerid][pAdmin] >= 1337)
		{
		   SendClientMessage(playerid, COLOR_RED, "HELLO :) ");
           //ShowPlayerDialog(playerid, 137, DIALOG_STYLE_INPUT,"Head Panel","Vnesete go Pinot na Head Panelot!","Ok","Izlezi");
        }
        else
        {
           SendClientMessage(playerid,COLOR_GREY,"GRESKA:Pogresna lozinka.");
		   Kick(playerid);
           return 1;
        }
     }
   }
}
Reply
#2

pawn Код:
if(strval(inputtext) == PlayerInfo[playerid][pPinKod]) // if's  PlayerInfo[playerid][pPinKod] is string, youuse:

if(!strcmp(inputtext, PlayerInfo[playerid][pPinKod]))
#edit:
Use debugger:
pawn Код:
if(dialogid == 136)
  {
        if(response)
        {
         {  
         printf("%d | %d ",  strval(inputtext), PlayerInfo[playerid][pPinKod])
         if(strval(inputtext) == PlayerInfo[playerid][pPinKod])
         {
           SendClientMessage(playerid,COLOR_WHITE,"INFO:Uspesno se logiravte na Admin Panelot.");
         }
        if(PlayerInfo[playerid][pAdmin] >= 1337)
        {
           SendClientMessage(playerid, COLOR_RED, "HELLO :) ");
           //ShowPlayerDialog(playerid, 137, DIALOG_STYLE_INPUT,"Head Panel","Vnesete go Pinot na Head Panelot!","Ok","Izlezi");
        }
        else
        {
           SendClientMessage(playerid,COLOR_GREY,"GRESKA:Pogresna lozinka.");
           Kick(playerid);
           return 1;
        }
     }
   }
}
Running this and reply what appers in sever.log.
Reply
#3

26 erors :@
Reply
#4

Quote:
Originally Posted by 3RoR
Посмотреть сообщение
26 erors :@
Quote:
Originally Posted by [Full]Garfield[XDB]
Посмотреть сообщение
Use debugger:
pawn Код:
if(dialogid == 136)
  {
        if(response)
        {
         {  
         printf("%d | %d ",  strval(inputtext), PlayerInfo[playerid][pPinKod])
         if(strval(inputtext) == PlayerInfo[playerid][pPinKod])
         {
           SendClientMessage(playerid,COLOR_WHITE,"INFO:Uspesno se logiravte na Admin Panelot.");
         }
        if(PlayerInfo[playerid][pAdmin] >= 1337)
        {
           SendClientMessage(playerid, COLOR_RED, "HELLO :) ");
           //ShowPlayerDialog(playerid, 137, DIALOG_STYLE_INPUT,"Head Panel","Vnesete go Pinot na Head Panelot!","Ok","Izlezi");
        }
        else
        {
           SendClientMessage(playerid,COLOR_GREY,"GRESKA:Pogresna lozinka.");
           Kick(playerid);
           return 1;
        }
     }
   }
}
Running this and reply what appers in sever.log.

You can do ?
Reply
#5

now no error found but when y type 1(my pin kod is 1111)y can login without my pin 1111 :@ ?
Reply
#6

pawn Код:
if(dialogid == 136) {
    if(response)
        {
        if( (strval(inputtext) == PlayerInfo[playerid][pPinKod]))
                {
                    SendClientMessage(playerid,COLOR_WHITE,"INFO:Uspesno se logiravte na Admin Panelot."); return 1;
                }
        if(PlayerInfo[playerid][pAdmin] >= 1337)
        {
            SendClientMessage(playerid, COLOR_RED, "HELLO :) ");
           //ShowPlayerDialog(playerid, 137, DIALOG_STYLE_INPUT,"Head Panel","Vnesete go Pinot na Head Panelot!","Ok","Izlezi");
            }
            else
            {
                SendClientMessage(playerid,COLOR_GREY,"GRESKA:Pogresna lozinka.");
            Kick(playerid);
                return 1;
            }
        }
   }
Reply
#7

isn't working and that :@
Reply
#8

Try this:
pawn Код:
if(dialogid == 136)
    {
        if(response)
        {
            if(!(strval(inputtext) == PlayerInfo[playerid][pPinKod]))
            {
                SendClientMessage(playerid,COLOR_WHITE,"INFO:Uspesno se logiravte na Admin Panelot.");
                return false;
            }
            if(PlayerInfo[playerid][pAdmin] >= 1337)
            {
                SendClientMessage(playerid, COLOR_RED, "HELLO :) ");
           //ShowPlayerDialog(playerid, 137, DIALOG_STYLE_INPUT,"Head Panel","Vnesete go Pinot na Head Panelot!","Ok","Izlezi");
            }
            else
            {
                SendClientMessage(playerid,COLOR_GREY,"GRESKA:Pogresna lozinka.");
                Kick(playerid);
                return 1;
            }
        }
    }
   
}
Reply
#9

pawn Код:
if(dialogid == 136) {
    if(!response) return 1;
    new pass = strval(inputtext);
    new playerPass = PlayerInfo[playerid][pPinKod];
    if( pass == playerPass)
    {
        SendClientMessage(playerid,COLOR_WHITE,"INFO:Uspesno se logiravte na Admin Panelot.");
        if(PlayerInfo[playerid][pAdmin] >= 1337) SendClientMessage(playerid, COLOR_RED, "HELLO :) ");
        return 1;
    }
    else {
           
        SendClientMessage(playerid,COLOR_GREY,"GRESKA:Pogresna lozinka.");
        Kick(playerid);
        return 1;
    }
}
Is that?
Reply
#10

YES,Thanks Very Much <3 !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)