Object - Urgent
#1

Can Someone help me make OnPlayerEditDynamicObject , like what do I put there, here is my code [pawnCMD:editcrane(playerid, params[])
{
EditDynamicObject(playerid, CraneObject);
return 1;
}][/pawn]
Reply
#2

create the object, then use that
example under ongamemodeinit
pawn Код:
CraneObject = CreateDynamicObject(..............//your code here);
Reply
#3

I have that, but I need TO use the function OnPlayerEditDynamicObject for it to work lol, but i dont know what to do in the public
Reply
#4

https://sampwiki.blast.hk/wiki/OnPlayerEditObject
Reply
#5

I know ONPlayerEditObject, but when I try OnPlayerEditDynamicObject I stuff up the code and get like 5000 errors (not really)
Reply
#6

This is from my mapping gamemode, see if you can do something with it.

This basically does what you want it to do, just change the public function and params to make it compatible with the streamer plugin.

If you have any errors, please PM me so I can do it for you over Teamviewer.

pawn Код:
public OnPlayerEditObject(playerid, playerobject, objectid, response, Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ)
{
    if(response == EDIT_RESPONSE_FINAL)
    {
        SetObjectPos(objectid, fX, fY, fZ);
        SetObjectRot(objectid, fRotX, fRotY, fRotZ);

        new string[128];
        format(string,sizeof(string),"Object ID %d coordinates set to X: %f Y: %f Z: %f and RX: %f RY: %f RZ: %f", objectid, fX, fY, fZ, fRotX, fRotY, fRotZ);
        SendClientMessage(playerid, -1, string);

        return 1;
    }

    return 1;
}

public OnPlayerSelectObject(playerid, type, objectid, modelid, Float:fX, Float:fY, Float:fZ)
{
    printf("Player %d selected object %d", playerid, objectid);
   
    if(type == SELECT_OBJECT_GLOBAL_OBJECT)
    {
        EditObject(playerid, objectid);
    }
    else EditPlayerObject(playerid, objectid);
   
    new string[128];
    format(string,sizeof(string),"You have selected object ID %d.", objectid);
    SendClientMessage(playerid, -1, string);

    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)