Raised This Month: $ Target: $400
 0% 

Help with script


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
micapat
Veteran Member
Join Date: Feb 2010
Location: Nyuu, nyuu (France).
Old 12-24-2011 , 07:38   Re: Help with script
Reply With Quote #6

For instance a basic function to move a entity on a flat ground :

PHP Code:
stock npc_MoveToTarget( const npc, const FloatoriginNpc], const FloatoriginTarget], const Floatspeed )
{
    new 
FloatvelocityNpc], Floatlength], Floatdistance;
    
    
length] = originTarget] - originNpc];
    
length] = originTarget] - originNpc];
    
    
distance floatsqrootlength] * length] + length] * length] );
    
    
pevnpcpev_velocityvelocityNpc );
    
velocityNpc] = length] * ( speed distance );
    
velocityNpc] = length] * ( speed distance );
    
set_pevnpcpev_velocityvelocityNpc );
    
    return ( 
velocityNpc] || velocityNpc] || velocityNpc] );

__________________
micapat 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 20:48.


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