[Help] Problem with attachobject - 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: [Help] Problem with attachobject (
/showthread.php?tid=428848)
[Help] Problem with attachobject -
StreetboyBalkan - 07.04.2013
Hi,
I have a problem with function AttachObjectToVehicle.I attached object to a vehicle(for job forester) and I don't know how to deattach these object. I try "DestroyObject" but it's not working :/
Sorry for my bad english
Re: [Help] Problem with attachobject -
RenovanZ - 07.04.2013
Show the code, we're not wizards
Re: [Help] Problem with attachobject -
StreetboyBalkan - 07.04.2013
I think you don't need code for this,but...
Код:
new kamion = GetPlayerVehicleID(playerid);
new Float:Pos[4], Drvo[3];
GetPlayerPos(playerid, Float:Pos[0], Float:Pos[1], Float:Pos[2]);
GetPlayerFacingAngle(playerid, Float:Pos[3]);
Drvo[0] = CreateObject(684, 0.95640, -1.83480, 0.10720, 0.00000, 0.00000, 0.00000);
Drvo[1] = CreateObject(684, -0.08997, -1.85106, 0.10720, 0.00000, 0.00000, 0.00000);
Drvo[2] = CreateObject(684, -1.16990, -1.84940, 0.10720, 0.00000, 0.00000, 0.00000);
AttachObjectToVehicle(Drvo[0], kamion, 0.95640, -1.83480, 0.10720, 0.00000, 0.00000, 0.00000);
AttachObjectToVehicle(Drvo[1], kamion, -0.08997, -1.85106, 0.10720, 0.00000, 0.00000, 0.00000);
AttachObjectToVehicle(Drvo[2], kamion, -1.16990, -1.84940, 0.10720, 0.00000, 0.00000, 0.00000);
Re: [Help] Problem with attachobject -
StreetboyBalkan - 07.04.2013
BUMP!
Anybody know?
Re: [Help] Problem with attachobject -
Artie - 07.04.2013
try something like this:
Код:
if(IsValidObject(objectid)) DestroyObject(objectid);
-btw stavi vamo kod nas na BS, prije će ti pomoći nego ovi ovdje