Raised This Month: $ Target: $400
 0% 

block player touch (distance)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
OvidiuS
Chillaxin'
Join Date: Dec 2009
Location: Serbia
Old 06-13-2011 , 18:07   Re: block player touch (distance)
Reply With Quote #1

thank you both for helping, i'll test both plugin
OvidiuS is offline
Send a message via Skype™ to OvidiuS
OvidiuS
Chillaxin'
Join Date: Dec 2009
Location: Serbia
Old 06-14-2011 , 13:06   Re: block player touch (distance)
Reply With Quote #2

sorry for double, exolent your plugin spawns player somewhere out of map
i guess that distance is too big, maybe it will work after changing MINIMUM_DISTANCE

Hunter-Digital i didn't have free time to change and try your method, but i will.
OvidiuS is offline
Send a message via Skype™ to OvidiuS
Dolph_Ziggler
BANNED
Join Date: Jun 2011
Old 06-14-2011 , 13:51   Re: block player touch (distance)
Reply With Quote #3

Quote:
Originally Posted by OvidiuS View Post
sorry for double, exolent your plugin spawns player somewhere out of map
i guess that distance is too big, maybe it will work after changing MINIMUM_DISTANCE

Hunter-Digital i didn't have free time to change and try your method, but i will.
try to change MINIMUM_DISTANCE = 50
Dolph_Ziggler is offline
Send a message via MSN to Dolph_Ziggler
OvidiuS
Chillaxin'
Join Date: Dec 2009
Location: Serbia
Old 06-15-2011 , 05:43   Re: block player touch (distance)
Reply With Quote #4

Quote:
Originally Posted by Dolph_Ziggler View Post
try to change MINIMUM_DISTANCE = 50
tried even 5, but it doesn't work..
at spawn i got blocked(my screen shakes, can't move), and after i slay all team mates i still can't move, but shaking stops...
Hunter-Digital i fixed some errors
PHP Code:
#include <amxmodx>
#include <xs>
#include <engine>

const AURA_RANGE 100
const AURA_STRENGTH 10

new g_iMaxPlayers

public plugin_init()
    
g_iMaxPlayers get_maxplayers()

public 
client_putinserver(id)
    
set_task(0.1"player_aura"id)

public 
client_disconnect(id)
    
remove_task(id)

public 
player_aura(id)
{
    new 
Float:fPlayerOrigin[3]

    
entity_get_vector(idEV_VEC_originfPlayerOrigin)

    for(new 
1Float:fDistanceFloat:fOrigin[3]; <= g_iMaxPlayersi++)
    {
        if(
is_user_alive(i))
        {
            
entity_get_vector(idEV_VEC_originfOrigin)

            
fDistance get_distance_f(fPlayerOriginfOrigin)

            if(
fDistance >= AURA_RANGE)
                continue
        
            
xs_vec_sub(fOriginfPlayerOriginfOrigin)
            
xs_vec_normalize(fOriginfOrigin)
            
xs_vec_mul_scalar(fOrigin, (fDistance AURA_RANGE) * -AURA_STRENGTHfOrigin)

            
entity_set_vector(iEV_VEC_velocityfOrigin)
        }
    }

i'll test your method tonight

Last edited by OvidiuS; 06-15-2011 at 05:53.
OvidiuS is offline
Send a message via Skype™ to OvidiuS
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 06-14-2011 , 17:56   Re: block player touch (distance)
Reply With Quote #5

I edited mine adding exolent's math, it shouldn't pounce players too much because it's called alot less frequent than prethink.
__________________
Hunter-Digital is offline
Reply



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 23:33.


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