SA-MP Forums Archive
EditObject Problem - 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: EditObject Problem (/showthread.php?tid=409017)



EditObject Problem - still not solved - dr.lozer - 20.01.2013

Hi, i attached a object to another object (to make a nuclear missile) but when i use EditObject the object it works but the object is not moving! Please help what should i do?

Код:
new Silo,
      Silo2
;

public OnGameModeInit()
{
	Silo = CreateObject(17051,27.299999237061,1824.3000488281,16.60000038147,0,0,0,250);
	Silo2 = CreateObject(3502,27.299999237061,1824.0999755859,41.400001525879,90,0,0,250);
	AttachObjectToObject(Silo2,Silo,0.0,0.0,0.0,0.0,0.0,0.0);
	return 1;
}

CMD:do(playerid, params[])
{
	#pragma unused params
	EditObject(playerid,Silo2);
	return 1;
}

public OnPlayerEditAttachedObject( playerid, response, index, modelid, boneid,
Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ,
Float:fRotX, Float:fRotY, Float:fRotZ,
Float:fScaleX, Float:fScaleY, Float:fScaleZ )
{
	new File[256]; format(File,256,"pakistanforlife.txt");
	if(!dini_Exists(File)) dini_Create(File);
	dini_FloatSet(File,"fOffsetX",fOffsetX);
	dini_FloatSet(File,"fOffsetY",fOffsetY);
	dini_FloatSet(File,"fOffsetZ",fOffsetZ);
	dini_FloatSet(File,"fRotX",fRotX);
	dini_FloatSet(File,"fRotY",fRotY);
	dini_FloatSet(File,"fRotZ",fRotZ);
	dini_FloatSet(File,"fScaleX",fScaleX);
	dini_FloatSet(File,"fScaleY",fScaleY);
	dini_FloatSet(File,"fScaleZ",fScaleZ);
	return 1;
}



Re: EditObject Problem - RenSoprano - 20.01.2013

For first time show us your code


Re: EditObject Problem - dr.lozer - 20.01.2013

Quote:
Originally Posted by RenSoprano
Посмотреть сообщение
For first time show us your code
*Thread Updated*



Re: EditObject Problem - dr.lozer - 20.01.2013

bumb


Re: EditObject Problem - RoboN1X - 20.01.2013

i don't really know what you mean but,

OnPlayerEditAttachedObject is used for Player Attached Object

and as i can see in your code, you're using a normal Object with the EditObject function, which will call OnPlayerEditObject


Re: EditObject Problem - dr.lozer - 20.01.2013

Quote:
Originally Posted by Robo_N1X
Посмотреть сообщение
i don't really know what you mean but,

OnPlayerEditAttachedObject is used for Player Attached Object

and as i can see in your code, you're using a normal Object with the EditObject function, which will call OnPlayerEditObject
dude listen

i attached a object with another object ok??

Now i use EditObject Ok? Coz There is no EditAttachedObject Function to use.

Now The EditObject works but the object is not moving from its place! ok??

Now i need help got it ?


Re: EditObject Problem - Threshold - 20.01.2013

Did you read the post or what?
"which will call OnPlayerEditObject"

You need to use the callback OnPlayerEditObject, not OnPlayerEditAttachedObject...

Capiche?


Re: EditObject Problem - dr.lozer - 21.01.2013

Quote:
Originally Posted by BenzoAMG
Посмотреть сообщение
Did you read the post or what?
"which will call OnPlayerEditObject"

You need to use the callback OnPlayerEditObject, not OnPlayerEditAttachedObject...

Capiche?
the fucking object is not moving from its place! coz its attached to another object! i wanna make a Nuclear missile!


Re: EditObject Problem - dr.lozer - 22.01.2013

bumb