[Pawn] Problem with OnPlayerEditDynamicObject() - Printable Version

+ forum (
-- Forum: SA-MP (
--- Forum: Pawn Scripting (
--- Thread: [Pawn] Problem with OnPlayerEditDynamicObject() (/showthread.php?tid=2400)

Problem with OnPlayerEditDynamicObject() - sergejgamehd - 2023-06-11

I made a command /create that help's me with Dynamic Systems, so when the owner of the server wants to create something he uses /create, picks what he wants and clicks create. When he clicks create it should create the object and let him edit the dynamic object, but the problem that happens is that the OnPlayerEditDynamicObject() immediately calls the 'case: EDIT_RESPONSE_CANCEL:'.

Here's the code for when the player clicks create:
//FISH  obj id: 1605
editaRiba[playerid] = NewID(2);
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
fish[editaRiba[playerid]] = CreateDynamicObject(1605, X, Y, Z, 0.0, 0.0, 0.0, -1, -1, -1,300.0,300.0);
EditDynamicObject(playerid, fish[editaRiba[playerid]]);


RE: Problem with OnPlayerEditDynamicObject() - eakwarp - 2023-06-12

EDIT_RESPONSE_CANCEL is called when ESC is clicked. Show code of this HideObjCreationPTD(playerid)