Raised This Month: $ Target: $400
 0% 

Necesito ayuda con mi ZP Levels


  
 
 
Thread Tools Display Modes
Author Message
Sidix
Senior Member
Join Date: Feb 2011
Location: Limbo City
Old 02-14-2011 , 08:17   Necesito ayuda con mi ZP Levels
#1

Hola a todos soy nuevo en el foro y necesito ayuda que pasa con mi zp tiene un bug en los ammo packs

bueno el bug es que yo mato un zombie y yo en la cfg puse que los zombies dieran al ser matados 5 ammopacks pero cuando el humano mata al zombie en el hud de "- vida: 1000.." sale en 5 siempre porque ? se supone que si tenía 5 ammopacks por default en el juego ya serian 10 por el zombie que maté, intenté acomadar en el showhud aver si era ahii pero sigue igual.

gracias de antemano !!!

dejo source code del Show Hud aver si me ayudan en algo que habré echo mal!

PHP Code:
// Spectating someone else?
    
if (id != ID_SHOWHUD)
    {
        static 
name[32]
        
get_user_name(idnamesizeof name 1)
        
        
// Show name, health, class, and ammo packs
        
set_hudmessage(255255255HUD_SPECT_XHUD_SPECT_Y06.01.10.00.0, -1)
        
ShowSyncHudMsg(ID_SHOWHUDg_MsgSync2"- Level: %d ^n- %L %s^n- HP: %d ^n- %L %s ^n- %L %d"ID_SHOWHUD"SPECTATING"Get_PlayerLevel(id), namepev(idpev_health), ID_SHOWHUD"CLASS_CLASS", class, ID_SHOWHUD"AMMO_PACKS1"g_ammopacks[id], Get_AmmoPacks_per_Level(id))
    }
    else
    {
        
// Show health, class and ammo packs
        
set_hudmessage(g_hud_color[id][0], g_hud_color[id][1], g_hud_color[id][2], HUD_STATS_X[id], HUD_STATS_Y[id], HUD_STATS_T[id], 2.01.10.00.0, -1)
        
ShowSyncHudMsg(ID_SHOWHUDg_MsgSync2"- Level: %d ^n- %L: %d ^n- %L %s ^n- %L %d ^n- Zombies matados: %d ^n- Humanos matados: %d ^n- Infectados: %d"Get_PlayerLevel(ID_SHOWHUD), id"ZOMBIE_ATTRIB1"pev(ID_SHOWHUDpev_health), ID_SHOWHUD"CLASS_CLASS", class, ID_SHOWHUD"AMMO_PACKS1"g_ammopacks[ID_SHOWHUD], Get_AmmoPacks_per_Level(ID_SHOWHUD), Zombies[id], Humanos[id], Infectados[id])
    }


y este es la restriccion de clases de zombies
PHP Code:
// Buy Menu 1
public show_menu_buy1(taskid)
{
    
// Get player id
    
static id
    
(taskid g_maxplayers) ? (id ID_SPAWN) : (id taskid);
    
    
// Zombies or survivors get no guns
    
if (g_zombie[id] || g_survivor[id] || !is_user_alive(id))
        return;
    
    
// Bots pick their weapons randomly
    
if (is_user_bot(id))
    {
        
buy_primary_weapon(idrandom_num(0sizeof g_primary_items 1))
        
menu_buy2(idrandom_num(0sizeof g_secondary_items 1))
        return;
    }
    
    
// Automatic selection enabled for player and menu called on spawn event
    
if (WPN_AUTO_ON && taskid g_maxplayers)
    {
        
buy_primary_weapon(idWPN_AUTO_PRI)
        
menu_buy2(idWPN_AUTO_SEC)
        return;
    }
    
    static 
menu[999], lenweap
    len 
0
    
    
// Title
    
len += formatex(menu[len], sizeof menu len"\y%L \r[%d-%d]^n^n"id"MENU_BUY1_TITLE"WPN_STARTID+1min(WPN_STARTID+7WPN_MAXIDS))
    
    
// 1-7. Weapon List
    
for (weap WPN_STARTIDweap min(WPN_STARTID+7WPN_MAXIDS); weap++) {
        if(
Get_PlayerLevel(id) >= PrimaryWeaponLevel[weap]) {
            
len += formatex(menu[len], sizeof menu len"\r%d. \w%s \y[Disponible]^n"weap-WPN_STARTID+1WEAPONNAMES[get_weaponid(g_primary_items[weap])])
        }
        else {
            
len += formatex(menu[len], sizeof menu len"\d%d. \w%s \r[Nivel %d]^n"weap-WPN_STARTID+1WEAPONNAMES[get_weaponid(g_primary_items[weap])], PrimaryWeaponLevel[weap])        
        }
    }
    
    
// 8. Auto Select
    
len += formatex(menu[len], sizeof menu len"^n\r8.\w %L \y[%L]"id"MENU_AUTOSELECT"id, (WPN_AUTO_ON) ? "MOTD_ENABLED" "MOTD_DISABLED")
    
    
// 9. Next/Back - 0. Exit
    
len += formatex(menu[len], sizeof menu len"^n^n\r9.\w %L/%L^n^n\r0.\w %L"id"MENU_NEXT"id"MENU_BACK"id"MENU_EXIT")
    
    
show_menu(idKEYSMENUmenu, -1"Buy Menu 1")
}

