Question - 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: Question (
/showthread.php?tid=377078)
Question -
Ectazy - 12.09.2012
Hi all, I nedd help. I have this stock:
Quote:
stock CarModelToArray(modelid)
{
new arraynum = modelid - 400;
return arraynum;
}
|
And this code:
Код:
new Float:Policelight[][]={
{ X, Y, Z},
{ X, Y, Z},
{ X, Y, Z}
I want to Attach police light on all models with coordinates, except 417,425, 447 models. What do I need to change?
Re: Question -
BadgerLedger - 12.09.2012
if(GetVehicleModel(vehicleid) != 417 || GetVehicleModel(vehicleid) != 425 || if(GetVehicleModel(vehicleid) != 447)
you can figure out where to add it yourself its not that hard
Re: Question -
HairStyle - 12.09.2012
pawn Код:
new ExceptVeh[] = {417,425,447};
for (new x = 0; x < sizeof(ExceptVeh); x++) {
if(GetVehicleModel(vehicleid) == ExceptVeh[x]) {
}
}
Re: Question -
Ectazy - 13.09.2012
Quote:
Originally Posted by HairStyle
pawn Код:
new ExceptVeh[] = {417,425,447};
for (new x = 0; x < sizeof(ExceptVeh); x++) { if(GetVehicleModel(vehicleid) == ExceptVeh[x]) { } }
|
Where put it
Re: Question -
Ectazy - 14.09.2012
Bump.
Re: Question -
Riddick94 - 14.09.2012
In your ass.. oh my god, learn a little scripting language basics!
Put 'new' variable at the top of your script, and for loop put in the stock/public with vehicleid parameter.