Raised This Month: $12 Target: $400
 3% 

HnStealth v0.1


Post New Thread Reply   
 
Thread Tools Display Modes
Sylwester
Veteran Member
Join Date: Oct 2006
Location: Poland
Old 03-16-2010 , 16:23   Re: HnStealth v0.1
Reply With Quote #11

How about 450 less lines
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fun>

public plugin_init(){
    
register_plugin("BuyStealth""1.0""Sylwester")
    
register_menucmd(register_menuid("\yBuy"), 1023"hnd_menu")
    
register_clcmd("say""handle_say")
    
register_clcmd("say_team""handle_say")
}

public 
handle_say(id){
    static 
cache[16]
    
read_args(cache16)
    if(
containi(cache"stealth")>-1)
        
menu_buy(id)
}

public 
menu_buy(id){
    static 
cache[512], posmoney
    money 
cs_get_user_money(id)
    
pos formatex(cache511"\yBuy Stealth Menu\w^n")
    for(new 
i=1i<9i++)
        if(
money >= i*2000)
            
pos += formatex(cache[pos], 511-pos"^n\w%d. Stealth \y%d%%\w - $%d"ii*10i*2000)
        else
            
pos += formatex(cache[pos], 511-pos"^n\d%d. Stealth %d%% - $%d"ii*10i*2000)
    
formatex(cache[pos], 511"\w^n^n0. Exit")
    
show_menu(id767cache, -1)
}

public 
hnd_menu(idkey){
    if(
key == 9)
        return
    if(
key && cs_get_user_money(id) >= (key+1)*2000){
        
cs_set_user_money(idcs_get_user_money(id) - (key+1)*2000)
        
set_user_rendering(idkRenderFxGlowShell000kRenderTransAlpha255*(100-(key+1)*10)/100)
        
client_print(idprint_chat"You have now %d%% stealth."10*(key+1))
    }else
        
menu_buy(id)

__________________
Impossible is Nothing
Sylwester is offline
kanatzu
Veteran Member
Join Date: Oct 2007
Location: Sweden
Old 03-16-2010 , 16:27   Re: HnStealth v0.1
Reply With Quote #12

Quote:
Originally Posted by Sylwester View Post
How about 450 less lines

Even better, thank you for helping my mind.
__________________




Quote:
Originally Posted by wrecked_ View Post
Stop saying words before I sodomize you with a cucumber.
kanatzu is offline
Send a message via MSN to kanatzu
Zombiezzz
Veteran Member
Join Date: Nov 2009
Location: Nov 2009
Old 03-16-2010 , 17:03   Re: HnStealth v0.1
Reply With Quote #13

Quote:
Originally Posted by Sylwester View Post
How about 450 less lines
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fun>
 
public plugin_init(){
    
register_plugin("BuyStealth""1.0""Sylwester")
    
register_menucmd(register_menuid("\yBuy"), 1023"hnd_menu")
    
register_clcmd("say""handle_say")
    
register_clcmd("say_team""handle_say")
}
 
public 
handle_say(id){
    static 
cache[16]
    
read_args(cache16)
    if(
containi(cache"stealth")>-1)
        
menu_buy(id)
}
 
public 
menu_buy(id){
    static 
cache[512], posmoney
    money 
cs_get_user_money(id)
    
pos formatex(cache511"\yBuy Stealth Menu\w^n")
    for(new 
i=1i<9i++)
        if(
money >= i*2000)
            
pos += formatex(cache[pos], 511-pos"^n\w%d. Stealth \y%d%%\w - $%d"ii*10i*2000)
        else
            
pos += formatex(cache[pos], 511-pos"^n\d%d. Stealth %d%% - $%d"ii*10i*2000)
    
formatex(cache[pos], 511"\w^n^n0. Exit")
    
show_menu(id767cache, -1)
}
 
public 
hnd_menu(idkey){
    if(
key == 9)
        return
    if(
key && cs_get_user_money(id) >= (key+1)*2000){
        
cs_set_user_money(idcs_get_user_money(id) - (key+1)*2000)
        
set_user_rendering(idkRenderFxGlowShell000kRenderTransAlpha255*(100-(key+1)*10)/100)
        
client_print(idprint_chat"You have now %d%% stealth."10*(key+1))
    }else
        
menu_buy(id)

you just gave me a boner
__________________
Zombiezzz is offline
kanatzu
Veteran Member
Join Date: Oct 2007
Location: Sweden
Old 03-16-2010 , 17:12   Re: HnStealth v0.1
Reply With Quote #14

Quote:
Originally Posted by Zombiezzz View Post
you just gave me a boner
Your monkey gave me a boner.


The code is cleaner then my toilet! (Wich is good, trust me) Good job!
__________________




Quote:
Originally Posted by wrecked_ View Post
Stop saying words before I sodomize you with a cucumber.
kanatzu is offline
Send a message via MSN to kanatzu
Lure.d
BANNED
Join Date: Dec 2009
Location: Lithuania->USA
Old 04-07-2010 , 11:29   Re: HnStealth v0.1
Reply With Quote #15

as i remember, the hns disabled cash, its always 1337 or whatever its set to. Not increasing after kill, etc.
Lure.d is offline
Send a message via Skype™ to Lure.d
lazarev
Veteran Member
Join Date: Sep 2008
Old 04-08-2010 , 02:17   Re: HnStealth v0.1
Reply With Quote #16

Quote:
Originally Posted by Lure.d View Post
as i remember, the hns disabled cash, its always 1337 or whatever its set to. Not increasing after kill, etc.
You can simply remove it..
lazarev is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-08-2010 , 02:45   Re: HnStealth v0.1
Reply With Quote #17

Quote:
Originally Posted by Lure.d View Post
as i remember, the hns disabled cash, its always 1337 or whatever its set to. Not increasing after kill, etc.
Depends on which plugins are loaded on the server.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Killer12201
Senior Member
Join Date: Dec 2007
Old 04-10-2010 , 20:13   Re: HnStealth v0.1
Reply With Quote #18

There is a cvar for Exolents version I believe that lets you keep it at that or gain money or just take it away.
__________________
Killer12201 is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 10-31-2010 , 06:58   Re: HnStealth v0.1
Reply With Quote #19

Fiew monthes without any code update, code repeated lot of times, unapproved.
Feel free to PM any plugin approver if you want the plugin to be submitted again.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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 13:12.


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