Trailer Attachs - 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: Trailer Attachs (
/showthread.php?tid=595495)
Trailer Attachs -
Alpay0098 - 03.12.2015
Hi community,
Is there any way for detecting if a truck (Vehicle ID : 403) attaches a trailer (Vehicle ID : 584) ?
Re: Trailer Attachs -
CmZxC - 03.12.2015
Do you mean once he's attaching it or if he has it already attached?
PHP код:
public OnTrailerUpdate(playerid, vehicleid)
{
new id_veh = GetPlayerVehicleID(playerid);
if(GetVehicleModel(id_veh) == 403 && GetVehicleTrailer(id_veh) == 584)
{
// he done did it
}
return 1;
}
Re: Trailer Attachs -
Alpay0098 - 04.12.2015
PHP код:
public OnTrailerUpdate(playerid, vehicleid)
{
new id_veh = GetPlayerVehicleID(playerid);
if(GetVehicleModel(id_veh) == 403 && GetVehicleTrailer(id_veh) == 584 && PlayerInfo[playerid][pJob] == 19)
{
SendClientMessage(playerid, COLOR_RED, "IT WORKS!");
}
return 1;
}
I've tried something like this, but didn't work ...
Maybe I had to use AttachTrailerToVehicle but I don't know where to start ...
Re: Trailer Attachs -
Alpay0098 - 05.12.2015
Bump
Re: Trailer Attachs -
Alpay0098 - 08.12.2015
Sorry but Bump again