Raised This Month: $ Target: $400
 0% 

Problem with cs_get_user_buyzone(index)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 08-19-2009 , 19:19   Problem with cs_get_user_buyzone(index)
Reply With Quote #1

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

#define PLUGIN    "BuyZone Example"
#define AUTHOR    "Alucard"
#define VERSION    "1.0"

new p_BuyZone

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say /buy""BuySomething")
    
    
p_BuyZone register_cvar("buy_zone""1")
}

public 
BuySomething(id)
{
    if(
get_pcvar_num(p_BuyZone) && !cs_get_user_buyzone(id) )
    {
        
client_print(idprint_chat"You need to be in a buyzone to buy something")
        return 
PLUGIN_HANDLED
    
}
    
client_print(idprint_chat"Take this!")
    return 
PLUGIN_HANDLED

Why dont work? o.o

I tried with "else"... i tried with "cs_get_user_buyzone(id) == 0" like other plugin... but is the same.

If i am in a buy zone i get this message:

Quote:
You need to be in a buyzone to buy something
If i am not in a buy zone i get the same message.
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
 


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 15:04.


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