Raised This Month: $ Target: $400
 0% 

Biohazard PUSH


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
gucio1200
Junior Member
Join Date: Feb 2012
Old 02-08-2012 , 16:36   Re: Biohazard PUSH
Reply With Quote #2

Any news in this sub ? I'm interested in it very much If some one could tell how to deploy it on biohazard or just give some tip what to change exactly. This shoudbe easy to implement. But i'm new with amx. So this isnt much understable. At this time i'm using
Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#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)
{
        new Float:aim[2][3]
        new Float: dif
        entity_get_vector(player, EV_VEC_v_angle, aim[0])
        entity_get_vector(player2, EV_VEC_v_angle, aim[1])

        if(aim[0][1]<0) aim[0][1]+=360.0
        if(aim[1][1]<0) aim[0][1]+=360.0

        if(aim[0][1]>aim[1][1]) dif = aim[0][1]-aim[1][1]
        else dif = aim[1][1]-aim[0][1]

        if(dif>90) return

        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() {}
with amx_moveplayer "1" in bh_cvars and still not working ;/

Last edited by gucio1200; 02-08-2012 at 17:06. Reason: Adding stuffs
gucio1200 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