Raised This Month: $ Target: $400
 0% 

WeapPickup event


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
wonsae
Senior Member
Join Date: Jan 2006
Location: Behind you >:D
Old 06-04-2006 , 11:08   WeapPickup event
Reply With Quote #1

The event doesn't seem to work for me I'm using TS and yes it's a event in TS
Code:
register_event("WeapPickup","weap","e") public weap(id){     ammo(id) } public ammo(id){     if(get_user_weapon(id,clip1,ammo1)){         client_print(id,print_chat,"[RealMod] You have about %i amount of ammo and %i amount of clips left",clip1,ammo1)     }     return PLUGIN_HANDLED }

This doesn't seem to work when I pick up a weapon
wonsae is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 06-04-2006 , 12:00   Re: WeapPickup event
Reply With Quote #2

Try use a delay. For example in CS this event triggered before you got a weapon. Also you missed flag "b" for register_event, it's specified event.
Code:
register_event("WeapPickup", "weap", "be") public weap(id){     set_task(0.1, "ammo", id) } public ammo(id){     new clip1, ammo1     if (get_user_weapon(id, clip1, ammo1)) {         client_print(id, print_chat, "[RealMod] You have about %i amount of ammo and %i amount of clips left", ammo1, clip1)     }     return PLUGIN_HANDLED }
VEN is offline
Chex
Junior Member
Join Date: Jun 2006
Old 06-04-2006 , 17:17  
Reply With Quote #3

Try ts_getuserwpn. I don't think get_user_weapon works in ts.
Chex is offline
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 06-04-2006 , 19:00  
Reply With Quote #4

TS doesn't use typical events. It may not use that one.
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
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 16:26.


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