Still need help on checking if a player is in a vehicle - 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)
+--- Thread: Still need help on checking if a player is in a vehicle (
/showthread.php?tid=328996)
Still need help on checking if a player is in a vehicle -
NewerthRoleplay - 26.03.2012
Hi can i get the proper usage of the function which will check whether or not a player is inside a vehicle, obviously not the server side ID but the actual vehicle model.
Will reply when i can as watching Fulham play agains Man Utd :P
Re: Still need help on checking if a player is in a vehicle -
yugecin - 26.03.2012
Quote:
Originally Posted by NewerthRoleplay
Hi can i get the proper usage of the function which will check whether or not a player is inside a vehicle, obviously not the server side ID but the actual vehicle model.
Will reply when i can as watching Fulham play agains Man Utd :P
|
pawn Код:
if(IsPlayerInAnyVehicle(playerid)) {
new vModel = GetVehicleModel(GetPlayerVehicleID(playerid));
}
This should work.
Re: Still need help on checking if a player is in a vehicle -
NewerthRoleplay - 26.03.2012
what about specifically in the vehicle model 414
Re: Still need help on checking if a player is in a vehicle -
MP2 - 26.03.2012
pawn Код:
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 414)
{
// Do stuff
}
Re: Still need help on checking if a player is in a vehicle -
NewerthRoleplay - 26.03.2012
Quote:
Originally Posted by MP2
pawn Код:
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 414) { // Do stuff }
|
Thank you kindly