if(strcmp ....
#1

Hi, why -> if(strcmp(password, inputtext)) .... is not working ? Player give false password and is connecting?

PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == 2)
    {
        if(
response == 1)
        {
            
mysql_format(SqlGMsampsizeof(samp), "SELECT `password` FROM `players` WHERE `nick` LIKE BINARY `%s`"GetPlayerNick(playerid));
            
mysql_query(SqlGMsamptrue);
            
cache_get_field_content(0"password"password);
            if(
strcmp(passwordinputtext))
            {
                
format(sampsizeof(samp), ""RED"Wrong password!");
                
ShowPlayerDialog(playerid2DIALOG_STYLE_PASSWORD""ORANGE"Loging"samp""GREEN"next"""RED"back");
                return 
1;
            }
            else
            {
            
format(string,sizeof(string),""RED"[LOGING]: "WHITE" your password is correct!, account "GREEN" is connecting.");
            
SendClientMessage(playerid, -1string);
            
TogglePlayerSpectating(playerid0);
            
SpawnPlayer(playerid);
            }
        }
    }
... 
Reply


Messages In This Thread
if(strcmp .... - by Oficer - 20.09.2017, 14:50
Re: if(strcmp .... - by BiosMarcel - 20.09.2017, 14:55
Re: if(strcmp .... - by kAn3 - 20.09.2017, 14:59
Re: if(strcmp .... - by Deadpoop - 20.09.2017, 15:08
Re: if(strcmp .... - by n00blek - 20.09.2017, 15:23
Re: if(strcmp .... - by Oficer - 20.09.2017, 19:16
Re: if(strcmp .... - by Burridge - 20.09.2017, 20:11

Forum Jump:


Users browsing this thread: 2 Guest(s)