adding numbers to array - 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: adding numbers to array (
/showthread.php?tid=71122)
adding numbers to array -
StrickenKid - 30.03.2009
i want to make it so when a civilian player enters a new vehicle they haven't entered before, it gives them + 1 wanted level but i got to to work only from 1 car-id at a time, for example if i get in a fcr, wl +1. Then i get out and back in. wl stays. but then i get in a stretch and back in fcr, wl goes up. I want it to be able to save an array of ids so i can get into the fcr, out and into the stretch, out and back into fcr without wanted level going up again.
right now i got:
new lastcar[max_players];
..
...
....
lastcar[playerid] = vehicleid
then when i get in another it will override last id with new one. I want it to add on so if player gets in both wl stays the same. if that makes scene...
Any Help?