Raised This Month: $ Target: $400
 0% 

Earning Money CS


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
soccdoodcss
Veteran Member
Join Date: Nov 2006
Location: Wisconsin
Old 01-18-2007 , 22:57   Earning Money CS
Reply With Quote #1

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!!
__________________
"Now safe beneath their wisdom and their feet.
Here I will teach you truly how to sleep."
soccdoodcss is offline
Send a message via AIM to soccdoodcss
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 01-18-2007 , 23:47   Re: Earning Money CS
Reply With Quote #2

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
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
soccdoodcss
Veteran Member
Join Date: Nov 2006
Location: Wisconsin
Old 01-19-2007 , 02:01   Re: Earning Money CS
Reply With Quote #3

Alright, Ill do that... I was looking for somehting simpler but i havent been able to find anything. Oh well, not too hard. Thanks.
__________________
"Now safe beneath their wisdom and their feet.
Here I will teach you truly how to sleep."
soccdoodcss is offline
Send a message via AIM to soccdoodcss
VEN
Veteran Member
Join Date: Jan 2005
Old 01-19-2007 , 08:18   Re: Earning Money CS
Reply With Quote #4

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.
VEN is offline
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 01-19-2007 , 18:35   Re: Earning Money CS
Reply With Quote #5

that's why you make your own custom natives :O
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
soccdoodcss
Veteran Member
Join Date: Nov 2006
Location: Wisconsin
Old 01-20-2007 , 11:52   Re: Earning Money CS
Reply With Quote #6

: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?
__________________
"Now safe beneath their wisdom and their feet.
Here I will teach you truly how to sleep."
soccdoodcss is offline
Send a message via AIM to soccdoodcss
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 01-20-2007 , 17:13   Re: Earning Money CS
Reply With Quote #7

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])

Last edited by [ --<-@ ] Black Rose; 01-20-2007 at 17:43.
[ --<-@ ] Black Rose is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 01-20-2007 , 17:22   Re: Earning Money CS
Reply With Quote #8

Why can't you go below $800?
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
[ --<-@ ] Black Rose
ANNIHILATED
Join Date: Sep 2005
Location: Stockholm, Sweden.
Old 01-20-2007 , 17:29   Re: Earning Money CS
Reply With Quote #9

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.

Last edited by [ --<-@ ] Black Rose; 01-20-2007 at 17:37.
[ --<-@ ] Black Rose is offline
soccdoodcss
Veteran Member
Join Date: Nov 2006
Location: Wisconsin
Old 01-20-2007 , 17:42   Re: Earning Money CS
Reply With Quote #10

Thanks a lot, will try this now.
__________________
"Now safe beneath their wisdom and their feet.
Here I will teach you truly how to sleep."
soccdoodcss is offline
Send a message via AIM to soccdoodcss
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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