Raised This Month: $ Target: $400
 0% 

money problem


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
sb123
Senior Member
Join Date: Jan 2007
Old 06-05-2009 , 03:26   money problem
Reply With Quote #1

hi,Who can add in this plug-in bonus money 2-5 people

PHP Code:
/* Rewarding
   ver 0.1 By Zhao on 2004.12.4
*/
#include <amxmodx>
#include <cstrike>
#define BIG_MONEY_INDEX 16
new rewards[20]={50,100,300,500,1000,3000,5000,8000,10000,15000,20000,25000,40000,50000,80000,100000,150000,200000,500000,900000}//Rewarding Ramdon
new g_firstblood
new g_random
new rewardedbig
public ramdon_money(params[]){
 new 
killer=params[0]
 new 
oldamount=params[1]
 new 
amount
 
new killername[32]
 new 
random_range,randomvalue
 random_range
=(rewardedbig)?BIG_MONEY_INDEX:20
 
for(;;){
  
randomvalue=random(random_range)
  
amount=rewards[randomvalue]
  if (
amount!=oldamount) break;
 }
 
get_user_name(killer,killername,31)
 if (
g_random>0){
  
g_random--
  
set_hudmessage(0,255,0,0.05,0.25,00.020.40.010.12)
  
show_hudmessage(0,"%s Kills enemy bravely !! And be award %6d Dollars by Server",killername,amount)
  new 
param[2]
  
param[0]=killer 
  param
[1]=amount
  set_task
(0.3,"ramdon_money",0,param,1)
 } 
 else {
  if(
randomvalue>=BIG_MONEY_INDEXrewardedbig=1
  set_hudmessage
(0,255,0,0.050.2500.026.00.010.12)
  
show_hudmessage(0,"%s Kills enemy bravely !! And be award %6d Dollars by Server",killername,amount)
  
cs_set_user_money(killer,cs_get_user_money(killer)+amount)
 }
}
public 
eDeathMsg(){
 new 
killer,victim,TK
 killer
=read_data(1)
 if(!
killer) return PLUGIN_CONTINUE
 victim
=read_data(2)
 
TK=(get_user_team(killer)==get_user_team(victim))?1:0
 
new wpnname[4]
 
read_data(4,wpnname,3)
 if(
equal(wpnname,"c4")||TK) return PLUGIN_CONTINUE
 
new selfkill = ( killer==victim ) ? 1:0
 
if (selfkill) return PLUGIN_CONTINUE
 
if (g_firstblood){
  
g_firstblood=0
  g_random
=6
  
new param[2]
  
param[0]=killer
  param
[1]=0;
  
ramdon_money(param)
 }
 return 
PLUGIN_CONTINUE 
}
public 
new_round(){
 
g_firstblood=1
}
public 
eRestart(){
 
g_firstblood 0
 rewardedbig 
0
}
public 
plugin_init(){
 
register_plugin("First Killer Reward","0.1","Zhao")
 
register_event("DeathMsg","eDeathMsg","a"
 
g_firstblood=1
 rewardedbig 
0


Last edited by sb123; 06-05-2009 at 03:28.
sb123 is offline
Send a message via ICQ to sb123 Send a message via MSN to sb123 Send a message via Yahoo to sb123
 


Thread Tools
Display Modes

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 13:56.


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