Re: C++ error [message #363110 is a reply to message #363050] |
Sun, 14 December 2008 05:09 |
|
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.
|
|
|