Raised This Month: $ Target: $400
 0% 

Speed doesn't work properly


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
medow
Member
Join Date: Mar 2013
Old 07-29-2013 , 06:54   Speed doesn't work properly
Reply With Quote #1

PHP Code:
#include < amxmodx >
#include < fun >
#include < cstrike >
#include < hamsandwich >

enum AdminData
{
    
Admin_Flags,
    
Admin_Health,
    
Admin_Armor,
    
Float:Admin_Speed
};

new const 
g_szAdminFlags[ ][ ] =
{
"abcdefghijklmnopqrstu",
"abcdefhijnopqrstu",
"bcdefhijnopqrsu",
"bcdefijnopqrstu",
"bcdefhijnopqru",
"bcdefhijnopqu",
"bcdefhijnopu",
"bcdefhijnu",
"bcdefhiju",
"bcdefhiju",
"bcefhiju",
"bcefhiju",
"bcehiju",
"beiju",
"z"
};

#define ADMIN_LEVELS sizeof( g_szAdminFlags )

new g_eAdminDataADMIN_LEVELS ][ AdminData ] = 
{
    
    { 
0999999600.0 },
    { 
0950950590.0 },
    { 
0900900580.0 },
    { 
0999999500.0 },
    { 
0750750490.0 },
    { 
0680680480.0 },
    { 
0600600470.0 },
        { 
0550550460.0 },
        { 
0420420450.0 },
        { 
0400400450.0 },
        { 
0400400420.0 },
        { 
0360360400.0 },
        { 
0320320390.0 },
        { 
0320320390.0 },
    { 
0280250350.0 }
};

#define MAX_PLAYERS 32

new g_iAdminLevelMAX_PLAYERS ];

public 
plugin_init( )
{
    
register_plugin"Admin Levels""0.0.1""Exolent" );
    
    
register_event"CurWeapon""EventCurWeapon""be""1=1" );
    
    
RegisterHamHam_Spawn"player""FwdPlayerSpawnPost");
    
    for( new 
0ADMIN_LEVELSi++ )
    {
        
g_eAdminData][ Admin_Flags ] = read_flagsg_szAdminFlags] );
    }
}

public 
EventCurWeaponiPlayer )
{
    new 
iLevel g_iAdminLeveliPlayer ];
    
    if( 
iLevel >= )
    {
        
set_user_maxspeediPlayerFloat:g_eAdminDataiLevel ][ Admin_Speed ] );
    }
}


public 
FwdPlayerSpawnPostiPlayer )
{
    if( 
is_user_aliveiPlayer ) )
    {
        
g_iAdminLeveliPlayer ] = -1;
        
        new 
iFlags get_user_flagsiPlayer );
        
        for( new 
0ADMIN_LEVELSi++ )
        {
            if( ( 
iFlags g_eAdminData][ Admin_Flags ] ) == g_eAdminData][ Admin_Flags ] )
            {
                
g_iAdminLeveliPlayer ] = i;
                
                new 
szGiven64 ], iLeniGivenCount;
                
                new 
iHealth g_eAdminData][ Admin_Health ];
                if( 
iHealth )
                {
                    
set_user_healthiPlayeriHealth );
                    
                    
iLen += formatexszGiveniLen ], charsmaxszGiven ) - iLen"%i Extra Health"iHealth );
                    
iGivenCount++
                }
                
                new 
iArmor g_eAdminData][ Admin_Armor ];
                if( 
iArmor )
                {
                    
cs_set_user_armoriPlayeriArmorCS_ARMOR_VESTHELM );
                    
                    
iLen += formatexszGiveniLen ], charsmaxszGiven ) - iLen"%s%i Armor"iLen ", " ""iArmor );
                    
iGivenCount++
                }
                
                new 
Float:flSpeed Float:g_eAdminData][ Admin_Speed ];
                
                
set_user_maxspeediPlayerflSpeed );
                
                
iLen += formatexszGiveniLen ], charsmaxszGiven ) - iLen"%s%i Speed"iLen ? ( iGivenCount == " si " ", si " ) : ""floatroundflSpeed ) );
                
                
client_printiPlayerprint_chat"[DeathRun] Ai primit %s!"szGiven );
                
                break;
            }
        }
    }

The speed works fine for 3 secs at the beginning of the round (till it says Al right, let's go...), and then it doesn't work just if I change the weapon.
medow 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 15:52.


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