Problem with response ; OnPlayerEditDynamicObject
#1

Hi !

I have this code:

Code:
ATM[slot][aObject] = CreateDynamicObject(model, ATM[slot][aX], ATM[slot][aY], ATM[slot][aZ]-0.50, 0.000, 0.000, ATM[slot][aA], ATM[slot][aWorld], ATM[slot][aInt], -1, 50.0, 50.0);
EditDynamicObject(playerid, ATM[slot][aObject]);
I modify the object and then press the floppy disk to save

Code:
public OnPlayerEditDynamicObject(playerid, objectid, response, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz)
{
    printf("%d, %d", EDIT_RESPONSE_FINAL, response);
}
Why my response = 2?
In my a_samp, EDIT_RESPONSE_FINAL = 1.
https://sampwiki.blast.hk/wiki/ObjectEditionResponesTypes Here same

Why my "response" = 2 and not 1 ?

Thx
Reply
#2

EDIT_RESPONSE_FINAL come when you click on the Save button
Reply
#3

I know and that's what I explained in my topic...

When I click save and I look at my console, response is worth 2 while I pressed save... Why is not it worth 1?
Reply
#4

You should try this one to see when EDIT_RESPONSE_FINAL come:
PHP Code:
if(response == EDIT_RESPONSE_FINAL)
    
printf("-> Reponse: %i (%i), response, EDIT_RESPONSE_FINAL); 
Reply
#5

Whenever you press the Floppy Disk icon, it saves the object's information and then processes an UPDATE so everyone is able to see it's changes.

That's why if you have an object editor, you can move it around on your screen, but it stays in it's previous position UNTIL you press the floppy disk.
Reply
#6

Nobody understands me ?

Quote:
Originally Posted by Dayrion
View Post
You should try this one to see when EDIT_RESPONSE_FINAL come:
PHP Code:
if(response == EDIT_RESPONSE_FINAL)
    
printf("-> Reponse: %i (%i), response, EDIT_RESPONSE_FINAL); 
Do not have this debug because when I press save EDIT_RESPONSE_FINAL is not recognized. EDIT_RESPONSE_FINAL is set to 1.
And my response is worth 2 !!!
Reply
#7

If I leave the object at the initial coordinates, EDIT_RESPONSE_FINAL is equal to 1, but if I shift a coordinate, then when I press the backup disk instead of 1 it puts 2
Reply
#8

Responses may be probably inverted.
Check it out.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)