Raised This Month: $ Target: $400
 0% 

Touch model problem !!!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
manley.choi
New Member
Join Date: Feb 2009
Old 08-09-2009 , 05:27   Touch model problem !!!
Reply With Quote #1

The amount of money over the prescribed limit, to touch the money model prompted the emergence of non-stop.
How to make prompt appears only once, to model the time to touch?
PHP Code:
public plugin_init()
{
 
register_touch("MoneyEnt""player""money_touch")
}
public 
money_touch(ptrptd)

 if (
total_money[ptd] >= 100000)
 {
  new 
msg[256]
  
format(msg255"^x03Your money more than ^x04$100000^x03 not need to pick.")
  
color_saytext(msgMSG_ONEptd3
        }  
 if (
is_user_alive(ptd) && (total_money[ptd] < g_maxmoney))
 {
  new 
owner entity_get_edict(ptrEV_ENT_owner)
  new 
Float:droptime entity_get_float(ptrEV_FL_fuser1)
  if(
owner==ptd && get_gametime()-droptime<0.3) return
  new 
money entity_get_int(ptrEV_INT_iuser2)
  
add_player_money(ptdmoney)
  new 
usergetmoney money
  
if (usergetmoney 999)
  {
   new 
name[32]
   
get_user_name(ptdname31)
   new 
msg[256]
   
format(msg255"^x03%s^x01 pick up ^x03$%d"nameusergetmoney)
   
client_color(0ptdmsg)
  }
  new 
leftmoney money usergetmoney
  
if (leftmoney g_maxmoney)
  {
   
remove_entity(ptr)
   
droped_money_count--
   } else {
   
entity_set_int(ptrEV_INT_iuser2leftmoney)
   if (
leftmoney 5000)
    
entity_set_model(ptrg_MoneyModel[2])
   else if (
leftmoney 10000)
    
entity_set_model(ptrg_MoneyModel[1])
   else
    
entity_set_model(ptrg_MoneyModel[0])
   new 
Float:maxbox[3] = {15.015.015.0}, Float:minbox[3] = {-15.0, -15.0, -15.0}
   
entity_set_size(ptrminboxmaxbox)
  }
 }

manley.choi is offline
Reply


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 18:21.


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