Looking for a toy drag editor without using Y,X etc
#1

when i do /toys & edit the player has to insert Y,X etc, i want one that he can just drag the toy?
Reply
#2

There's one named attachments in the filterscript folder in your server package.

Edit: I saw it was scripting help now...
You could check that script for ideas though.
Reply
#3

You can make something like this :

pawn Код:
CMD:toys(playerid, params[])
{
    new Toy; // Variable
    Toy = CreateObject(.....); // Will create that object !
    EditObject(playerid,Toy);  // Will start edit mode .
    return 1;
}
Somewhere in script:

pawn Код:
public OnPlayerEditObject(playerid, playerobject, objectid, response, Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ)
{
        new Float:oldX, Float:oldY, Float:oldZ,
        Float:oldRotX, Float:oldRotY, Float:oldRotZ;
        GetObjectPos(Toy, oldX, oldY, oldZ);
        GetObjectRot(Toy, oldRotX, oldRotY, oldRotZ);
        if(!playerobject)
        {
            if(!IsValidObject(Toy)) return;
            MoveObject(Toy, fX, fY, fZ, 10.0, fRotX, fRotY, fRotZ);      
        }
    }
    return 1;
}
https://sampwiki.blast.hk/wiki/OnPlayerEditObject
Reply
#4

still when i click edit toy it say Y , X Etc
Reply
#5

so with that it will it add it to /toys?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)