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



WantedLevel Problem - Cr3dO - 23.03.2015

if(listitem == 2)
{
new wanti;
wanti = GetPlayerWantedLevel(playerid);
format(string,sizeof(string),"%d wanted level:", wanti);
ShowPlayerDialog(playerid,atm,DIALOG_STYLE_INPUT," Bail", string,"ok","cancel");
}
if(!IsNumeric(inputtext))
{
}
else
{
new nxtprice = GetPlayerWantedLevel(playerid)+1; //
new expamountprice = nxtprice*price1;
GivePlayerMoney(playerid, -expamountprice);
SetPlayerWantedLevel(playerid, -strval(inputtext));
}
}
return 1;
}
When you want to pay only 1 offense it gives me 255 and I want 2 or more to work properly.


Re: WantedLevel Problem - SickAttack - 23.03.2015

Could you explain the issue clearly?


Re: WantedLevel Problem - Cr3dO - 24.03.2015

I want to pay a wanted level, but gives me 255 wanted level help meee pleaseee


Re: WantedLevel Problem - SickAttack - 24.03.2015

Try this:
pawn Код:
SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid) - strval(inputtext));



Re: WantedLevel Problem - Cr3dO - 24.03.2015

thanks man. I price 1 is 10000 and is multiplied by each example 1 wanted level price 10000 2 20000 3 30000 4 4000