Raised This Month: $ Target: $400
 0% 

Plugin Error [NEW PROBLEM]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
X-Script
BANNED
Join Date: Jul 2007
Location: (#504434)
Old 09-05-2007 , 18:27   Re: Plugin Error [NEW PROBLEM]
Reply With Quote #7

Alright, I fixed that stuff and it still doesn't work.

Could it be because i'm using a cs_set_user_money function and i'm running Condition-Zero? I know some CS plugins run with CZ though.

Anyway, heres the latest code(Tested and Failed)

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>

#define PLUGIN "Shoes Mod"
#define VERSION "1.0"
#define AUTHOR "X-Script"

new ShoesMod
new ShoesCost

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_menucmd(register_menuid("Shoes Choose"),(1<<0)|(1<<1)|(1<<2)|(1<<3),"SelectShoes")
    
    
register_concmd("say /shoes""selectshoes")
    
register_concmd("say_team /shoes""selectshoes")
    
register_concmd("say /shoesinfo""shoesinfo")
    
register_concmd("say_team /shoesinfo""shoesinfo")
    
    
ShoesMod register_cvar("amx_shoesmod""1")
    
ShoesCost register_cvar("amx_shoesmod_cost""10000")
}

public 
client_putinserver(id)
{
    
set_task(11.0,"advertise",id)
}

public 
advertise(id)
{
    
client_print(idprint_chat"[ShoesMod] This server is running 'Shoes Mod' by X-Script VERSION 1.0!")
    
client_print(idprint_chat"[ShoesMod] Type /shoes too select a shoe, type /shoesinfo to display information!")
    return 
PLUGIN_HANDLED
}

public 
selectshoes(id)
{
    new 
menuBody[1024]
    
format(menuBody,1023,"ShoeMod Main Menu ^n^n 1. Gravity Shoes [+Gravity / -Speed]^n 2. Speed Shoes [+Speed / -Gravity]^n 3. Health Shoes [+Health / -Armor]^n^n 0. Finished")
    
show_menu(id,(1<<0)|(1<<1)|(1<<2)|(1<<3),menuBody,13,"Shoes Choose")
}

public 
SelectShoes(id,key)
{
    if ( 
get_pcvar_num(ShoesMod) == )
    {
        
client_print(idprint_chat"[ShoesMod] The function you tried to use is currently disabled.")
        return 
PLUGIN_HANDLED
    
}
    
    switch(
key)
    {
        case 
0:
        {
            new 
playercash cs_get_user_money(id)
            new 
maincost get_pcvar_num(ShoesCost)
            
            if ( 
playercash maincost )
            {
                
client_print(idprint_chat"[ShoesMod] You do not have enough money to purchase a shoe.")
                return 
PLUGIN_CONTINUE
            
}
            else
            {
                
cs_set_user_money(idplayercash maincost)
                
set_user_gravity(id0.5)
                
                
get_user_maxspeed(id)
                
set_user_maxspeed(id210)
                new 
name[32]
                
get_user_name(id,name,32)
                
set_hudmessage(200,255,2000.030.6220.022.00.010.11)
                
show_hudmessage(0"%s has just bought Gravity Shoes, beware!",name)
            }
        }
        case 
1:
        {
            new 
playercash cs_get_user_money(id)
            new 
maincost get_pcvar_num(ShoesCost)
            
            if ( 
playercash maincost )
            {
                
client_print(idprint_chat"[ShoesMod] You do not have enough money to purcahse a shoe.")
                return 
PLUGIN_CONTINUE
            
}
            else
            {
                
cs_set_user_money(idplayercash maincost)
                
get_user_maxspeed(id)
                
set_user_maxspeed(id860)
                
set_user_gravity(id1.5)
                
                new 
name[32]
                
get_user_name(id,name,32)
                
set_hudmessage(120,200,980.030.6220.022.00.010.11)
                
show_hudmessage(0"%s has just bought Speed Shoes, beware!",name)
            }
        }
        case 
2:
        {
            new 
playercash cs_get_user_money(id)
            new 
maincost get_pcvar_num(ShoesCost)
            
            if ( 
playercash maincost )
            {
                
client_print(idprint_chat"[ShoesMod] You do not have enough money to purchase a shoe.")
                return 
PLUGIN_CONTINUE
            
}
            else
            {
                
cs_set_user_money(idplayercash maincost)
                
set_user_health(id210)
                
client_cmd(0"spk ^"fvox/beep _comma beep _comma beep _comma administering_medical^"")
                
set_user_armor(id20)
                
                new 
name[32]
                
get_user_name(id,name,32)
                
set_hudmessage(200,50,1750.030.6220.022.00.010.11)
                
show_hudmessage(0"%s has just bought Speed Shoes, beware!",name)
            }
        }
        case 
3:
        {
        
        }
    }
    return 
PLUGIN_HANDLED

X-Script is offline
 



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 16:08.


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