Raised This Month: $ Target: $400
 0% 

About PTB(Player drop money)


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Author Message
biscuit628
Senior Member
Join Date: Jun 2007
Location: 香港HongKong
Old 02-08-2009 , 10:42   About PTB(Player drop money)
#1

http://forums.alliedmods.net/showthread.php?t=68834
I have a problem about the plugin
how to let the plugin show this msg
client_print(0,print_chat,"%s drop %s money",name,money)
Code:
public deatha() {
 if(!get_pcvar_num(ison)) return PLUGIN_CONTINUE
 
 new money, Float:velo[3]
 new victim = read_data(2)
 new killer = read_data(1)
 
 if(killer && killer != victim)
  fm_set_user_money(killer,fm_get_user_money(killer) - 300)
 
 switch(get_pcvar_num(method)) {
  case 1:{
   money = get_pcvar_num(m_amount)
   if(fm_get_user_money(victim) < money) {
    money = fm_get_user_money(victim)
    fm_set_user_money(victim,0)
   }
   else fm_set_user_money(victim,fm_get_user_money(victim) - get_pcvar_num(m_amount))
   }
  case 2:{
   new tempmoney = fm_get_user_money(victim)
   if(money != 1) {
    money = (tempmoney / get_pcvar_num(divide))
    fm_set_user_money(victim,fm_get_user_money(victim) - money)
   }
   else {
    fm_set_user_money(victim,0)
    money = 1
   }
  }
  case 3:{
   new maxmoney = fm_get_user_money(victim)
   money = random_num(1,maxmoney)
   fm_set_user_money(victim,fm_get_user_money(victim) - money)
  }
  case 4:{
   new tempmoney2[32]
   get_pcvar_string(ran_money,tempmoney2,31)
   new tempmoney[3][6]
   parse(tempmoney2, tempmoney[0], sizeof tempmoney[] - 1,tempmoney[1], sizeof tempmoney[] - 1,tempmoney[2], sizeof tempmoney[] - 1)
   new num = random_num(1,3)
   switch(num) {
    case 1:{
     money = str_to_num(tempmoney[0])
    }
    case 2:{
     money = str_to_num(tempmoney[1])
    }
    case 3:{
     money = str_to_num(tempmoney[2])
    }
   }
   if(fm_get_user_money(victim) < money) {
    fm_set_user_money(victim,0)
    money = fm_get_user_money(victim)
   }
   else fm_set_user_money(victim,fm_get_user_money(victim) - money)
   }
  case 5:{
   new tempmoney22[32], num_from, num_to
   get_pcvar_string(random_nums,tempmoney22,31)
   new tempmoney1[2][6]
   parse(tempmoney22, tempmoney1[0], sizeof tempmoney1[] - 1,tempmoney1[1], sizeof tempmoney1[] - 1)
   num_from = str_to_num(tempmoney1[0])
   num_to = str_to_num(tempmoney1[1])
   if(num_to > 16000) num_to = 16000
   if(num_from < 0) num_to = 0
   money = random_num(num_from,num_to)
   
   if(fm_get_user_money(victim) < money) {
    fm_set_user_money(victim,0)
    money = fm_get_user_money(victim)
   }
   else fm_set_user_money(victim,fm_get_user_money(victim) - money)
   }
 }
 make_money(victim,money,velo)
 return PLUGIN_CONTINUE
}

Last edited by biscuit628; 02-08-2009 at 11:17.
biscuit628 is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-08-2009 , 12:54   Re: About PTB(Player drop money)
#2

For specific plugin support, post in the plugin's topic.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Closed Thread



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 17:01.


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