vehicle id 401..416 works? -
Stefand - 06.08.2013
Hello,
As the title states, does that work?
Vehicle ID 401 till 416 will be wroten down by server then?
like this:
pawn Код:
new SpawnVehicles[][1]= {401..416, 418..424, 426..429, 431, 433};
so I can set in all vehicles except helicopters and boats?
Re: vehicle id 401..416 works? -
ThaCrypte - 06.08.2013
yes, i saw script having it.
Re: vehicle id 401..416 works? -
Stefand - 06.08.2013
Alright thanks, then I will continue selecting vehicles :P Wanted to know if it would work before wasting time :P
Re: vehicle id 401..416 works? -
Stefand - 06.08.2013
Oh lol I just tried to compile it
Код:
error 001: expected token: ";", but found ".."
Any way I can do it different?
Re: vehicle id 401..416 works? -
morocco - 06.08.2013
i think you can't use " .. "
pawn Код:
new SpawnVehicles[][1]= {401, 402, 403, 405,/*...*/ 416, 418, 424, 426, 429, 431, 433};
Re: vehicle id 401..416 works? -
Black Wolf - 06.08.2013
I think .. can only be used in switch case statements.Here you need to define all of those. example 418 to 424 manually
AW: vehicle id 401..416 works? -
NaS - 06.08.2013
No, "..." can be used to continue a row, like:
new Var[MAX_PLAYERS] = {(-1), ...};
This will set every Slot in "Var" to (-1). You can also do {1, 3, ...};, this will make them 1, 3, 1, 3 etc.
".." is only for the switch/case statement.
But there is no use for you in this specific case.
Re: AW: vehicle id 401..416 works? -
Black Wolf - 06.08.2013
Quote:
Originally Posted by NaS
No, "..." can be used to continue a row, like:
new Var[MAX_PLAYERS] = {(-1), ...};
This will set every Slot in "Var" to (-1). You can also do {1, 3, ...};, this will make them 1, 3, 1, 3 etc.
But there is no use for you in this specific case.
|
Oh yea while replying i forgot about that.Anyways thanks for reminding.
Re: vehicle id 401..416 works? -
Stefand - 06.08.2013
Well oke :P thanks, I will find a way to do so
AW: vehicle id 401..416 works? -
NaS - 06.08.2013
If you only want cars (no helis, planes, boats, trailers) there is a function "GetVehicleModelType" around here.
I can PM it to you, if you want.