[Solved] Looking for function..
#1

Is there any posted function in these forums that checks if vehicle is... boat?
I mean if vehicle is water vehicle....
Didn't found in Useful Functions, but i think I saw it somewhere here...
Reply
#2

Search. There's alot.
Reply
#3

Quote:
Originally Posted by MenaceX^
Search. There's alot.
Could you tell me how do you call water vehicles in English? Or they're just called water vehicles ?
Reply
#4

Quote:
Originally Posted by Justas [SiJ
]
Could you tell me how do you call water vehicles in English? Or they're just called water vehicles ?
watercrafts
Reply
#5

Quote:
Originally Posted by saiberfun
Quote:
Originally Posted by Justas [SiJ
]
Could you tell me how do you call water vehicles in English? Or they're just called water vehicles ?
watercrafts
Lol? Really?

A boat would be the best thing to define them, although some non boats go onw ater such as hovercrafts and certain planes/holicopters.
Reply
#6

pawn Код:
forward IsABoat(modelid);
pawn Код:
public IsABoat(modelid)
{
    if(modelid==472 || modelid==473 || modelid==493 || modelid==495 || modelid==484 || modelid==430 || modelid==453 || modelid==452 || modelid==446 || modelid==454)
    {
        return 1;
    }
    return 0;
}
Use GetVehicleModel() to get the model ID.
Reply
#7

Gergo1352 beat me to it
Reply
#8

I don't know if there is difference, but I changed it a little:
pawn Код:
stock IsABoat(modelid)
{
  switch(modelid)
  {
        case 472, 473, 493, 495, 484 ,430, 453, 452, 446, 454: return 1;
    }
    return 0;
}
Reply
#9

Quote:
Originally Posted by Justas [SiJ
]
I don't know if there is difference, but I changed it a little:
It's quicker as a switch, that's the difference dude.
Reply
#10

And stock functions aren't placed in the function list, so all other public functions will go faster
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)