Problem with response ; OnPlayerEditDynamicObject -
Chipardeur - 19.07.2017
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
Re: Problem with response ; OnPlayerEditDynamicObject -
Dayrion - 19.07.2017
EDIT_RESPONSE_FINAL come when you click on the Save button
Re: Problem with response ; OnPlayerEditDynamicObject -
Chipardeur - 19.07.2017
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?
Re: Problem with response ; OnPlayerEditDynamicObject -
Dayrion - 19.07.2017
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);
Re: Problem with response ; OnPlayerEditDynamicObject -
Daymen - 19.07.2017
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.
Re: Problem with response ; OnPlayerEditDynamicObject -
Chipardeur - 19.07.2017
Nobody understands me ?
Quote:
Originally Posted by Dayrion
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 !!!
Re: Problem with response ; OnPlayerEditDynamicObject -
Chipardeur - 19.07.2017
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
Re: Problem with response ; OnPlayerEditDynamicObject -
Dutheil - 20.07.2017
Responses may be probably inverted.
Check it out.