Need help at AttachTrailerToVehicle. - 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: Need help at AttachTrailerToVehicle. (
/showthread.php?tid=170697)
Need help at AttachTrailerToVehicle. -
CoaPsyFactor - 23.08.2010
i want to when spawn trailer to attach it, this is code
pawn Код:
if(TakeTruck[playerid] == 1){
TakeTruckAttach[playerid] = CreateVehicle(450, 379.993804, 2542.577636, 16.539062, 163.325531, 0, 1, -1);
AttachTrailerToVehicle(TakeTruckAttach[playerid], GetPlayerVehicleID(playerid));
}
it create that vehicle but it doesn't attach on mine truck.
Re: Need help at AttachTrailerToVehicle. -
Vince - 23.08.2010
From wiki:
Important Note: Will only work if both vehicles are streamed in.
Re: Need help at AttachTrailerToVehicle. -
CoaPsyFactor - 24.08.2010
what they mean with streamed in, i created it and it doesn't attach it, i tried to put attach in onvehiclespawn but still not working
Re: Need help at AttachTrailerToVehicle. -
CoaPsyFactor - 24.08.2010
sorry for double post, but here is what i done in onvehiclespawn
pawn Код:
public OnVehicleSpawn(vehicleid)
{
new i;
for(i = 0; i<MAX_PLAYERS; i++){
if(TakeTruck[i] == 1){
if(vehicleid == TakeTruckAttach[i]){
AttachTrailerToVehicle(TakeTruckAttach[i], GetPlayerVehicleID(i));
}
}
}
return 1;
}
Re: Need help at AttachTrailerToVehicle. -
Steven82 - 25.08.2010
What it means! is it will only work with the
"https://sampwiki.blast.hk/wiki/AddStaticVehicle" "https://sampwiki.blast.hk/wiki/AddStaticVehicleEx"
Re: Need help at AttachTrailerToVehicle. -
CoaPsyFactor - 02.01.2011
oh, thanks ;]