Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » C++ error
Re: C++ error [message #363110 is a reply to message #363050] Sun, 14 December 2008 05:09 Go to previous message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma:
General (3 Stars)
YazooGang wrote on Sat, 13 December 2008 17:05

so then how would i make a command that gives me money and points each time i fire a bullet?



You can check the ammo count in a persons weapon clip, if you attached a timer script to the person that checked there ammo count for the weapon they're holding it could work. You'd have to constantly check the ammo count and if it is less then the previous time you checked, you can assume they're firing a weapon and grant them points and money.
To make it a chat hook command, you could simply attach this script to the player only when they type that command.

There are flaws in this idea though. You could pick up crates that remove the weapons or ammo. You would also have to make sure it is counting the ammo of the current weapon, and account for them switching weapons too.
It'd be a little work, and a totally crappy way of doing it, but it'd probably work.



 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: problem with hud.ini
Next Topic: Nod Turret Skins
Goto Forum:
  


Current Time: Wed Dec 25 03:11:02 MST 2024

Total time taken to generate the page: 0.01317 seconds