Raised This Month: $ Target: $400
 0% 

[ZP] Crear Niveles + Guardarlos con Nvault [Update 2]


  
 
 
Thread Tools Display Modes
ahré
BANNED
Join Date: May 2010
Old 05-22-2010 , 15:09   Re: [ES][ZP][TUT] Crear Niveles + Guardarlos con Nvault [Update 2]
#71

Como hago para que las armas salgan ordenadas segun su nivel ?
ahré is offline
Kiske
Veteran Member
Join Date: May 2009
Old 05-22-2010 , 15:30   Re: [ES][ZP][TUT] Crear Niveles + Guardarlos con Nvault [Update 2]
#72

Pones:
PHP Code:
new const g_levelprimary[] = { 1252133791010104
Y lo ordenas como a vos se te antoje, y saldrán así.
__________________

Kiske is offline
Send a message via Skype™ to Kiske
Old 05-23-2010, 21:33
Tidius
This message has been deleted by Tidius.
Tidius
Senior Member
Join Date: Apr 2008
Location: Argentina, Buenos Aires
Old 05-24-2010 , 23:36   Re: [ES][ZP][TUT] Crear Niveles + Guardarlos con Nvault [Update 2]
#73

Bien, ya entendi como se hace, pero me perdi en esta parte:

PHP Code:
// tambien pueden guardar los ap cada vez que termina la ronda (si quieren)
// van a public logevent_round_end()
public logevent_round_end()
{
    
// code code code
    
    // code code code
    
    // code code code
    
    // abajo de todo el public ponemos lo mismo que hicimos con "fw_ServerOff"
    
    // loop de todos los players
    
static id;
    for (
id 1id <= g_maxplayersid++)
    {
    
    
// checkeamos si esta conectado
    // para qe no lo haga 32 veces,
    // por qe el sv, puede llegar a estar 32/32 o no
    // y lo repita las veces nesesarias
        
if(is_user_connected(id))
        {
            
// Guardamos
            
Save(id)
        }
    }

Aca esto que significa:

// code code code

// code code code

// code code code
Tidius is offline
Good
BANNED
Join Date: May 2010
Location: Argentina, Mendoza
Old 05-24-2010 , 23:42   Re: [ES][ZP][TUT] Crear Niveles + Guardarlos con Nvault [Update 2]
#74

Que continua el codigo. O que existe codigos.
Good is offline
Tidius
Senior Member
Join Date: Apr 2008
Location: Argentina, Buenos Aires
Old 05-24-2010 , 23:51   Re: [ES][ZP][TUT] Crear Niveles + Guardarlos con Nvault [Update 2]
#75

Gracias jeje (:

Edit:

Bueno lo terminé y estaba esperando que compile bien, pero era obvio que una cagada o "varias" me mande...

y no entiendo nada... osea no se arreglar esos errores, lo que entiendo es que en esa linea hay un error y que yo poniendo en "Go to line" o una cosa asi, voy directamente... pero no se cual es el error

[IMG]http://img9.**************/img9/1442/eeerrorr.png[/IMG]
http://img9.**************/img9/1442/eeerrorr.png
Tidius is offline
Good
BANNED
Join Date: May 2010
Location: Argentina, Mendoza
Old 05-24-2010 , 23:59   Re: [ES][ZP][TUT] Crear Niveles + Guardarlos con Nvault [Update 2]
#76

Cuando te saltan 26 errores, es porque te falta un "{}, []" tambien comas, puntos, fijate bien en todo lo nuevo que has puesto en los ultimos minutos.
Good is offline
Tidius
Senior Member
Join Date: Apr 2008
Location: Argentina, Buenos Aires
Old 05-25-2010 , 00:04   Re: [ES][ZP][TUT] Crear Niveles + Guardarlos con Nvault [Update 2]
#77

Quote:
Originally Posted by Good View Post
Cuando te saltan 26 errores, es porque te falta un "{}, []" tambien comas, puntos, fijate bien en todo lo nuevo que has puesto en los ultimos minutos.
Es que no entiendo muy bien como agregar algunas cosas, porque son un poco confusas :S

Gracias, ahora me fijo.
Tidius is offline
Good
BANNED
Join Date: May 2010
Location: Argentina, Mendoza
Old 05-25-2010 , 00:31   Re: [ES][ZP][TUT] Crear Niveles + Guardarlos con Nvault [Update 2]
#78

Es por ahora, cuando tengas mas experiencia vas a ver que es una pavada.
Good is offline
ZPF4N
BANNED
Join Date: May 2010
Old 05-25-2010 , 15:45   Re: [ES][ZP][TUT] Crear Niveles + Guardarlos con Nvault [Update 2]
#79

PHP Code:
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;
    }
    
    
// 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])
    
    
// si no tiene nivel suficiente we
    // la bloquea, el print lo explica todo :B
    
if(g_level[id] < g_levelsecundary[key])
    {
        
show_menu_buy2(id)
        
client_print(idprint_center"No Tenes Nivel Suficiente Para usar esta Arma (Nivel Requerido %d)"g_secondary_level[key])
        
zp_colored_print(id"^x04[ZP]^x01  No Tenes Nivel Suficiente Para usar esta Arma ^x03(Nivel Requerido %d)"g_secondary_level[key])
        
        return 
PLUGIN_HANDLED;
    }
    
    return 
PLUGIN_HANDLED;

Esto esta MAL.
seria asi.

PHP Code:
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;
    }
    
    
// Store selected weapon
    
WPN_AUTO_SEC key

    
if(g_level[id] < g_levelsecundary[key])
     {
         
show_menu_buy2(id)
         
client_print(idprint_center"No Tenes Nivel Suficiente Para  usar esta Arma (Nivel Requerido %d)"g_secondary_level[key])
         
zp_colored_print(id"^x04[ZP]^x01  No Tenes Nivel Suficiente  Para usar esta Arma ^x03(Nivel Requerido %d)"g_secondary_level[key])
         
         return 
PLUGIN_HANDLED;
     }

    
// 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])
    
    
// si no tiene nivel suficiente we
    // la bloquea, el print lo explica todo :B
    
    
return PLUGIN_HANDLED;

ZPF4N is offline
lucasp3000
Member
Join Date: Jul 2009
Location: argentina
Old 07-10-2010 , 15:53   Re: [ES][ZP][TUT] Crear Niveles + Guardarlos con Nvault [Update 2]
#80

ami me dice de error
invalid function or declaration

Last edited by lucasp3000; 07-10-2010 at 15:55. Reason: me eqivoque
lucasp3000 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:49.


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