Raised This Month: $ Target: $400
 0% 

Grenade stuff + Kill money


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Sputnik53
Senior Member
Join Date: Jun 2005
Old 10-07-2007 , 14:37   Grenade stuff + Kill money
Reply With Quote #1

I'm having problems with grenade stuff and the Kill money plugin in Condition Zero

1. How would I detect when a grenade touches the player and then make the grenade explode on touch.
2. I'm trying to detect if a player is killed with a grenade.
Code:
public event_death() { new iFlags = get_gore_flags() new iOrigin[3] new sWeapon[MAX_NAME_LENGTH] new iVictim = read_data(2) if(is_user_connected(iVictim)) { new iHeadshot = read_data(3) new wWeapon = read_data(4) read_data(4,sWeapon,MAX_NAME_LENGTH) if (iFlags&GORE_HEADSHOT && iHeadshot) { get_user_origin(iVictim,iOrigin) fx_headshot(iOrigin) } if (wWeapon == 4 && iFlags&GORE_GIB) { get_user_origin(iVictim,iOrigin) // Effects //fx_trans(iVictim,0) fx_gib_explode(iOrigin,20) fx_blood_large(iOrigin,20) fx_blood_small(iOrigin,20) // Hide body iOrigin[2] = iOrigin[2]-200 set_user_origin(iVictim,iOrigin) } } }
This doesn't seem to be working, I've also tried CSW_HEGRENADE but it still didn't work.
3. This plugin doesn't seem to work.
Code:
#include <amxmod> #include <amxmisc> #include <fun> #define PLUGIN      "Kill Money" #define VERSION     "1.3" #define AUTHOR      "Sputnik53" public plugin_init() {     register_plugin(PLUGIN,VERSION,AUTHOR)     register_cvar("amx_money_kill","300")     register_cvar("amx_money_hs","300")     register_cvar("amx_money_knife","600")     register_event("DeathMsg","DeathEvent","a") } public DeathEvent() {     new killer = read_data(1)     new victim = read_data(2)     new headshot = read_data(3)     new weapon = read_data(4)     new killer_team = get_user_team(killer)     new victim_team = get_user_team(victim)         if(killer_team == victim_team) return PLUGIN_CONTINUE         set_user_money(killer,get_user_money(killer)-300)         if(headshot == 1) {         set_user_money(killer,get_user_money(killer)+get_cvar_num("amx_money_hs"))     }         if(weapon == 29) {         set_user_money(killer,get_user_money(killer)+get_cvar_num("amx_money_knife"))     }         set_user_money(killer,get_user_money(killer)+get_cvar_num("amx_money_kill"))     return PLUGIN_CONTINUE }

EDIT: 2. and 3. fixed.

Last edited by Sputnik53; 10-07-2007 at 17:41. Reason: Solved 2 problems.
Sputnik53 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 16:09.


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