Raised This Month: $ Target: $400
 0% 

Resetting money


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CubanSpike
Member
Join Date: Mar 2008
Old 02-25-2009 , 15:19   Resetting money
Reply With Quote #1

Hello,

Probably a repost, but I could not find what I was looking for. I run a Wc3 mod Counter-Strike 1.6 server. I'd like to be able to reset the money to say...$10,000 every round, or maybe even award $10,000 every round so people can keep any money they have left over.

Thanks for your help,

Cuban
CubanSpike is offline
fang
Senior Member
Join Date: Nov 2007
Location: New Jersey
Old 02-25-2009 , 16:03   Re: Resetting money
Reply With Quote #2

PHP Code:
#include <amxmodx>
#include <fun>
#include <cstrike>
public plugin_init() {
 
register_plugin("Money","1.0","Reaper2331")
 
register_cvar("amx_money","1")   //Starts The Plugin In The On Position
 
register_cvar("money_amount""10000")  //The Amount Of Money You Want The Client To Have
}
public 
client_PreThink(id) {
 if (
get_cvar_num("amx_money") !=0) {
 
  new 
money cs_get_user_money(id)
  new 
moneyamount get_cvar_num("money_amount")
 
  if(
money moneyamount)
   
cs_set_user_money(idmoneyamount)  //Gives Back The Money To The Client 
 
}
 new 
money cs_get_user_money(id)
 new 
adminmoney 10000
 
 
if(money adminmoney)
  
cs_set_user_money(idadminmoney)  //Gives Back The Money To The Admin 

Modified amount reset to 10,000 for you. And shouldn't this have been in the Suggestions/Requests :S
Original from: http://forums.alliedmods.net/showthr...Infinite+money
fang is offline
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 19:09.


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