vehicle id 401..416 works?
#1

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?
Reply
#2

yes, i saw script having it.
Reply
#3

Alright thanks, then I will continue selecting vehicles :P Wanted to know if it would work before wasting time :P
Reply
#4

Oh lol I just tried to compile it

Код:
error 001: expected token: ";", but found ".."
Any way I can do it different?
Reply
#5

i think you can't use " .. "

pawn Код:
new SpawnVehicles[][1]= {401, 402, 403, 405,/*...*/ 416, 418, 424, 426, 429, 431, 433};
Reply
#6

I think .. can only be used in switch case statements.Here you need to define all of those. example 418 to 424 manually
Reply
#7

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.
Reply
#8

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.
Reply
#9

Well oke :P thanks, I will find a way to do so
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)