Help with IsPlayerInVehicle - 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: Help with IsPlayerInVehicle (
/showthread.php?tid=125641)
Help with IsPlayerInVehicle -
Fedee! - 04.02.2010
Im making a tunning menu, and I need to check if the player is in a correct vehicle id... model.. (sorry, my bad
![Sad](images/smilies/sad.gif)
)
So,, how can I make it?
Thanks
Re: Help with IsPlayerInVehicle -
mansonh - 04.02.2010
Seriously?
https://sampwiki.blast.hk/wiki/IsPlayerInVehicle
Re: Help with IsPlayerInVehicle -
Fedee! - 04.02.2010
Quote:
Originally Posted by mansonh
|
No.. you dint understand...
Im making a tunning menu, and I need to check if its a Low Co. Car, Wheel Arch Car or a Transfender Car by the model id.
Re: Help with IsPlayerInVehicle -
mansonh - 04.02.2010
As far as I know there isn't a function to determine that.
You will have to either make or borrow a list (probably one in someones released script).
Re: Help with IsPlayerInVehicle -
Fedee! - 05.02.2010
Bump!
Re: Help with IsPlayerInVehicle -
Niixie - 05.02.2010
Make a some functions that tells the script that if the player is in vehiclemodel blablabla its a lowrider and it will show menu 1 and so on.
Its not that hard?
Think logical
Re: Help with IsPlayerInVehicle -
Fedee! - 05.02.2010
Quote:
Originally Posted by Niixie
Make a some functions that tells the script that if the player is in vehiclemodel blablabla its a lowrider and it will show menu 1 and so on.
Its not that hard?
Think logical
|
That is my point, but I dont know the function.
I was thinking:
Quote:
case 0:
{
new vehicleid = GetPlayerVehicleID(playerid);
if(IsPlayerInVehicle(playerid, vehicleid))
{
//Here should go the check model id, and depending on which model is, another menu comes up.
}
|
Re: Help with IsPlayerInVehicle -
mansonh - 06.02.2010
Quote:
Originally Posted by Fedee!
Quote:
Originally Posted by Niixie
Make a some functions that tells the script that if the player is in vehiclemodel blablabla its a lowrider and it will show menu 1 and so on.
Its not that hard?
Think logical
|
That is my point, but I dont know the function.
I was thinking:
Quote:
case 0:
{
new vehicleid = GetPlayerVehicleID(playerid);
if(IsPlayerInVehicle(playerid, vehicleid))
{
//Here should go the check model id, and depending on which model is, another menu comes up.
}
|
|
Exactly, now you just need to make a listing of all vehicle mods, and what type of garage they use, could just create yourself a simple array
new VehicleModelModType[212];(400+index = vehicle type)
and put 0,1,2,3 0-non 1-trans 2-arch 3-lowride