Raised This Month: $ Target: $400
 0% 

Biohazard PUSH


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
meffy
Junior Member
Join Date: Aug 2009
Location: Poland
Old 05-28-2010 , 06:20   Biohazard PUSH
Reply With Quote #1

I need a plug-in honor of the Biohazard who will perform a function that zombies can push the RMB in the trunk I have something like that but unfortunately does not work :<

Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <biohazard>
#include <engine>

#define PLUGIN "Push player"
#define VERSION "1.0"
#define AUTHOR "OneEyed & Sn!ff3r"

new cvar

public plugin_init() 
{
        register_plugin(PLUGIN, VERSION, AUTHOR)
        
        cvar = register_cvar("amx_moveplayer", "1")
        
        register_touch("player", "player", "touchtouch")        
}

public touchtouch(player, player2)
{
        if(get_pcvar_num(cvar))
        {
                if((!(task_exists(player * 1000 + player2))) && 
                (!(task_exists(player2 * 1000 + player))) && 
                (get_user_button(player) & IN_ATTACK2) && 
                is_user_zombie(player) && 
                is_user_zombie(player2))
                {
                        new Float:speed[2][3]
                        new Float:over_speed[3]
                        
                        set_task(0.2, "empty_space", player * 1000 + player2)
                        set_task(0.2, "empty_space", player2 * 1000 + player)
                        
                        entity_get_vector(player, EV_VEC_velocity, speed[0])
                        entity_get_vector(player2, EV_VEC_velocity, speed[1])
                        
                        for(new i = 0; i < 3; i++)
                        {
                                over_speed[i] = speed[0][i] + speed[1][i]
                                speed[0][i] += over_speed[i] * 0.65
                                speed[1][i] -= over_speed[i] * 0.65
                        }
                        entity_set_vector(player, EV_VEC_velocity, speed[0])
                        entity_set_vector(player2, EV_VEC_velocity, speed[1])
                }
        }
}

public empty_space() {}

Sry for my bad english :s
__________________
meffy 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:21.


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