Jump to content

Setting Weapon Property


Xeno

Recommended Posts

Posted

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?

Posted

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

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

Posted

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

Posted

Don't set everyone's weapon skill to maximum. Do this only for one person, as weapon properties depend on skill.

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

Posted

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.

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