Raised This Month: $ Target: $400
 0% 

Help with concmd and knife only thing.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 03-25-2006 , 03:22  
Reply With Quote #1

Replace this:
Code:
    if (get_cvar_num("sv_nosmod")==0) {         set_cvar_string("sv_nosmod","1")         server_print("NOSMod is now on!! bind [key] +nos. To use it.")     }     else {         set_cvar_string("sv_nosmod","0")         server_print("NOSMod is now off!! The admin must be a fucken pussy!!")     }
with this:
Code:
    switch(get_cvar_num("sv_nosmod")) {         case 0: {             set_cvar_num("sv_nosmod" , 1);             client_print(0 , print_chat , "NOSMod is now on!! bind [key] +nos to use it");         }         case 1: {             set_cvar_num("sv_nosmod" , 1);             client_print(0 , print_chat , "NOSMod is now off!! The admin must be a fuckin pussy!!");         }     }

As for your other two functions:
Code:
public nos_on(id) {     if (!get_cvar_num("sv_nosmod") || !is_user_alive(id))         return PLUGIN_HANDLED         // set_cvar_num("sv_maxspeed", 1500); // do this in plugin_init or something     if (get_cvar_num("sv_nosmod_knife") == 0) {         client_print(id,print_chat, "Hold on tight!!");         set_user_maxspeed(id, 2000.0);         client_cmd(id, "cl_forwardspeed 1500");         client_cmd(id, "cl_sidespeed 1500");         client_cmd(id, "cl_backspeed 1500");     }     else {         new clip , ammo , weapon = get_user_weapon(id, clip, ammo);         if (weapon == CSW_KNIFE) {             client_print(id, print_chat, "Hold on tight!!")             set_user_maxspeed(id, 2000.0)             client_cmd(id, "cl_forwardspeed 1500");             client_cmd(id, "cl_sidespeed 1500");             client_cmd(id, "cl_backspeed 1500");         }         else {             client_print(id, print_chat, "Take your knife out!!");         }     }     return PLUGIN_HANDLED } public nos_off(id) {     if (get_cvar_num("sv_nosmod") == 1) {         set_user_maxspeed(id, 0.0)         client_cmd(id, "cl_forwardspeed 400");         client_cmd(id, "cl_sidespeed 400");         client_cmd(id, "cl_backspeed 400");     }     return PLUGIN_HANDLED }

Of course you're going to need to do more to get it perfected.
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Reply



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 16:34.


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