SA-MP Forums Archive
Staffpin problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Staffpin problem (/showthread.php?tid=564409)



Staffpin problem - TiXz0r - 21.02.2015

I have the password 1234 , but can enter any password and I did not kicked for entering wrong password.



Код:
        if(dialogid == DIALOG_STAFFPIN)
        {
            if ( !response ) return Kick ( playerid );
            if( response )
            {
                if(strcmp(inputtext,PlayerInfo[playerid][pStaffPin],true))
                {
                if (PlayerInfo[playerid][pAdmin] >= 1 && PlayerInfo[playerid][pAdmin] <= 4)
			    {
				new aloginstring[128];
				format(aloginstring,sizeof aloginstring,""COL_PURPLE"[SERVER]: "COL_GREY"Admin [%d]%s se ulogirao.", playerid, GetName(playerid));
				SendMessageToAdmins(COLOR_WHITE,aloginstring);
				}
	  			if (PlayerInfo[playerid][pAdmin] == 5)
				{
				new aloginstring[128];
				format(aloginstring,sizeof aloginstring,""COL_PURPLE"[SERVER]: "COL_GREY"Head Admin [%d]%s se ulogirao.", playerid, GetName(playerid));
				SendMessageToAdmins(COLOR_WHITE,aloginstring);
				}
				if (PlayerInfo[playerid][pAdmin] == 6)
				{
				new aloginstring[128];
				format(aloginstring,sizeof aloginstring,""COL_PURPLE"[SERVER]: "COL_GREY"Administrator [%d]%s se ulogirao.", playerid, GetName(playerid));
				SendMessageToAdmins(COLOR_WHITE,aloginstring);
				}
                }
				else
                {
                SetTimerEx("KickTime", 1000, false, "i", playerid);
                }
                return 1;
            }
     }



Re: Staffpin problem - TiXz0r - 21.02.2015

anyone?


Re: Staffpin problem - Extremo - 21.02.2015

Please read the return parameters of strmp:

Strcmp

You'll notice your error in the return parameters.