Raised This Month: $ Target: $400
 0% 

T-Virus Antidote


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Emilioneri
Senior Member
Join Date: Feb 2009
Location: Georgia, Tbilisi
Old 05-09-2009 , 12:06   Re: T-Virus Antidote
Reply With Quote #1

so, this code will work
PHP Code:
/* Plugin generated by Emilioneri */

#include <amxmodx>
#include <amxmisc>
#include <biohazard>
#include <cstrike>

#define PLUGIN "T-Virus Antidote"
#define VERSION "1.0"
#define AUTHOR "Emilioneri"

new g_Cost


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
// Add your code here...
    
g_Cost register_cvar("amx_antidotecost""5000")
    
register_clcmd("say /antidote""cmd_antidote")
    
register_logevent("Event_Round_Start"2"1=Round_Start")
}

public 
Event_Round_Start()
{
    
client_print(0print_chat"To buy an Antidote type in chat: /antidote")
}

public 
cmd_antidote(id)
{       
    if(!
is_user_alive(id))
    {
        
client_print(idprint_chat"You can't buy an antidote while you are dead!");
        return 
PLUGIN_HANDLED;
    }
    
    if(!
is_user_zombie(id))
    {
        
client_print(idprint_chat"You can't buy an antidote, because you are a human");
        return 
PLUGIN_HANDLED;
    }
    
    new 
iMoney cs_get_user_money(id)
    new 
iCost get_pcvar_num(g_Cost)
    
    if(
iMoney >= iCost)
    {
        
cs_set_user_money(idiMoney iCost)
        
cure_user(id)
        
client_print(idprint_chat"You have used an antidote");
        return 
PLUGIN_HANDLED;
    }
    else
    {
        
client_print(idprint_chat"You don't have enaugh moeny! $%i needed!"iCost)
    }
    return 
PLUGIN_HANDLED;

__________________
Emilioneri is offline
Send a message via Skype™ to Emilioneri
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 05-09-2009 , 13:27   Re: T-Virus Antidote
Reply With Quote #2

The best way to know that, is testing it. Should work tough.
__________________

anakin_cstrike 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 01:31.


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