Raised This Month: $ Target: $400
 0% 

Grenade ammo *SOLVED*


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 02-23-2006 , 00:23  
Reply With Quote #8

Code:
public touch_player(pToucher , pTouched) {     if(!is_valid_ent(pToucher) || !is_valid_ent(pTouched) || !is_user_connected(pTouched)) {         return PLUGIN_CONTINUE;     }     if(entity_get_int(pToucher , EV_INT_iuser1)) {         return PLUGIN_HANDLED;     }     new pToucherMdl[64];     entity_get_string(pToucher , EV_SZ_model , pToucherMdl , 63);     new model = check_nade_model(pToucherMdl);     if(model > -1) {         if(is_user_alive(pTouched)) {             new ammo = cs_get_user_bpammo(pTouched , model);             new max_ammo;             switch(model) {                 case CSW_FLASHBANG: max_ammo = get_nade_num(CSW_FLASHBANG);                 case CSW_HEGRENADE: max_ammo = get_nade_num(CSW_HEGRENADE);                 case CSW_SMOKEGRENADE:  max_ammo = get_nade_num(CSW_SMOKEGRENADE);             }             new userid = get_user_userid(pTouched);             log_amx("[0] <%d> Ammo %d - Max ammo %d - Type: %d" , userid , ammo , max_ammo , model);             if(ammo > 0 && ammo < max_ammo) {                 log_amx("[1] <%d> Ammo %d - Max ammo %d - Type: %d" , userid , ammo , max_ammo , model);                 set_entity_visibility(pToucher , 0);                 entity_set_int(pToucher , EV_INT_iuser1 , 1);                 new param[2];                 param[0] = pTouched;                 param[1] = model;                 set_task(0.1 , "give_nade" , random_num(999,9999) , param , 2);                 return PLUGIN_HANDLED;             }         }     }     return PLUGIN_CONTINUE; }
Outputs:
Quote:
L 02/23/2006 - 00:22:16: [grenade_sack.amxx] [0] <16> Ammo 0 - Max ammo 2 - Type: 4
L 02/23/2006 - 00:22:16: [grenade_sack.amxx] [0] <16> Ammo 1 - Max ammo 2 - Type: 4
L 02/23/2006 - 00:22:16: [grenade_sack.amxx] [1] <16> Ammo 1 - Max ammo 2 - Type: 4
L 02/23/2006 - 00:22:17: [grenade_sack.amxx] [0] <16> Ammo 2 - Max ammo 2 - Type: 4
L 02/23/2006 - 00:22:17: [grenade_sack.amxx] [0] <16> Ammo 2 - Max ammo 2 - Type: 4
L 02/23/2006 - 00:22:17: [grenade_sack.amxx] [0] <16> Ammo 2 - Max ammo 2 - Type: 4
L 02/23/2006 - 00:22:17: [grenade_sack.amxx] [0] <16> Ammo 2 - Max ammo 2 - Type: 4
L 02/23/2006 - 00:22:17: [grenade_sack.amxx] [0] <16> Ammo 2 - Max ammo 2 - Type: 4
L 02/23/2006 - 00:22:17: [grenade_sack.amxx] [0] <16> Ammo 2 - Max ammo 2 - Type: 4
L 02/23/2006 - 00:22:40: [grenade_sack.amxx] [0] <16> Ammo 0 - Max ammo 2 - Type: 4
L 02/23/2006 - 00:22:40: [grenade_sack.amxx] [0] <16> Ammo 1 - Max ammo 2 - Type: 4
L 02/23/2006 - 00:22:40: [grenade_sack.amxx] [1] <16> Ammo 1 - Max ammo 2 - Type: 4
L 02/23/2006 - 00:22:53: [grenade_sack.amxx] [0] <16> Ammo 2 - Max ammo 2 - Type: 4
L 02/23/2006 - 00:22:53: [grenade_sack.amxx] [0] <16> Ammo 2 - Max ammo 2 - Type: 4
L 02/23/2006 - 00:22:53: [grenade_sack.amxx] [0] <16> Ammo 2 - Max ammo 2 - Type: 4
L 02/23/2006 - 00:22:53: [grenade_sack.amxx] [0] <16> Ammo 2 - Max ammo 2 - Type: 4
L 02/23/2006 - 00:22:53: [grenade_sack.amxx] [0] <16> Ammo 2 - Max ammo 2 - Type: 4
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
 



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


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