Raised This Month: $ Target: $400
 0% 

calculating stuff


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
card
Member
Join Date: Jun 2008
Old 06-24-2009 , 18:03   calculating stuff
Reply With Quote #1

PHP Code:
public forward_touch(touchertouched) {
    if(!
is_user_alive(toucher) || !is_user_alive(touched))
        return;
    
    new 
touched_origin[3], toucher_origin[3];
    
get_user_origin(touchedtouched_origin);
    
get_user_origin(touchertoucher_origin);
    
    new 
Float:toucher_minsize[3], Float:touched_minsize[3];
    
pev(toucherpev_minstoucher_minsize);
    
pev(touchedpev_minstouched_minsize);
    
    if(
touched_minsize[2] != -18.0) {
        if(!(
toucher_origin[2] == touched_origin[2]+72 && toucher_minsize[2] != -18.0) && !(toucher_origin[2] == touched_origin[2]+54 && toucher_minsize[2] == -18.0))
            return;
    } else {
        if(!(
toucher_origin[2] == touched_origin[2]+68 && toucher_minsize[2] != -18.0) && !(toucher_origin[2] == touched_origin[2]+50 && toucher_minsize[2] == -18.0))
            return;
    } 
this part:
PHP Code:
    if(touched_minsize[2] != -18.0) {
        if(!(
toucher_origin[2] == touched_origin[2]+72 && toucher_minsize[2] != -18.0) && !(toucher_origin[2] == touched_origin[2]+54 && toucher_minsize[2] == -18.0))
            return;
    } else {
        if(!(
toucher_origin[2] == touched_origin[2]+68 && toucher_minsize[2] != -18.0) && !(toucher_origin[2] == touched_origin[2]+50 && toucher_minsize[2] == -18.0))
            return; 
is there another way to check if 2 players are boosting, without this operations ? because, if the touched player is not on ground, the plugin doesnt recognise me as a 'toucher'
card 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 15:42.


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