Raised This Month: $ Target: $400
 0% 

de_airstrip hates my function??


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
travo
Senior Member
Join Date: Aug 2006
Old 06-19-2008 , 16:21   Re: de_airstrip hates my function??
Reply With Quote #9

I always get mixed results with findentinsphere, i prefer to loop through all the ents and check the classname as its give me better results and is probably a lot more economical and less cpu than findentinsphere.
I also hate using static variables because I never get any consistance (i probably use them wrong half the time lol) so I stick with new style variables.

PHP Code:
public plugin_init()
    
set_task(0.1"force_spin"___"b");

public 
force_spin()
    if (
get_timeleft())
    {
        new 
classname[11], Float:angles[3], ent = -1ent_total engfunc(EngFunc_NumberOfEntities) + 30;
        while (
ent++ < ent_total)
            if (
pev_valid(ent))
            {
                
pev(entpev_classnameclassname10);
                if (
containi(classname"armoury") != -|| containi(classname"weaponbox") != -1)
                {
                    
pev(entpev_anglesangles);
                    
//angles[1] += get_pcvar_float(speed_pcvar) / 10.0;
                    
angles[1] += 27.0;
                    if(
angles[1] >= 180.0)
                        
angles[1] -= 360.0;
                    
set_pev(entpev_anglesangles);
                }
            }
    } 

Last edited by travo; 06-19-2008 at 16:26.
travo 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 16:16.


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