Another problem with dialogs - 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: Another problem with dialogs (
/showthread.php?tid=215506)
Another problem with dialogs -
Face9000 - 23.01.2011
Ok,in my last topic i've fixed dialogs problem,but now i've another.
pawn Код:
if(listitem == 1) // Suck
{
if(GetPlayerScore(playerid) < 90) //if dont have 90 score
{
SendClientMessage(playerid,0xFF0000AA,"90 score needed.");
return 0;
}
else if(GetPlayerScore(playerid) > 90) //if he have
{
SetPlayerArmour(playerid, 100.0);
GivePlayerWeapon(playerid, 35, 5);
}
}
The problem is: When i click on this and i've -90 score,i cant use it (it's normal),but it closes the dialog.
How to,when a player cant use this dialog,it will return to dialog menu?
Re: Another problem with dialogs -
Think - 23.01.2011
redo the ShowPlayerDialog code before you return it.
IE:
pawn Код:
if(GetPlayerScore(playerid) < 90) //if dont have 90 score
{
SendClientMessage(playerid,0xFF0000AA,"90 score needed.");
ShowPlayerDialog(playerid, /* ... */);
return 0;
}
Re: Another problem with dialogs -
Mike Garber - 23.01.2011
Note that listitem starts with 0, so the first one is 0, second one 1, but If you already knew that do as him above.
I'd also like to mention the other code wont work, It will only work if you have 91 or more in score, as
> 90 means MORE then 90.
So do it >= 90 . (means 90 OR higher)
Re: Another problem with dialogs -
Face9000 - 23.01.2011
Thanks both.