[Solved] Looking for function.. - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [Solved] Looking for function.. (
/showthread.php?tid=86519)
[Solved] Looking for function.. -
SiJ - 14.07.2009
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...
Re: Looking for function.. -
MenaceX^ - 14.07.2009
Search. There's alot.
Re: Looking for function.. -
SiJ - 14.07.2009
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 ?
Re: Looking for function.. -
saiberfun - 14.07.2009
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
Re: Looking for function.. -
NeRoSiS - 14.07.2009
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.
Re: Looking for function.. -
Gergo1352 - 14.07.2009
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.
Re: Looking for function.. -
[VL]Miklo - 14.07.2009
Gergo1352 beat me to it
Re: Looking for function.. -
SiJ - 15.07.2009
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;
}
Re: Looking for function.. -
Donny_k - 15.07.2009
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.
Re: [Solved] Looking for function.. -
Marcel - 15.07.2009
And stock functions aren't placed in the function list, so all other public functions will go faster