SA-MP Forums Archive
Dialog Input 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Dialog Input Problem (/showthread.php?tid=240469)



Dialog Input Problem - hadzx - 15.03.2011

ok so i made a car dialog input password but if you type nothing and click the button "Enter" it says password correct? how can i fix this the only way i can think of is making it so the minium chars are like 1 please help


Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 67 && response == 1)
	{
	if(!strcmp(inputtext, "passwordtest", true))
	{
		SendClientMessage(playerid,0x33AA33AA,"Password Correct!");
		return 1;
    }
 	if(!strcmp(inputtext, "", true))
	{
		RemovePlayerFromVehicle(playerid);
		SendClientMessage(playerid,0x33AA33AA,"Password Incorrect!");
		return 1;
	}
	}
	else
	{
		RemovePlayerFromVehicle(playerid);
	}
	return 1;
}
ty