AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Earning Money CS (https://forums.alliedmods.net/showthread.php?t=50075)

soccdoodcss 01-18-2007 22:57

Earning Money CS
 
I've been trying to find out a way to stop earning all cash in CS. Such as winning a round or killing an enemy. Does anyone know of such a way? I was wondering because for my new plugin i want to have my own money giving feature, not the games.

Hopefully someone can help. Thanks!!

Emp` 01-18-2007 23:47

Re: Earning Money CS
 
you could save their money in a global, then catch when the message is sent (register_event("Money", "money_function", "b") ) then set it back to the value in the global

soccdoodcss 01-19-2007 02:01

Re: Earning Money CS
 
Alright, Ill do that... I was looking for somehting simpler but i havent been able to find anything. Oh well, not too hard. Thanks.

VEN 01-19-2007 08:18

Re: Earning Money CS
 
There is a downside though. If another plugin/module will emulate the message then you'll obviously break it's custom functionality. In fact you can't know for sure what is changed the money amount, the game itself or a custom addon.

Emp` 01-19-2007 18:35

Re: Earning Money CS
 
that's why you make your own custom natives :O

soccdoodcss 01-20-2007 11:52

Re: Earning Money CS
 
:O lol alright thanks. Do you think i could find out the exact money rewards depending if you win/lose/kill another person and such and deduct the same amount?

[ --<-@ ] Black Rose 01-20-2007 17:13

Re: Earning Money CS
 
You don't have to withdraw ammount of money every time.
Store users money in global var and set it everytime the money is changed. This will never give the user more money than 800 untill you give them some money. You'll have to use cshack if you wanna go lower than 800.
Code:
#include <amxmodx> #include <cstrike> new g_money[33] public plugin_init() {     register_plugin("", "", "")     register_event("Money","msg_Money","b") } public msg_Money(id)     cs_set_user_money(id, g_money[id])

XxAvalanchexX 01-20-2007 17:22

Re: Earning Money CS
 
Why can't you go below $800?

[ --<-@ ] Black Rose 01-20-2007 17:29

Re: Earning Money CS
 
You can't set users money lower than 800 without cshack...
You could show it but you cant have lower? I could possibly be wrong.
EDIT: Omygawg. I thought 800 was the lowest you could have.

soccdoodcss 01-20-2007 17:42

Re: Earning Money CS
 
Thanks a lot, will try this now.


All times are GMT -4. The time now is 22:21.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.