OnPlayerEnterVehicle Question... - 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: OnPlayerEnterVehicle Question... (
/showthread.php?tid=162899)
OnPlayerEnterVehicle Question... -
Ash. - 25.07.2010
Does
pawn Код:
OnPlayerEnterVehicle(playerid, vehicleid)
work for attaching a trailer? Although the player isnt actually entering the trailer? The 'vehicleid' is connecting to it. Thus "entering" another vehicle.
Is this correct?
Thanks
Ash
Re: OnPlayerEnterVehicle Question... -
selten98 - 25.07.2010
pawn Код:
IsTrailerAttachedToVehicle(vehicleid)
is what you use to check if it is attached
Re: OnPlayerEnterVehicle Question... -
Ash. - 25.07.2010
I know, but can i use it like;
pawn Код:
public IsTrailerAttachedToVehicle(vehicleid)
{
}
?
Thats what im looking for
Thanks
Ash
Re: OnPlayerEnterVehicle Question... -
selten98 - 25.07.2010
what do you want IsTrailerAttachedToVehicle to do??
Re: OnPlayerEnterVehicle Question... -
Ash. - 25.07.2010
Quote:
Originally Posted by selten98
what do you want IsTrailerAttachedToVehicle to do??
|
Something like this: But should i run "IsTrailerAttachedToVehicle" through a timer to check it every "something" seconds.
I want it to do something like this:
pawn Код:
if (IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)) == 1)
{
if (GetVehicleModel(GetVehicleTrailer(GetPlayerVehicleID(playerid))) == 591)
{
//Set some checkpoints, send some client text and whatever else.
}
}