Raised This Month: $ Target: $400
 0% 

[HELP] Speed


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 08-29-2012 , 17:45   [HELP] Speed
Reply With Quote #1

Hi, i need some help...
It works fine, but when change weapon or new round, speed stop works...
It have health and speed. Health works good.

Code:
#include < amxmodx >
#include < hamsandwich >
#include < cstrike >
#include < fun >
 
enum _: Health
{
 Terro ,
 Anti
};
enum _: Maxspeed
{
 Terro ,
 Anti
};
new g_pCvarHealthTeam[ Health ];
new g_pCvarMaxspeedTeam[ Maxspeed ];
public plugin_init( )
{
 register_plugin( "PLUGIN" , "VERSION" , "AUTHOR" );
 
 RegisterHam( Ham_Spawn , "player" , "Fw_HamSpawn" , true );
 
 g_pCvarHealthTeam[ Terro ] = register_cvar( "health_terro" , "99" );
 g_pCvarHealthTeam[ Anti ] =  register_cvar( "health_anti" , "99" );
 g_pCvarMaxspeedTeam[ Terro ] = register_cvar( "maxspeed_terro" , "500" );
 g_pCvarMaxspeedTeam[ Anti ] =  register_cvar( "maxspeed_anti" , "500" );
}
public Fw_HamSpawn( id )
{
 if( is_user_alive( id ) )
 {
  switch( cs_get_user_team( id ) )
  {
   case CS_TEAM_CT:
   {
    set_user_health( id , get_pcvar_num( g_pCvarHealthTeam[ Anti ] ) );
    set_user_maxspeed( id , get_pcvar_float( g_pCvarMaxspeedTeam[ Anti ] ) );
   }
   case CS_TEAM_T:
   {
    set_user_health( id , get_pcvar_num( g_pCvarHealthTeam[ Terro ] ) );
    set_user_maxspeed( id , get_pcvar_float( g_pCvarMaxspeedTeam[ Terro ] ) );
   }
  }
 }
 return 0;
}

EDIT:
Speed isnt working as i want, i changed cvar to 900 but didnt worked as 900 speed
HELP NEEDING

Last edited by Jhob94; 08-29-2012 at 17:50.
Jhob94 is offline
 


Thread Tools
Display Modes

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 05:44.


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