22.05.2013, 01:51
Hello.
In your section of code, you just need to replace all copies of siren1 with siren1[vid] and siren2 with siren2[vid].
I'm assuming the cell in each array you want to reference is the vehicle ID of the vehicle you are attaching the siren to.
Explanation:
Your variables siren1 and siren2 are arrays. They can store multiple values.
Here you have said that they can store 1 value for every vehicle you can create by stating their size between the [ and ] to MAX_VEHICLES.
In your section of code, you have used these two variables without specifying what cell you are referencing.
So instead of doing:
You have done:
In your section of code, you just need to replace all copies of siren1 with siren1[vid] and siren2 with siren2[vid].
I'm assuming the cell in each array you want to reference is the vehicle ID of the vehicle you are attaching the siren to.
Explanation:
Your variables siren1 and siren2 are arrays. They can store multiple values.
Here you have said that they can store 1 value for every vehicle you can create by stating their size between the [ and ] to MAX_VEHICLES.
In your section of code, you have used these two variables without specifying what cell you are referencing.
So instead of doing:
pawn Код:
siren1[Put the cell ID here]
//e.g.
siren1[0]
siren1[102]
siren2[340]
pawn Код:
siren1
siren2

