OnPlayerEditDynamicObject
#1

Hello, it was all okay since now, something happened (I didn't touch the code in this part of script), but now I have a problem.
When I create an object and edit it, it appears for 0.1s and then dissapears and EDIT_RESPONSE_CANCEL starts working.
Code:
if(response == EDIT_RESPONSE_CANCEL)
{
	SendMessage(playerid,NEUTRAL,"Statyba atљaukta.","Building cancelled");
	DestroyDynamicObject(BuildObjects[sklypid][i][buildobj]);
	Stato[playerid]=false;
	return 1;
}
This part of code executes after creating an object. How to fix this?
Reply
#2

"This part of code executes after creating an object. How to fix this? " DestroyDynamicObject destroys the object, i.e: the object will disappear.

And you say that that code is executed after creating an object which means you create the object and then destroy it immediately.
Reply
#3

Quote:
Originally Posted by Yashas
View Post
"This part of code executes after creating an object. How to fix this? " DestroyDynamicObject destroys the object, i.e: the object will disappear.

And you say that that code is executed after creating an object which means you create the object and then destroy it immediately.
Actually, no.
I just fixed my problem: it was with INVALID_TEXTDRAW_ID on OnPlayerClickTextDraw (i think INVALID_TEXTDRAW_ID also calls the OnPlayerEditDynamicObject CANCEL response)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)