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

Zombie Antidote v1.5 [+Antidote Gun!!] [BIOHAZARD]


Post New Thread Reply   
 
Thread Tools Display Modes
crazyeffect
Veteran Member
Join Date: Jul 2008
Location: Belgium
Old 08-06-2009 , 05:13   Re: Zombie Antidote v1.0 [BIOHAZARD]
Reply With Quote #11

Doesn't it need to be:

PHP Code:
if(money <= antidote_cost
?

Or something?
__________________
crazyeffect is offline
Send a message via MSN to crazyeffect
nisam_ja
BANNED
Join Date: Sep 2008
Location: osijek
Old 08-06-2009 , 06:47   Re: Zombie Antidote v1.0 [BIOHAZARD]
Reply With Quote #12

gonna watch this thread XD
nisam_ja is offline
Send a message via MSN to nisam_ja Send a message via Skype™ to nisam_ja
ds811888
BANNED
Join Date: Mar 2009
Location: Hong Kong
Old 08-07-2009 , 05:55   Re: Zombie Antidote v1.0 [BIOHAZARD]
Reply With Quote #13

Quote:
Originally Posted by crazyeffect View Post
Doesn't it need to be:

PHP Code:
if(money <= antidote_cost
?

Or something?
Thanks, bug are fixed.
ds811888 is offline
CS MAFIA
BANNED
Join Date: Nov 2008
Old 08-12-2009 , 15:01   Re: Zombie Antidote v1.1 [BIOHAZARD]
Reply With Quote #14

What is this?

Can you fix it?
CS MAFIA is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 08-14-2009 , 17:41   Re: Zombie Antidote v1.1 [BIOHAZARD]
Reply With Quote #15

This plugin needs testing. If anyone can report that it does or doesn't work, please post.

If you would like any information regarding possible adjustments you could make or things you could do to make this better, please feel free to post here or PM me.

Approval pending on changes.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
mando127
Veteran Member
Join Date: Dec 2006
Location: virginia
Old 08-14-2009 , 18:37   Re: Zombie Antidote v1.1 [BIOHAZARD]
Reply With Quote #16

i will test it in a bit if i get time.
__________________
mando127 is offline
Send a message via Skype™ to mando127
ds811888
BANNED
Join Date: Mar 2009
Location: Hong Kong
Old 08-15-2009 , 07:21   Re: Zombie Antidote v1.1 [BIOHAZARD]
Reply With Quote #17

@CS MAFIA: Try %s to %i.
@Hawk552: This plugins i have tested, but forget to found bug.
ds811888 is offline
5c0r-|3i0
Veteran Member
Join Date: Nov 2008
Location: Việt Nam
Old 08-15-2009 , 07:49   Re: Zombie Antidote v1.1 [BIOHAZARD]
Reply With Quote #18

Doesn't work....At least for me ...I have enough money and it still says ...Not enough money
5c0r-|3i0 is offline
mando127
Veteran Member
Join Date: Dec 2006
Location: virginia
Old 08-15-2009 , 16:11   Re: Zombie Antidote v1.1 [BIOHAZARD]
Reply With Quote #19

yes i tested it to it will not work.
__________________
mando127 is offline
Send a message via Skype™ to mando127
BeasT
Senior Member
Join Date: Apr 2007
Location: Lithuania
Old 08-16-2009 , 07:55   Re: Zombie Antidote v1.1 [BIOHAZARD]
Reply With Quote #20

This is the fixed version. Dunno, mb it can be optimized, but it works well. And you need to fix the lang file. Replace all %s to %d

PHP Code:
/* Plugin generated by ds811888 */

#include <amxmodx>
#include <fun>
#include <cstrike>
#include <fakemeta>
#include <biohazard>

#if !defined _biohazard_included 
        #assert Biohazard functions file required! 
#endif

#define OFFSET_NVGOGGLES    129
#define HAS_NVGS (1<<0)
#define USES_NVGS (1<<8)

new antidote_enabledantidote_costantidote_hudmessage
new gmsgNVGToggle
new g_msgMoney

public plugin_init()
{
    
/* Plugin */
    
register_plugin("Biohazard Zombie Antidote""1.1""ds811888")

    
g_msgMoney get_user_msgid("Money")
    
gmsgNVGToggle get_user_msgid("NVGToggle")
    
    
/* Commands */
    
register_clcmd("say /buy_antidote""infect_antidote")
    
register_clcmd("say buy_antidote""infect_antidote")
    
    
/* Pcvars */
    
antidote_enabled     register_cvar("antidote_enabled",     "1" )
    
antidote_cost         register_cvar("antidote_cost",     "5000")
    
antidote_hudmessage    register_cvar("antidote_hudmessage",     "1")

    
/* Language */
    
register_dictionary("bio_antidote.txt")
}

public 
infect_antidote(id)
{    
    if(
get_pcvar_num(antidote_enabled))
    {
        new 
money cs_get_user_money(id
        new 
price_antidote get_pcvar_num(antidote_cost)

        
/* Check user alive */
        
if(!is_user_alive(id))
            return 
PLUGIN_HANDLED

        
/* Check user zombie */
        
if(!is_user_zombie(id))
            return 
PLUGIN_HANDLED
    
        
/* Check user money */
        
if(money <= price_antidote)
        {
            
client_print(idprint_center"[BIO] %L"LANG_PLAYER"NOT_ENOUGH_MONEY" price_antidote)
        }
        else
        {
            
/* -user money to buy a zombie antidote */
            
message_begin(MSG_ONEg_msgMoney_id)
            
write_long(money-price_antidote// amount
            
write_byte(1// flash
            
message_end()
            
            
cs_set_user_money(idmoney-price_antidote

            
/* Client Print */
            
client_print(idprint_center"[BIO] %L"LANG_PLAYER"USED_ANTIDOTE")

            
/* Set user to survivor */
            
set_user_human(id)

            
/* HudMessage */
            
if(get_pcvar_num(antidote_hudmessage))
            {
                
set_hudmessage(00255, -1.00.53)
                
show_hudmessage(id"%L"LANG_PLAYER"AGAIN_SURVIVOR")
            }
        }
    }
    return 
PLUGIN_HANDLED
}

/* Set user to survivor */
stock set_user_human(id)
{
    
cure_user(id)
    
Remove_User_Nvgs(id)
    
    
/* Set user to CT TEAM */
    
cs_set_user_team(idCS_TEAM_CT)

    
/* reset user model */
    
cs_reset_user_model(id)

    
/* give user weapon */
    
give_item(id"weapon_m4a1")
    
give_item(id"weapon_deagle")

    
/* set user ammo */
    
cs_set_user_bpammo(idCSW_M4A190)
    
cs_set_user_bpammo(idCSW_DEAGLE35)
}

// ConnorMcLeod
Remove_User_Nvgs(id)
{
    new 
iNvgs get_pdata_int(idOFFSET_NVGOGGLES5)
    if( !
iNvgs )
    {
        return
    }
    if( 
iNvgs USES_NVGS )
    {
        
emit_sound(idCHAN_ITEM"items/nvg_off.wav"VOL_NORMATTN_NORM0PITCH_NORM)

        
emessage_begin(MSG_ONEgmsgNVGToggle_id)
        
ewrite_byte(0)
        
emessage_end()
    }
    
set_pdata_int(idOFFSET_NVGOGGLES05)


Last edited by BeasT; 08-16-2009 at 08:51. Reason: fixed another money bug
BeasT is offline
Send a message via Skype™ to BeasT
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 07:26.


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