Attached Object Editor -
Rachael - 10.01.2011
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
Re: Attached Object Editor - [03]Garsino - 10.01.2011
This is good, I like the textdraw information!
Re: Attached Object Editor -
Haydz - 10.01.2011
This is nice, may have to try this out soon.
Respuesta: Attached Object Editor -
Chukin_95 - 10.01.2011
Help plis
[pawn]
C:\Documents and Settings\Administrador\Escritorio\Internacional RP\filterscripts\AEditor.pwn(512) : error 017: undefined symbol "code"
C:\Documents and Settings\Administrador\Escritorio\Internacional RP\filterscripts\AEditor.pwn(512) : warning 215: expression has no effect
C:\Documents and Settings\Administrador\Escritorio\Internacional RP\filterscripts\AEditor.pwn(517) : error 017: undefined symbol "code"
C:\Documents and Settings\Administrador\Escritorio\Internacional RP\filterscripts\AEditor.pwn(517) : warning 215: expression has no effect
C:\Documents and Settings\Administrador\Escritorio\Internacional RP\filterscripts\AEditor.pwn(521) : error 017: undefined symbol "code"
C:\Documents and Settings\Administrador\Escritorio\Internacional RP\filterscripts\AEditor.pwn(52
: error 017: undefined symbol "code"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
[pawn/]
Respuesta: Attached Object Editor -
Chukin_95 - 10.01.2011
you can upload it with. amx, my I do not compile.
Re: Attached Object Editor -
Rachael - 10.01.2011
sorry my bad, go to line 512 and change
pawn Код:
code = 0;
//change to
new code = 0;
I missed that when I took out the server specific functions that were in the script
(this is also a good scripting test for scripters)
I will re-upload the things shortly
Re: Attached Object Editor -
Speederx - 10.01.2011
is not working..
Код:
C:\Documents and Settings\adrian\Desktop\Ravens\filterscripts\Attached_Object_Editor.pwn(183) : error 017: undefined symbol "RemovePlayerAttachedObject"
C:\Documents and Settings\adrian\Desktop\Ravens\filterscripts\Attached_Object_Editor.pwn(237) : error 017: undefined symbol "RemovePlayerAttachedObject"
C:\Documents and Settings\adrian\Desktop\Ravens\filterscripts\Attached_Object_Editor.pwn(242) : error 017: undefined symbol "RemovePlayerAttachedObject"
C:\Documents and Settings\adrian\Desktop\Ravens\filterscripts\Attached_Object_Editor.pwn(257) : error 017: undefined symbol "SetPlayerAttachedObject"
C:\Documents and Settings\adrian\Desktop\Ravens\filterscripts\Attached_Object_Editor.pwn(293) : error 017: undefined symbol "RemovePlayerAttachedObject"
C:\Documents and Settings\adrian\Desktop\Ravens\filterscripts\Attached_Object_Editor.pwn(349) : error 017: undefined symbol "SetPlayerAttachedObject"
C:\Documents and Settings\adrian\Desktop\Ravens\filterscripts\Attached_Object_Editor.pwn(413) : error 017: undefined symbol "SetPlayerAttachedObject"
C:\Documents and Settings\adrian\Desktop\Ravens\filterscripts\Attached_Object_Editor.pwn(468) : error 017: undefined symbol "SetPlayerAttachedObject"
C:\Documents and Settings\adrian\Desktop\Ravens\filterscripts\Attached_Object_Editor.pwn(737) : error 017: undefined symbol "SetPlayerAttachedObject"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
9 Errors.
Re: Attached Object Editor -
Rachael - 10.01.2011
This is a 0.3c filterscript
Re: Attached Object Editor -
Speederx - 10.01.2011
whops sorry..
Re: Attached Object Editor -
Retardedwolf - 10.01.2011
No offense, I don't really understand this. Could you make it more understandable and user-friendly? Something like Hold Studio would be good but HS doesn't support attach slots.
Re: Attached Object Editor -
smeti - 10.01.2011
Very nice 10/10
Re: Attached Object Editor -
Rachael - 10.01.2011
Quote:
Originally Posted by Retardedwolf
No offense, I don't really understand this. Could you make it more understandable and user-friendly? Something like Hold Studio would be good but HS doesn't support attach slots.
|
just load it, type /editor, then type /index 1 [model] [bone]
then press lots of buttons.
I can't see how I can make it more user friendly considering all the textdraws.
Re: Attached Object Editor -
Lorenc_ - 10.01.2011
Really nice, might need that swat shield thing for my server, if thats a valid object id on samp -.-
Re: Attached Object Editor -
Speederx - 10.01.2011
When i save says
Code:
ERROR: creating file
and..where i see my holdobject?
Re: Attached Object Editor -
woot - 10.01.2011
Well yeah, one more, but none of the 3 supports "attach object editor" for vehicles.
Re: Attached Object Editor -
Rachael - 11.01.2011
Quote:
Originally Posted by Speederx
When i save says
Code:
ERROR: creating file
and..where i see my holdobject?
|
Make sure you have a folder 'attached' created in scriptfiles ( read the installation section above )
When you are in the editor, and you type '/index [index] [model] [bone] it will give you a client message saying
'Attached object# [model] to bone [bone] index [index]' Then you should see the object on your character. If not, then I guess the model ID was incorrect, or your client doesn't support all the 0.3c objects.
Quote:
Originally Posted by exora
Well yeah, one more, but none of the 3 supports "attach object editor" for vehicles
|
I don't understand what you mean. I havn't scripted the vehicle attachment editor yet.
Re: Attached Object Editor -
Georgelopez1 - 11.01.2011
sweeet
Re: Attached Object Editor -
SeQualX - 11.01.2011
Very cool FS nice joob dood.
Re: Attached Object Editor -
Curti$ - 11.01.2011
Really useful to make new things for my server
AW: Attached Object Editor -
GHOSTY_101 - 14.01.2011
What do i have to write in the AttachObjectToPlayer line??
I have this ini File:
0,18643,2,0.08,0.04,0.03,0.0,-304.0,-267.0,0.36,0.07,1.01