SetDynamicObjectPos
#1

Hi,

Why this function don't work in game.
Reply
#2

Have you checked the Wiki for it. I dont have any problems with the command.

https://sampwiki.blast.hk/wiki/YSI:Using_Objects
Reply
#3

Ops, GetDynamicObjectPos
Reply
#4

have you tried something like

pawn Код:
GetDynamicObjectPos(objectid, &Float:X, &Float:Y, &Float:Z)
Reply
#5

Yes.
Reply
#6

Quote:
Originally Posted by budelis
Посмотреть сообщение
Yes.
can you show a part of the script where it goes wrong
Reply
#7

Код:
public OnPlayerEditDynamicObject(playerid,objectid, response, Float:x12, Float:y12, Float:z12, Float:rx12, Float:ry12, Float:rz12)
{
	new Float:oldX, Float:oldY, Float:oldZ,
	Float:oldRotX, Float:oldRotY, Float:oldRotZ;
	GetDynamicObjectPos(objectid, oldX, oldY, oldZ);
	GetDynamicObjectRot(objectid, oldRotX, oldRotY, oldRotZ);
 	if(!IsValidDynamicObject(objectid)) return;
 	MoveDynamicObject(objectid, x12, y12, z12, 10.0, rx12, ry12, rz12);
	if(response == EDIT_RESPONSE_FINAL)
	{
	
	}

	if(response == EDIT_RESPONSE_CANCEL)
	{
		SetDynamicObjectPos(objectid, oldX, oldY, oldZ);
		SetDynamicObjectRot(objectid, oldRotX, oldRotY, oldRotZ);
	}
}
When i cancel object edit ( PRESS ESC ), object don't back to first position.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)