10.01.2011, 05:11
(
Последний раз редактировалось Rachael; 10.01.2011 в 07:13.
)
Attached Object Editor
Someone has made one of these before, I looked at it, and found myself wanting more, so I made one[ame]http://www.youtube.com/watch?v=n85lVIcdPLE[/ame]
Installation
You will need to create a folder `attachments` in your scriptfiles directory. This is the directory where object files are saved. You can change the SAVE_PATH in the script if you wish.
To compile this filterscript, you will need the new 0.3c includes
You will also need Y-Less sscanf2 plugin
https://sampforum.blast.hk/showthread.php?tid=120356
and the zcmd command processor by Zeex
https://sampforum.blast.hk/showthread.php?tid=91354
Note: change the value of the MAX define in the script to reflect your servers number of slots, or you can simply replace MAX with MAX_PLAYERS
Instructions for use
You will need to be an RCON admin to load and use the editor.
Once loaded, use /editor to enter the interface. Your model will be frozen, and the camera set behind you.
Textdraws will appear to help with commands / keys(green), also a quick reference guide to bone numbers(red) and finally some indicators so you know which attachment index and editing style you have selected(blue)
Global Movement keys
There are four modes of movement ( camera, offset, rotation and scale ) all of which are adjusted using the same keys. UP / DOWN for Yaxis, LEFT / RIGHT for Xaxis, and LSHIFT/LCTRL for Z axis. ( check textdraws if you have custom keys defined ). You can hold down SPACE to speed up the movement. It won't take you long to become familiar with these keys.
Camera Movement
Hold down the LMB ( or equivalent ) and use the 6 direction keys to move the camera. You can also toggle 'freeze' mode with the MMB. When you are unfrozen the blue textdraws will dissapear, and editing the object is suspended.
There is also the option to /camera, this returns you to normal GTA operation ( while still in the editor ). These options are useful for getting a good look at the objects you have adited.
Adding or removing objects
/index will give you a descrition of the options for adding and removing objects.
/index [index 1-5] [model#] [bone] to add a new object
/index [index 1-5] to switch to editing a different index if you have more than one object attached
/index [index 1-5] 0 to remove an object from a specific index
/scale - this command will return the object to 1:1:1 scale, because this is almost impossible to do any other way
At any time you can /asave and /aload files into the editor, this is handy when making complex combinations of objects. Object files can contain 1-5 objects, and they are saved in a format which can be pasted directly into other scripts inside the SetPlayerAttachedObject function.
You can also /aload a file from outside the editor, and it will add it to your model.
Download
Pastebin
http://pawn.pastebin.com/J9z0fNhi
Attached_Object_Editor.pwn
http://rapidshare.com/files/44175757...ect_Editor.pwn
Attached_Object_Editor.amx
http://rapidshare.com/files/44175768...ect_Editor.amx
Anyway, I hope you find this filterscript useful.
[edit] re-uploaded files without silly typo