Jump to content

Setting Weapon Property


Xeno

Recommended Posts

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
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

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

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...