Xeno Posted December 18, 2011 Share Posted December 18, 2011 With the new functions, is it possible to make it work for only one person? If I use this: function m4(player) local theAccount=getPlayerAccount(player) if theAccount then local accountName=getAccountName(theAccount) if isObjectInACLGroup("user." .. accountName, aclGetGroup ( "Admin", "Moderator" ) ) then setWeaponProperty(31, "pro", "flags", 0x000800) setWeaponProperty(31, "pro", "flags", 0x000002) setWeaponProperty(31, "pro", "maximum_clip_ammo", 1000) else end end It will change it so that everyone has duel weapons ect, but how would I make it so its only the PLAYER that gets 2 M4's? Is it possible? Link to comment
BinSlayer1 Posted December 18, 2011 Share Posted December 18, 2011 I think you can't. For that to have worked, you would have needed something like a weapon element. But setWeaponProperty actually sets the property for specific weapon ID which cannot be individualised from another weapon of the same ID Link to comment
Xeno Posted December 18, 2011 Author Share Posted December 18, 2011 I think you can't. For that to have worked, you would have needed something like a weapon element. But setWeaponProperty actually sets the property for specific weapon ID which cannot be individualised from another weapon of the same ID Cant I do something like if == player then Not sure if thats a real function^ Link to comment
BinSlayer1 Posted December 18, 2011 Share Posted December 18, 2011 No because setWeaponProperty doesn't acknowledge any player element for whom to execute it. I haven't even tested this function but it's my opinion based on the way it is called that you can't set it for a particular weapon held by a particular player Link to comment
DiSaMe Posted December 18, 2011 Share Posted December 18, 2011 Don't set everyone's weapon skill to maximum. Do this only for one person, as weapon properties depend on skill. Link to comment
Xeno Posted December 18, 2011 Author Share Posted December 18, 2011 Don't set everyone's weapon skill to maximum. Do this only for one person, as weapon properties depend on skill. But its a role play server, so anyone can get there skills up. Oh well, thanks for the help guys. Link to comment
DiSaMe Posted December 18, 2011 Share Posted December 18, 2011 Some things may be possible to script in other ways. For example, weapon damage can be set via properties, but it has always been possible to modify using player damage and weapon fire events too. Same with target range. So you can change them without changing anything what game understands as the skill. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now