[Help] Problem with attachobject
#1

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
Reply
#2

Show the code, we're not wizards
Reply
#3

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);
Reply
#4

BUMP!
Anybody know?
Reply
#5

try something like this:
Код:
if(IsValidObject(objectid)) DestroyObject(objectid);
-btw stavi vamo kod nas na BS, prije će ti pomoći nego ovi ovdje
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)