SA-MP Forums Archive
On Dialog : 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: On Dialog : Problem.. (/showthread.php?tid=138626)



On Dialog : Problem.. - g@k - 02.04.2010

Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	if(dialogid == KEY_WALK*DIALOG_STYLE_LIST)
	{
		if(response) if(!SpawnVehicleForPlayer(playerid,strval(inputtext))) return SendClientMessage(playerid,0xAA3333AA,"Message");
		if(!response) OnPlayerCommandText(playerid,"/v");
	}
	if(dialogid == KEY_ANALOG_UP+DIALOG_STYLE_INPUT)
	{
	  
	  if(response) if(!SpawnVehicleForAll(strval(inputtext))) SendClientMessage(playerid,0xAA3333AA,"Message");
		if(!response) OnPlayerCommandText(playerid,"/vall");
		new estr[128];
		GetPlayerName(playerid,estr,128);
		format(estr,128,"Message",estr);
		SendClientMessageToAll(0xAA3333AA,estr);
	}
	return 1;
}
How to insert this:

Code:
if(strval(inputtext) == 523|524)