Raised This Month: $ Target: $400
 0% 

[ZP] Problema al restringir armas


  
 
 
Thread Tools Display Modes
Author Message
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 02-19-2011 , 12:34   Re: [ZP] Problema al restringir armas
#1

Y no, se repite dos veces.

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"\r%L \y[%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(
g_level[id] >= g_levelprimary[weap])
            
len += formatex(menu[len], sizeof menu len"\r%d.\w %s \y[Level %d]^n"weap-WPN_STARTID+1WEAPONNAMES[get_weaponid(g_primary_items[weap])], g_levelprimary[weap])
        else
            
len += formatex(menu[len], sizeof menu len"\d%d. %s [Level %d]^n"weap-WPN_STARTID+1WEAPONNAMES[get_weaponid(g_primary_items[weap])], g_levelprimary[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.\y %L/%L^n^n\r0.\y %L"id"MENU_NEXT"id"MENU_BACK"id"MENU_EXIT")
    
    
show_menu(idKEYSMENUmenu, -1"Buy Menu 1")
}

// Buy Menu 2
show_menu_buy2(id)
{
    static 
menu[999], lenweap
    len 
0
    
    
// Title
    
len += formatex(menu[len], sizeof menu len"\r%L^n"id"MENU_BUY2_TITLE")
    
    
// 1-6. Weapon List
    
for (weap 0weap sizeof g_secondary_itemsweap++)
    {
        if(
g_level[id] >= g_levelsecondary[weap])
            
len += formatex(menu[len], sizeof menu len"^n\r%d.\w %s  \y[Level %d]"weap+1WEAPONNAMES[get_weaponid(g_secondary_items[weap])], g_levelsecondary[weap])
        else
            
len += formatex(menu[len], sizeof menu len"^n\d%d. %s [Level %d]"weap+1WEAPONNAMES[get_weaponid(g_secondary_items[weap])], g_levelsecondary[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.\y %L"id"MENU_EXIT")
    
    
show_menu(idKEYSMENUmenu, -1"Buy Menu 2")

Indetado y arreglado.

Problem, pajero?
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS 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