// Buy Menu 2
show_menu_buy2(id) {
    if(
is_user_connected(id)) {
        static 
menu[999], lenweap
        len 
0
        
        
// Title
        
len += formatex(menu[len], sizeof menu len"\y%L^n"id"MENU_BUY2_TITLE")
        
        
// 1-6. Weapon List
        
for (weap 0weap sizeof g_secondary_itemsweap++) {
            if(
Get_PlayerLevel(id) >= SecondaryWeaponLevel[weap])
            {
                
len += formatex(menu[len], sizeof menu len"^n\r%d. \w%s  \y[Disponible]^n"weap+1WEAPONNAMES[get_weaponid(g_secondary_items[weap])])
            }
            else
            {
                
len += formatex(menu[len], sizeof menu len"^n\d%d. \w%s \r[Nivel %d]^n"weap+1WEAPONNAMES[get_weaponid(g_secondary_items[weap])], SecondaryWeaponLevel[weap])    
            }
        }
        
        
// 8. Auto Select
        
len += formatex(menu[len], sizeof menu len"^n^n\r8.\w %L \y[%L]"id"MENU_AUTOSELECT"id, (WPN_AUTO_ON) ? "MOTD_ENABLED" "MOTD_DISABLED")
        
        
// 0. Exit
        
len += formatex(menu[len], sizeof menu len"^n^n\r0.\w %L"id"MENU_EXIT")
        
        
show_menu(idKEYSMENUmenu, -1"Buy Menu 2")
    }


PHP Code:
// Zombie Class Menu
public show_menu_zclass(id)
{
    
// Player disconnected
    
if (!is_user_connected(id))
        return;
    
    
// Bots pick their zombie class randomly
    
if (is_user_bot(id))
    {
        
g_zombieclassnext[id] = random_num(0g_zclass_i 1)
        return;
    }
    
    static 
menu[999], len, class
    
len 0
    
    
// Title
    
len += formatex(menu[len], sizeof menu len"\y%L \r[%d-%d]^n^n"id"MENU_ZCLASS_TITLE"ZCLASSES_STARTID+1min(ZCLASSES_STARTID+7g_zclass_i))
    
    
// 1-7. Class List
    
for (class = ZCLASSES_STARTID; class < min(ZCLASSES_STARTID+7g_zclass_i); class++)
    {
        if (
Get_PlayerLevel(id) >= g_zclass_lvl[class])
        {
            if (class == 
g_zombieclassnext[id])
                
len += formatex(menu[len], sizeof menu len"\d%d. %s %s^n", class-ZCLASSES_STARTID+1g_zclass_name[class], g_zclass_info[class])
            else
                
len += formatex(menu[len], sizeof menu len"\r%d.\w %s\y %s^n", class-ZCLASSES_STARTID+1g_zclass_name[class], g_zclass_info[class])
        }
        else
            
len += formatex(menu[len], sizeof menu len"\r%d.\d %s %s\r (Nivel Requerido: %d)^n", class-ZCLASSES_STARTID+1g_zclass_name[class], g_zclass_info[class], g_zclass_lvl[class])  
    }
    
    
// 8. Back - 9. Next - 0. Exit
    
len += formatex(menu[len], sizeof menu len"^n\r8.\w %L^n\r9.\w %L^n^n\r0.\w %L"id"MENU_BACK"id"MENU_NEXT"id"MENU_EXIT")
    
    
show_menu(idKEYSMENUmenu, -1"Zombie Class Menu")

este del menu handlers

PHP Code:
// Buy Menu 1
public menu_buy1(idkey)
{
    if(
is_user_connected(id)) {
        
// Zombies or survivors get no guns
        
if (g_zombie[id] || g_survivor[id] || !is_user_alive(id))
            return 
PLUGIN_HANDLED;
        
        
// Special keys / weapon list exceeded
        
if (key >= MENU_KEY_AUTOSELECT || WPN_SELECTION >= WPN_MAXIDS)
        {
            switch (
key)
            {
                case 
MENU_KEY_AUTOSELECT// toggle auto select
                
{
                    
WPN_AUTO_ON WPN_AUTO_ON
                
}
                case 
MENU_KEY_NEXT// next/back
                
{
                    if (
WPN_STARTID+WPN_MAXIDS)
                        
WPN_STARTID += 7
                    
else
                        
WPN_STARTID 0
                
}
                case 
MENU_KEY_EXIT// exit
                
{
                    return 
PLUGIN_HANDLED;
                }
            }
            
            
// Show buy menu again
            
show_menu_buy1(id)
            return 
PLUGIN_HANDLED;
        }
        
        if(
Get_PlayerLevel(id) < PrimaryWeaponLevel[WPN_SELECTION]) {
            
show_menu_buy1(id)
            
client_print(idprint_chat"Necesitas ser Nivel mas alto para usar esta arma (Nivel Requerido %d)"PrimaryWeaponLevel[WPN_SELECTION])
            
            return 
PLUGIN_HANDLED
        
}
        
        
// Store selected weapon id
        
WPN_AUTO_PRI WPN_SELECTION
        
        
// Buy primary weapon
        
buy_primary_weapon(idWPN_AUTO_PRI)
        
        
// Show pistols menu
        
show_menu_buy2(id)
    }
    return 
PLUGIN_HANDLED;
}

// Buy Primary Weapon
buy_primary_weapon(idselection)
{
    
// Drop previous weapons
    
drop_weapons(id1)
    
drop_weapons(id2)
    
    
// Strip off from weapons
    
fm_strip_user_weapons(id)
    
fm_give_item(id"weapon_knife")
    
    
// Get weapon index
    
static weaponid
    weaponid 
get_weaponid(g_primary_items[selection])
    
    
// Give the new weapon
    
fm_give_item(idg_primary_items[selection])
    
fm_set_user_bpammo(idweaponidMAXBPAMMO[weaponid])
    
    
// Weapons bought
    
g_canbuy[id] = false
    
    
// Give additional items
    
static i
    
for (0sizeof g_additional_itemsi++)
        
fm_give_item(idg_additional_items[i])
}

// Buy Menu 2
public menu_buy2(idkey)
{    
    
// Zombies or survivors get no guns
    
if (g_zombie[id] || g_survivor[id] || !is_user_alive(id))
        return 
PLUGIN_HANDLED;
    
    
// Special keys / weapon list exceeded
    
if (key >= sizeof g_secondary_items)
    {
        
// Toggle autoselect
        
if (key == MENU_KEY_AUTOSELECT)
            
WPN_AUTO_ON WPN_AUTO_ON
        
        
// Reshow menu unless user exited
        
if (key != MENU_KEY_EXIT)
            
show_menu_buy2(id)
        
        return 
PLUGIN_HANDLED;
    }
    
    if(
Get_PlayerLevel(id) < SecondaryWeaponLevel[key]) {
        
show_menu_buy2(id)
        
client_print(idprint_chat"Necesitas ser Nivel mas alto para usar esta arma (Nivel Requerido %d)"SecondaryWeaponLevel[key])
        
        return 
PLUGIN_HANDLED
    
}
    
    
// Store selected weapon
    
WPN_AUTO_SEC key
    
    
// Drop secondary gun again, in case we picked another (bugfix)
    
drop_weapons(id2)
    
    
// Get weapon index
    
static weaponid
    weaponid 
get_weaponid(g_secondary_items[key])
    
    
// Give the new weapon with full ammo
    
fm_give_item(idg_secondary_items[key])
    
fm_set_user_bpammo(idweaponidMAXBPAMMO[weaponid])
    
    return 
PLUGIN_HANDLED
pd: si el problema no es ahii avisen para dejar el sma aver si serian amables de verlo

Last edited by Sidix; 02-14-2011 at 08:25.
Sidix is offline
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 02-14-2011 , 08:19   Re: Necesito ayuda con mi ZP Levels
#2

que cvar editaste ?
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
Sidix
Senior Member
Join Date: Feb 2011
Location: Limbo City
Old 02-14-2011 , 08:27   Re: Necesito ayuda con mi ZP Levels
#3

no edité cvar el problema esta en los ammopacks o en el HUD DE STATS no suma los ammopacks ganados !!! reeditee ahii
Sidix is offline
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 02-14-2011 , 08:42   Re: Necesito ayuda con mi ZP Levels
#4

tenes que editar la cvar de human damage reward , ponela en 1 y proba.

Si no suma , tenes algo mal editado en el takedamage.
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
Sidix
Senior Member
Join Date: Feb 2011
Location: Limbo City
Old 02-14-2011 , 08:44   Re: Necesito ayuda con mi ZP Levels
#5

Quote:
Originally Posted by lucas_7_94 View Post
tenes que editar la cvar de human damage reward , ponela en 1 y proba.

Si no suma , tenes algo mal editado en el takedamage.

voy a probar
__________________
[IMG]http://img839.**************/img839/1879/dmcdanteprofile.png[/IMG]
Sidix 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 22:37.


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