SA-MP Forums Archive
OnPlayerEditDynamicObject Problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: OnPlayerEditDynamicObject Problem (/showthread.php?tid=658044)



OnPlayerEditDynamicObject Problem - MRM - 21.08.2018

I have been having issues OnPlayerEditDynamicObject.
When editing get done, the object is lost.
"
x: -3.50694e33
y: -3.50694e33
z: -3.50694e33
Rx: -3.50694e33
Ry: -3.50694e33
Rz -3.50694e33
"

PHP Code:
public OnPlayerEditDynamicObject(playeridobjectidresponseFloatxFloatyFloatzFloatrxFloatryFloatrz)
{
    if(
EditingFurniture[playerid])
    {
        switch(
response)
        {
            case 
EDIT_RESPONSE_CANCEL:
            {
                new 
data[e_furniture];
                
Streamer_GetArrayData(STREAMER_TYPE_OBJECTobjectidE_STREAMER_EXTRA_IDdata);
                
SetDynamicObjectPos(objectiddata[furnitureX], data[furnitureY], data[furnitureZ]);
                
SetDynamicObjectRot(objectiddata[furnitureRX], data[furnitureRY], data[furnitureRZ]);
                
                
EditingFurniture[playerid] = false;
            }
            case 
EDIT_RESPONSE_FINAL:
            {
                new 
data[e_furniture], query[512];
                
Streamer_GetArrayData(STREAMER_TYPE_OBJECTobjectidE_STREAMER_EXTRA_IDdata);
                
printf("%f",x);
                
data[furnitureX] = x;
                
data[furnitureY] = y;
                
data[furnitureZ] = z;
                
data[furnitureRX] = rx;
                
data[furnitureRY] = ry;
                
data[furnitureRZ] = rz;
                
SetDynamicObjectPos(objectiddata[furnitureX], data[furnitureY], data[furnitureZ]);
                
SetDynamicObjectRot(objectiddata[furnitureRX], data[furnitureRY], data[furnitureRZ]);
                
Streamer_SetArrayData(STREAMER_TYPE_OBJECTobjectidE_STREAMER_EXTRA_IDdata);
                
mysql_format(SQLHandlequerysizeof(query), "UPDATE housefurnitures SET FurnitureX=%f, FurnitureY=%f, FurnitureZ=%f, FurnitureRX=%f, FurnitureRY=%f, FurnitureRZ=%f WHERE ID=%d"data[furnitureX], data[furnitureY], data[furnitureZ], data[furnitureRX], data[furnitureRY], data[furnitureRZ], data[SQLID]);
                
mysql_tquery(SQLHandlequery);
                
                
EditingFurniture[playerid] = false;
            }
        }
    }

printf :
PHP Code:
[21/08/2018 20:21:57] -./,),(-*,(.(((((( 



Re: OnPlayerEditDynamicObject Problem - MRM - 16.09.2018

Bump.


Re: OnPlayerEditDynamicObject Problem - SaMuRy - 16.09.2018

Send me all the public please