Raised This Month: $ Target: $400
 0% 

set_user_maxspeed


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
znovit
Member
Join Date: Mar 2009
Location: Behind you :=
Old 06-05-2009 , 08:04   set_user_maxspeed
Reply With Quote #1

Im using this but when ive choosed any type of 'character' and switch weapon the maxspeed goes back to normal?

Is there anyway to fix the speed to go back to the speed i was setting before.

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <colorchat>
#include <cstrike>

#define PLUGIN "Fun Mod"
#define VERSION "v1.0"
#define AUTHOR "znovit"

#define PREFIX "FUN"

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("say /menu","MainMenu");
    
register_clcmd("drop","dropblock");
    
register_clcmd("/modinfo","information");
    
    
set_task(50.0"information"_,_,_"b");
}


public 
information(id) {
    
ColorChat(idGREEN"--- Information ---");
    
ColorChat(idGREEN"[%s] This server is running ^x03%s %s^x04 by^x03 %s"PREFIX,  PLUGINVERSIONAUTHOR);
    
ColorChat(idGREEN"You can visit our webpage:^x03 http://znovit.com/funmod^x04 and read more.");
    
ColorChat(idGREEN"By typing^x03 /modinfo^x04 this will show up again.");
}

public 
dropblock(id) {
    
ColorChat(idGREEN"[%s] You can't^x03 drop^x04 your weapons when ^x03%s^x04 is running"PREFIXPLUGIN);
    return 
PLUGIN_HANDLED
}

public 
MainMenu(id) {
    new 
menu menu_create("\r ~~ \yF\wU\yN \wM\yO\wD \r~~""fun_handler");
    
menu_additem(menu"\w Mod information""1"0);
    
menu_additem(menu"\w Pabber Pibber""2"0); 
    
menu_additem(menu"\w Flubber Flabber""3"0);
    
menu_additem(menu"\w Kibber Kabber""4"0),
    
menu_additem(menu"\w Tebber Tobber""5"0),
    
menu_setprop(menuMPROP_EXITMEXIT_ALL);
    
menu_display(idmenu0);
}
    
public 
fun_handler(id,  menuitem) {
    if( 
item == MENU_EXIT )
    {
        
menu_destroy(menu);
        
        return 
PLUGIN_HANDLED;
    }
    
    new 
data[7], iName[64]
    new 
accesscallback;
    
menu_item_getinfo(menuitemaccessdata,5iName63callback);
    
    new 
key str_to_num(data);
    
    
    switch(
key)
    {
        case 
1:
        {
            
ColorChat(idGREEN"--- Mod information ---");
            
ColorChat(idGREEN"[%s] This server is running ^x03%s %s^x04 by^x03 %s"PREFIX,  PLUGINVERSIONAUTHOR);
            
ColorChat(idGREEN"You can visit our webpage:^x03 http://znovit.com/funmod^x04 and read more.");
        }
        case 
2:
        {
            
strip_user_weapons(id );
            
give_item(id"weapon_hegrenade" );
            
give_item(id"weapon_scout" );
            
cs_set_user_bpammoidCSW_SCOUT90 );
            
set_user_footsteps(id1);
            
set_user_gravity(id 0.2);
            
set_user_health(id120);
            
set_user_armor(id255);
            
set_user_rendering(id,kRenderFxGlowShell,0,0,0,kRenderNormal,25);
            
ColorChat(idGREEN"[%s] You are now^x03 Pabber Pibber"PREFIX)
        }
        case 
3
        {
            
strip_user_weapons(id );
            
give_item(id"weapon_hegrenade" );
            
give_item(id"weapon_m4a1" );
            
cs_set_user_bpammoidCSW_M4A190 );
            
give_item(id"weapon_flashbang" );
            
give_item(id"weapon_flashbang" );
            
set_user_health(id255);
            
set_user_gravity(id1.0);
            
set_user_rendering(id,kRenderFxGlowShell,0,0,0,kRenderNormal,25);
            
ColorChat(idGREEN"[%s] You are now^x03 Flubber Flabber"PREFIX)
        }
        case 
4
        {
            
strip_user_weapons(id );
            
give_item(id"weapon_awp" );
            
cs_set_user_bpammoidCSW_AWP30 );
            
set_user_health(id155);
            
set_user_gravity(id0.5);
            
set_user_maxspeed(id555.0);
            
set_user_rendering(id,kRenderFxGlowShell,0,0,0,kRenderNormal,25);
            
ColorChat(idGREEN"[%s] You are now^x03 Kibber Kabber"PREFIX)
        }
        case 
5
        {
            
strip_user_weapons(id );
            
give_item(id"weapon_knife" );
            
set_user_health(id50);
            
set_user_gravity(id1.0);
            
set_user_maxspeed(id800.0);
            
set_user_rendering(id,kRenderFxGlowShell,0,00,kRenderTransAlpha30); 
            
ColorChat(idGREEN"[%s] You are now^x03 Tebber Tobber"PREFIX)
        }
    }
    
    return 
PLUGIN_HANDLED;

__________________

Last edited by znovit; 06-05-2009 at 08:07.
znovit 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 14:00.


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