Looking for a toy drag editor without using Y,X etc - 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: Looking for a toy drag editor without using Y,X etc (
/showthread.php?tid=546728)
Looking for a toy drag editor without using Y,X etc -
Samieastwood - 17.11.2014
when i do /toys & edit the player has to insert Y,X etc, i want one that he can just drag the toy?
Re: Looking for a toy drag editor without using Y,X etc -
davve95 - 17.11.2014
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.
Re: Looking for a toy drag editor without using Y,X etc -
HY - 17.11.2014
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
Re: Looking for a toy drag editor without using Y,X etc -
Samieastwood - 17.11.2014
still when i click edit toy it say Y , X Etc
Re: Looking for a toy drag editor without using Y,X etc -
Samieastwood - 17.11.2014
so with that it will it add it to /toys?