SA-MP Forums Archive
Wanted + - 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: Wanted + (/showthread.php?tid=293257)



Wanted + - Dripac - 27.10.2011

If cop types /su Playerid Reason it gives to player 1 wanted level, but i want also that the player also always gets +1 yellow star

pawn Код:
if(WantedPoints[giveplayerid] == 0) { WantedPoints[giveplayerid] = 1; }
                            else { WantedPoints[giveplayerid]+= 1; }
                            SetPlayerWantedLevel(playerid, +=1); <===== This should give the star, But i get errors
                            SetPlayerCriminal(giveplayerid,playerid, result);
                            PlayCrimeReportForPlayer(playerid, giveplayerid, 15);



Re: Wanted + - woot - 27.10.2011

pawn Код:
SetPlayerWantedLevel(giveplayerid, GetPlayerWantedLevel(giveplayerid) + 1);



Re: Wanted + - FUNExtreme - 27.10.2011

pawn Код:
WantedPoints[giveplayerid]+= 1; //It doesn't matter if WantedPoints is 0 or not. +1 will do the same as setting it from 0 to 1, then from 1 to 2, etc
SetPlayerWantedLevel(playerid, WantedPoints[giveplayerid]); //You have a variable, might as well use it
SetPlayerCriminal(giveplayerid,playerid, result);
PlayCrimeReportForPlayer(playerid, giveplayerid, 15);
There you go


Re: Wanted + - Dripac - 27.10.2011

Thanks