| BurningCa007 |
08-11-2010 15:35 |
Help with making stealth make you invisible to podbots
Hello,
I was wondering if with this stealth script, can it also make me invisible to podbots as players wouldn't normally see me and it gets annoying when you have it on and the bots just kill you without warning....
heres the script (all credit goes to Laziboi72 for making the script, I just need some help)
PHP Code:
/* .:CVARS:. -amx_stealthCOST <value> - sets cost of buying invisibility -amx_stealthTIME <value> - sets invisiblity time -amx_stealthVISI <value> - sets degree of invisibility .:SAY COMMANDS.: -/buy_stealth - makes client invisible for set amount of time */
#include <amxmodx> #include <money_ul> #include <amxmisc> #include <fun> #include <cstrike>
#define PLUGIN "Buy_Stealth" #define VERSION "1.6.1" #define AUTHOR "Laziboi72"
new Buy, Timer, Visi, Toggle_Plugin
public plugin_init(){ register_plugin("Buy_Stealth", "1.6.1", "Laziboi72") Toggle_Plugin = register_cvar("amx_stealth", "1") Timer = register_cvar("amx_stealthTIME", "10.0") Buy = register_cvar("amx_stealthCOST", "5000") Visi = register_cvar("amx_stealthVISI", "10") register_clcmd("say /buy_stealth", "buyS") register_clcmd("say_team /buy_stealth", "buyS") } public buyS(id){ new Toggle_P = get_pcvar_num(Toggle_Plugin) if(Toggle_P != 1) return PLUGIN_HANDLED if(!is_user_connected(id)) return PLUGIN_CONTINUE new uMoney = cs_get_user_money_ul(id) new uBuy = get_pcvar_num(Buy) if(uMoney < uBuy){ client_print(id, print_chat, "[ADMIN] NOT ENOUGH MONEY TO BUY STEALTH!") return PLUGIN_HANDLED } new User[32] get_user_name(id,User,31) new uVisi = get_pcvar_num(Visi) set_user_rendering( id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, uVisi ) cs_set_user_money_ul(id, uMoney - uBuy) client_print (0, print_chat, "[ADMIN] %s is in stealth mode!",User) set_task(get_pcvar_float(Timer), "removestealth", id) return PLUGIN_HANDLED } public removestealth(id){ set_user_rendering(id,kRenderFxNone,0,0,0,kRenderNormal,0) }
HOORAY! Finally learn't how to use php tags :P took forever to figure out. Scripting is like finding out what sex is at age 61 XD
Anyway
-all halp is appreciated
|