Raised This Month: $ Target: $400
 0% 

Debug hmmm.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
~Ice*shOt
Veteran Member
Join Date: Mar 2009
Location: Lithuania
Old 06-05-2009 , 09:29   Debug hmmm.
Reply With Quote #1

PHP Code:
public HumanUpgrades(id)
{
    if (!
is_user_alive(id))
        return
    new 
menu menu_create("Humans Abilities""HumanUpgrades_handle")

    if (
get_pcvar_num(sg_enable) == 1)
    {
    new 
sgmsg[60]
    
format(sgmsg59"\wSmokeGrenade Level (%d/%d)"SgLevel[id], maxlevel_sg)

    
menu_additem(menusgmsg"1"0)
    }

    if(
PlayerLevel[id] >= && get_pcvar_num(ap_enable) == 1)
    {
    new 
apmsg[60]
    
format(apmsg59"\wArmor Level (%d/%d)"ArmorLevel[id], maxlevel_ap)

    
menu_additem(menuapmsg"2"0)
    }

    if (
get_pcvar_num(hp_enable) == 1)
    {    
    new 
hpmsg[60]
    
format(hpmsg59"\wHealth Level (%d/%d)"HealthLevel[id], maxlevel_hp)

    
menu_additem(menuhpmsg"3"0)
    }

    
menu_setprop(menuMPROP_EXITMEXIT_ALL)

    
menu_display(idmenu0)
}

public 
HumanUpgrades_handle(idmenuitem)
{
    if (
item == MENU_EXIT)
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}
    new 
data[6], iName[64]
    new 
accesscallback
    menu_item_getinfo
(menuitemaccessdata,5iName63callback)
    new 
key str_to_num(data)

    switch(
key)
    {
        case 
1:{
            if(
PlayerPoints[id] > 0)
            {
            if(
SgLevel[id] >= maxlevel_sg
            {
                return 
PLUGIN_HANDLED
            
}
            
SgLevel[id] += 1
            client_printcolor
(id"/g+1 /yto /ctrSmokeGrenades Level")

            
PlayerPoints[id] -= 1
            HumanUpgrades
(id)
            }
            }
        case 
2:{
            if(
PlayerPoints[id] > 0)
            {
            if(
ArmorLevel[id] >= maxlevel_ap
            {
                return 
PLUGIN_HANDLED
            
}
            
ArmorLevel[id] += 1
            client_printcolor
(id"/g+1 /yto /ctrArmor Level")

            
PlayerPoints[id] -= 1
            HumanUpgrades
(id)
            }
            }
        case 
3:{
            if(
PlayerPoints[id] > 0)
            {
            if(
HealthLevel[id] >= maxlevel_hp
            {
                return 
PLUGIN_HANDLED
            
}
            
HealthLevel[id] += 1
            client_printcolor
(id"/g+1 /yto /ctrHealth Level")

            
PlayerPoints[id] -= 1
            HumanUpgrades
(id)
            }
        }
    }

What i doing bad ? this print in server console Debug
~Ice*shOt is offline
Send a message via Skype™ to ~Ice*shOt
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-05-2009 , 11:52   Re: Debug hmmm.
Reply With Quote #2

Again...
__________________
Arkshine 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 14:06.


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