Jump to content
Sign in to follow this  
Softegg

Counting weapons/ammo in ammobox

Recommended Posts

is there a way via scripting to count how many weapons or ammunition is in an ammobox?

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Softegg @ April 08 2003,16:51)</td></tr><tr><td id="QUOTE">is there a way via scripting to count how many weapons or ammunition is in an ammobox?<span id='postcolor'>

Not sure, but if you could explain in more detail what you are trying to do I'm sure (we) could help you.

Share this post


Link to post
Share on other sites

i want to determine and count the available amount of any weapon or ammo in a ammobox.

at the beginning of the match, the players can add weapons and ammo in the ammobox, at the end of the match, the remaining amount has to be counted.

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Softegg @ April 08 2003,21:44)</td></tr><tr><td id="QUOTE">i want to determine and count the available amount of any weapon or ammo in a ammobox.

at the beginning of the match, the players can add weapons and ammo in the ammobox, at the end of the match, the remaining amount has to be counted.<span id='postcolor'>

As far as I know, there isn't a way to check what is inside.

This means you will probally have to undermine it.

First you have to detect what the players put in it, and then what they take out.

Not really worth it. You didn't tell me what you were trying to do or provide the script\explain the triggers you were using.

So again, we really can't help you.

Best check the command reference to look for the command you are looking for, I have not seen this sort of function before, but yet again, it might exist.

Share this post


Link to post
Share on other sites

Actually, it would work better maybe if you did your idea in reverse. Have a variable then a "buy" truck that puts a object inside a crate. Everytime you put a certain object inside, it subtracts from the variable and have a if arg.

if money = 0 then goto end

#end

exit

of course my syntax isn't correct, I think I am missing some brackets, I am relatively new to OPF scripting also.

Share this post


Link to post
Share on other sites

If-then statements syntax for ofp is ?:

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">?(money = 0):goto "end"

#end

exit

<span id='postcolor'>

Share this post


Link to post
Share on other sites

As far as I know it is not possible to count ammo and weapons in a ammo box.

RED

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×