Raised This Month: $ Target: $400
 0% 

T-Virus Antidote


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Emilioneri
Senior Member
Join Date: Feb 2009
Location: Georgia, Tbilisi
Old 05-08-2009 , 17:29   T-Virus Antidote
Reply With Quote #1

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!")
    }
    
    if(!
is_user_zombie(id))
    {
        
client_print(idprint_chat"You can't buy an antidote, because you are a human")
    }
    
    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")
    }
    else
    {
        
client_print(idprint_chat"You don't have enaugh moeny! $%i needed!"iCost)
    }

I've got 2 questions:
1. Why this code doesn't work
2. Why is "cs_get_user_money" useless And what way Biohazard uses to set money
3. +k who will help me!
__________________
Emilioneri is offline
Send a message via Skype™ to Emilioneri
 


Thread Tools
Display Modes

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