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: Problem with dialogs (
/showthread.php?tid=215410)
Problem with dialogs -
Face9000 - 23.01.2011
Ok,im making class dialogs and i need help.
pawn Код:
if(listitem == 1) // Suck
{
if(GetPlayerScore(playerid) < 90)
{
SendClientMessage(playerid, 0xFFFFFF, "Need 90score.");
return 0;
}
else if(GetPlayerScore(playerid) > 90)
{
SetPlayerArmour(playerid, 100.0);
}
}
What's wrong?I can choose this class even if i have 50 score :/
Re: Problem with dialogs -
Kase - 23.01.2011
pawn Код:
if(listitem == 1) // Suck
{
if(GetPlayerScore(playerid) > 90)
{
SendClientMessage(playerid, 0xFFFFFF, "Need 90score.");
return 0;
}
else if(GetPlayerScore(playerid) < 90)
{
SetPlayerArmour(playerid, 100.0);
}
}
Re: Problem with dialogs -
Not available - 23.01.2011
pawn Код:
if(listitem == 1) // Suck
{
if(GetPlayerScore(playerid) < 90) return SendClientMessage(playerid, 0xFFFFFF, "Need 90score.");
SetPlayerArmour(playerid, 100.0);
}
Edit: Somehow a character that wasn't suppose to be there, appeared. lol^
Re: Problem with dialogs -
Face9000 - 23.01.2011
Dont work both,i made this:
pawn Код:
if(listitem == 1) // Suck
{
if(GetPlayerScore(playerid) < 90) //If player dont have 90 score
{
SendClientMessage(playerid, 0xFFFFFF, "Need 90 score.");
return 0;
}
else if(GetPlayerScore(playerid) > 90) //If player has more than 90 score,he can choose.
{
SetPlayerArmour(playerid, 100.0);
}
}
}
return 1;
}
Re: Problem with dialogs -
Not available - 23.01.2011
If the code I gave you didn't work, are you sure that the score is even set correctly? I made a quick filterscript and it works like a charm for me.
Re: Problem with dialogs -
Face9000 - 23.01.2011
Yeah,it now works,i was needed to list item from 1.
Thanks.