Jump to content

attachelements problem


Derpy

Recommended Posts

hello folks, im working on my custom weapon system and im planning to use createWeapon function and then attach it to a vehicle or a ped

however im experiencing a problem and i dont know how to avoid this problem

whenever i use attachElements function the element that was attached to another gets attached in exactly middle of other element and i cant change position of attached element after it was attached to another element. any ideas?

Link to comment

alright thanks

umm just been wondering.. is there a way how i could predict where bullets would go?

i'd like to make a crosshair or a 3d line or something to make it easier to fire but not sure how to get the point to which bullets will be fired into

Link to comment

oh right thanks

but i have noticed if i do this

setWeaponProperty(hydraMG,"weapon_range",number) 
setWeaponProperty(hydraMG,"target_range",number) 

no matter which number i put, minigun will shoot at same low distance and i cant increase distance..

Link to comment
  • Moderators

(most) weapon property's don't work custom weapons.

I already found out that problem when I tried them on their release. They haven't fixed them...... yet.......

I also reported a related bug on 2013-07-13.

https://bugs.multitheftauto.com/view.php?id=7706

Those weapons where suppose to be serverside too........

But it seems they lost their interest in custom weapons.

It is shame. :(

Link to comment
  • Moderators

You have to scroll more down: (client part)

setWeaponProperty 

Syntax (weapon creation) 
  
bool setWeaponProperty ( weapon theWeapon, string strProperty, value theValue ) 
  
Required Arguments 
  
    theWeapon: the weapon to change the property of. 
    strProperty: the property to edit such as damage per hit ( "damage" ): 
  
    "weapon_range" - float 
    "target_range" - float 
    "accuracy" - float 
    "damage" - int 
  
FROM VERSION 1.4 r6693 ONWARDS 
  
    "fire_rotation" - vector - For aligning fire direction with model 
  
    theValue: The value to set the property to. 
  
Returns 
  
Returns true if the property was set. 
Requirements 
Minimum supported server    n/a 
Minimum supported client    1.3.0-9.04555  

Link to comment

Anyway if anyone is interested in doing something similiar to this like i did or what IYYAMA did, there is a work-around for it.

it's actually pretty simple (tested only on server-side)

setWeaponProperty(38,"pro","target_range",300) 
setWeaponProperty(38,"pro","weapon_range",300) 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...