Raised This Month: $ Target: $400
 0% 

Help With Event problem


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
FatalisDK
Senior Member
Join Date: Mar 2006
Location: bacon
Old 05-05-2006 , 11:35  
Reply With Quote #6

Fixed a few things for you.

Code:
#include <amxmodx> #include <engine> #include <fun> #define PLUGIN  "Sniper Push" #define VERSION "1.0" #define AUTHOR  "Fender (Original Plugin by V3X, and GHW" /*V3X, and GHW Chronics Pump Back Plugin , Just got the main code, and edited it. Plugin Created by AMXX Studio Gaben is Queen Of America*/ new cvar_sniper_knockback new cvar_sniper_force new cvar_sniper_active public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)         register_event("Damage" , "event_dmg" , "b" , "2>0");         cvar_sniper_active = register_cvar("sniper_active", "1")     cvar_sniper_knockback = register_cvar("sniper_knockback" , "1");     cvar_sniper_force = register_cvar("sniper_force"     , "10"); } public event_dmg(id) {     if(!get_pcvar_num(cvar_sniper_active))         return PLUGIN_CONTINUE;         if(!is_user_alive(id))         return PLUGIN_CONTINUE;         new weapon , attacker = get_user_attacker(id , weapon);         if(!is_user_alive(attacker))         return PLUGIN_CONTINUE;     /*you can change this if you want and add more weapon choices.*/     switch(weapon)     {         case CSW_AWP, CSW_SCOUT, CSW_SG550, CSW_G3SG1:         {             new Float:vec[3];             new Float:oldvelo[3];             get_user_velocity(id, oldvelo);             //create_velocity_vector(id , attacker , vec);             vec[0] += oldvelo[0];             vec[1] += oldvelo[1];             set_user_velocity(id , vec); //oldvelo == vec         }     }         return PLUGIN_CONTINUE; } /* This function is too messed up for me to fix stock create_velocity_vector(victim,attacker,Float:velocity[3]) {     if(!is_user_alive(attacker))         return PLUGIN_CONTINUE;         new Float:attorigin[3];     entity_get_vector(attacker , EV_VEC_origin , attorigin)         new Float:origin2[3]     origin2[0] = vicorigin[0] - attorigin[0];//vicorigin doesnt even exist     origin2[1] = vicorigin[1] - attorigin[1];         new Float:largestnum = 0.0;         if(floatabs(origin2[0])>largestnum) largestnum = floatabs(origin2[0]);     if(floatabs(origin2[1])>largestnum) largestnum = floatabs(origin2[1]);         origin2[0] /= largestnum;     origin2[1] /= largestnum;         velocity[0] = ( origin2[0] * (get_pcvar_float(cvar_sniper_force) * 3000) ) / get_entity_distance(attacker);     if(velocity[0] <= 20.0 || velocity[1] <= 20.0)         velocity[2] = random_float(200.0 , 275.0);         return PLUGIN_HANDLED; }*/
__________________
FatalisDK 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 05:10.


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