Raised This Month: $ Target: $400
 0% 

Speed down


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 06-23-2009 , 03:57   Speed down
Reply With Quote #1

How to do that when player do nothing, speed goes down from the speed what player had.
example players speed is 999. player lose the forward key & speed must go down from 999 to 998 , 997, 9996 >>> 0.
this is what i have but problem is when u dont press the key, ur speed is 0

PHP Code:
/***************************************************************************************************



Group A = Movement
Group B = Speed


***************************************************************************************************/
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <fun>

new Float:A_GAS 0.0
new Float:A_SORAT
new B_DANDEH 0

public plugin_init() 
{
    
register_plugin("Movements""0.1""One")
    
register_forward(FM_CmdStart"fwdCmdStart");
}
public 
fwdCmdStart(id,iHandle)
{
    
A_SORAT get_user_maxspeed(id)
    if(
A_GAS >= 1000.0)
    {
        
A_GAS 1000.0
    
}
    if(
A_GAS <= 0.0)
    {
        
A_GAS 0.0
    
}
    if(
A_SORAT >= 1000.0)
    {
        
A_SORAT 1000.0
    
}
    if(
A_SORAT <= 0.0)
    {
        
A_SORAT 0.0
    
}
    if (
get_uc(iHandleUC_Buttons) & IN_FORWARD)
    {
        
B_DANDEH  1
        A_GAS 
A_GAS 0.3
        set_user_maxspeed
(id,A_GAS)
        if(
A_SORAT >= 120.0)
        {
            
B_DANDEH 2
            A_GAS 
A_GAS 0.5
        
}
        else if(
A_SORAT >= 200.0)
        {
            
B_DANDEH 3
            A_GAS 
A_GAS 0.7
        
}
        else if(
A_SORAT >= 400.0)
        {
            
B_DANDEH 4
            A_GAS 
A_GAS 1.0
        
}
        else if(
A_SORAT >= 700.0)
        {
            
B_DANDEH 5
            A_GAS 
A_GAS 0.2
        
}
        else if(
A_SORAT >= 1000.0)
        {
            
set_user_maxspeed(id,1000.0)
        }
    }
    else
    {
        if(
B_DANDEH >= 5)
        {
            
A_GAS A_GAS 1.0
            A_SORAT 
A_SORAT 20.0
        
}
        else if(
B_DANDEH && 4)
        {
            
A_GAS A_GAS 1.0
            A_SORAT 
A_SORAT 16.0
        
}
        else if(
B_DANDEH && 3)
        {
            
A_GAS A_GAS 1.0
            A_SORAT 
A_SORAT 13.0
        
}
        else if(
B_DANDEH && 2)
        {
            
A_GAS A_GAS 1
            A_SORAT 
A_SORAT 20.0
        
}
        else if(
B_DANDEH && 1)
        {
            
A_GAS A_GAS 2.0
            A_SORAT 
A_SORAT 30.0
        
}
        else if(
B_DANDEH && 0)
        {
            
A_GAS 0.0
            A_SORAT 
0.0
        
}
    }

better said, ur speed must go slowly slower.
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
 



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


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