Raised This Month: $51 Target: $400
 12% 

[ZP][AYUDA] mi sistema de cuentas no guarda levels


  
 
 
Thread Tools Display Modes
Author Message
espromet
BANNED
Join Date: Nov 2011
Location: Argentina
Old 12-18-2011 , 15:37   [ZP][AYUDA] mi sistema de cuentas no guarda levels
#1

Hola... bueno me paso por acá porque tengo un problema: mi sistema de cuentas no me guarda los levels... el tema es que tengo levels por frags.... y necesito saber si alguien me puede dar una manito para que mi sistema de cuentas guarde levels por frags, acá les dejo el sma de mi sistema de cuentas:

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fvault>
#include <fakemeta>
#include <zombie_plague_advance>

#define PLUGIN "Sistema de Cuentas"
#define VERSION "1.0"
#define AUTHOR "Manu"

new const NombreVaul[] = "Cuentas"
new const NombreVaul2[] = "Ammopacks"

new Contra[192]
new 
LogPw[192]
new 
ContraNueva[192]
new 
MalaPW[33]
new 
Reg[33]
new 
Intentos[33]
new 
CambiarPW[33]
new 
PuedoTeam[33]
new 
Cambiarmaxplayers

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("chooseteam""clcmd_changeteam")
    
register_clcmd("jointeam""clcmd_changeteam")
    
    
register_clcmd("Logueo_Contrasenia""Logueo")
    
register_clcmd("Registro_Contrasenia""Cuenta")
    
register_clcmd("Nueva_Contrasenia""NuevaContra")
    
    
register_forward(FM_ClientUserInfoChanged"fw_ClientUserInfoChanged")
    
    
register_event("HLTV""event_round_start""a""1=0""2=0")
    
    
maxplayers get_maxplayers()
    
    
Cambiar register_cvar("amx_equipo""1")
}

public 
Autoguardado(id)
{
    
Guardar(id)
    
    
set_task(10.0"Guardar"id)
}

public 
CargarAPs(id)
{
    static 
szData[512], szNombre[32]
    
    
get_user_name(idszNombrecharsmax(szNombre))
    
    if(!
fvault_get_data(NombreVaul2szNombreszDatacharsmax(szData)))
        return 
0
    
    zp_set_user_ammo_packs
(idstr_to_num(szData))
    
    return 
1
}

public 
Guardar(id)
{
    if( 
Reg[id] != )
        return 
PLUGIN_HANDLED
    
    
new szData[512], szNombre[32]
    
    
get_user_name(idszNombrecharsmax(szNombre))
    
    
formatex(szDatacharsmax(szData), "%d"zp_get_user_ammo_packs(id))
    
    
fvault_set_data(NombreVaul2szNombreszData)
    
    return 
PLUGIN_HANDLED
}

public 
FWClientUserInfoChangedIndexBuffer )
{
    if( !
is_user_connectedIndex ) )
        return 
FMRES_IGNORED;
    
    static 
NickName[32], NickOld[32]; get_user_nameIndexNickOld31 )
    
engfuncEngFunc_InfoKeyValueBuffer"name"NickName31 )
    
    if( 
equalNickNameNickOld ) )
        return 
FMRES_IGNORED;
    
    
engfuncEngFunc_SetClientKeyValueIndexBuffer"name"NickOld )
    
    
client_cmdIndex"name ^"%s^"; setinfo name ^"%s^""NickOldNickOld )
    
    return 
FMRES_SUPERCEDE;
}

public 
event_round_start()
{
    for( new 
id 1id maxplayersid++ )
    {
        
PuedoTeam[id] = 0
        Autoguardado
(id)
    }
}

public 
client_putinserver(id)
{
    
MalaPW[id] = 0
    Reg
[id] = 0
    Intentos
[id] = 0
    PuedoTeam
[id] = 0
    
    set_task
(0.1"clcmd_changeteam"id)
    
    
CargarAPs(id)
}

public 
clcmd_changeteam(id)
{
    static 
TeamTeam get_user_team(id)
    
    if( ( 
Team == || Team == ) && MalaPW[id] == && Reg[id] == )
        return 
PLUGIN_CONTINUE;
    else if( !
Reg[id] || MalaPW[id] )
    {
        new 
Menu menu_create("\r---Menu De Cuentas---""Mostrar")
        
        
menu_additem(Menu"\y-registrar nueva cuenta-""1"0)
        
menu_additem(Menu"\y-Loguearse con una cuenta existente-""2"0)
        
        
        
menu_setprop(Menu,MPROP_EXITNAME,"Salir")
        
        
menu_display(idMenu0
        
        return 
PLUGIN_HANDLED;
    }
    else
        
Llamar(id)
    
    return 
PLUGIN_HANDLED;
}

/*--------------------------------------------------------------------------------------------------
-----------------------------------------------Menu de Reg----------------------------------------*/

public Menu(id
{
    new 
Menu menu_create("\rRegistro""Mostrar")
    
    
menu_additem(Menu"\yRegistrar nueva cuenta""1"0)
    
menu_additem(Menu"\yLoguearse con una cuenta existente""2"0)
    
    
menu_addtext(Menu"\w^n^n^n"0)
    
    
menu_setprop(Menu,MPROP_EXITNAME,"Salir")
    
    
menu_display(idMenu0


public 
Mostrar(idMenuitem

    if (
item == MENU_EXIT
    { 
        
ChatColor(id"!g[ZP-Apocalipsis] Gracias por entrar al server ;)")
    } 
    
    new 
iData[6]; 
    new 
iAccess
    new 
iCallback
    new 
iName[64]; 
    
menu_item_getinfo(MenuitemiAccessiData5iName63iCallback
    
    switch (
str_to_num(iData)) 
    { 
        case 
1:
        { 
            
PreCuenta(id)
        }
        case 
2:
        { 
            if( 
Intentos[id] == )
            {
                
client_cmd(id"disconnect;echo MAXIMO DE INTENTOS ALCANZADOS;toggleconsole")
            }
            
PreLogueo(id)
        }
    } 
    
    return 
PLUGIN_HANDLED 
}

/*--------------------------------------------------------------------------------------------------
-------------------------------------------SOLO LOGUEO--------------------------------------------*/

public PreLogueo(id)
{
    new 
szData[512], szNombre[32]
    
    
get_user_name(idszNombre31)
    
    if( !
fvault_get_data(NombreVaulszNombreszDatacharsmax(szData)) )
    {
        
ChatColor(id"!g[ZP-Apocalipsis] !yNo estas Registrado")
        
Menu(id)
        return 
PLUGIN_HANDLED
    
}
    else
    {
        
client_cmd(id"messagemode Logueo_Contrasenia")
        
set_hudmessage(1702551270.00.0706.012.0)
        
show_hudmessage(id"Ingresa tu Contrasenia para Entrar")
    }
    
    return 
PLUGIN_HANDLED
}

public 
Logueo(id)
{
    new 
szData[512], szNombre[32], szContra[192]
    
    
get_user_name(idszNombre31)
    
    
read_argsLogPwcharsmax(LogPw) )
    
remove_quotesLogPw )
    
trimLogPw )
    
    if( !
fvault_get_data(NombreVaulszNombreszDatacharsmax(szData) ) )
        return 
0
    
    parse
(szDataszContra191)
    
    if( 
equal(szContra,LogPw) )
    {
        
Reg[id] = 1
        
        MalaPW
[id] = 0
        
        set_hudmessage
(25500, -1.0, -1.006.012.0)
        
show_hudmessage(id"--CONECTADO--")
    }
    else
    {
        
MalaPW[id] = 1
        Menu
(id)
        
        
Intentos[id]++
        
        
set_hudmessage(25500, -1.0, -1.006.012.0)
        
show_hudmessage(id"Contrasenia Incorrecta^n Intentalo de nuevo")
        
        return 
PLUGIN_HANDLED
    
}
    
    return 
1
}

/*--------------------------------------------------------------------------------------------------
------------------------------------------SOLO REGISTRO-------------------------------------------*/

public PreCuenta(id)
{
    new 
szData[512], szNombre[32]
    
    
get_user_name(idszNombre31)
    
    if( 
fvault_get_data(NombreVaulszNombreszDatacharsmax(szData)) )
    {
        
ChatColor(id"!g[Surf+Kill] !yYa estas Registrado, logueate")
        
Menu(id)
        return 
PLUGIN_HANDLED
    
}
    else
    {
        
client_cmd(id"messagemode Registro_Contrasenia")
        
set_hudmessage(1702551270.00.0706.012.0)
        
show_hudmessage(id"Ingresa una Contrasenia para Registrarte")
    }
    
    return 
PLUGIN_HANDLED
}

public 
Cuenta(id)
{
    
read_argsContracharsmax(Contra) )
    
remove_quotesContra )
    
trimContra )
    
    if( 
equal(Contra,"") || contain(Contra," ") != -)
    {
        
ChatColor(id"!g[Sistema de Cuentas] !yLa contrasenia debe tener por lo menos 1 palabra ")
        
Menu(id)
        return 
PLUGIN_HANDLED
    
}
    else
    {
        new 
szData[512], szNombre[32]
        
        
get_user_name(idszNombre31)
        
        
Reg[id] = 1
        
        set_hudmessage
(25500, -1.0, -1.006.012.0)
        
show_hudmessage(id"Te registraste con exito")
        
        
formatex(szDatacharsmax(szData), "%s"Contra)
        
        
fvault_set_data(NombreVaulszNombreszData)
    }
    return 
PLUGIN_HANDLED
}

/*--------------------------------------------------------------------------------------------------
-----------------------------------------------Nueva PW-------------------------------------------*/

public NuevaContra(id)
{
    
read_argsContraNuevacharsmax(ContraNueva) )
    
remove_quotesContraNueva )
    
trimContraNueva )
    
    if( 
equal(ContraNueva,"") || contain(ContraNueva," ") != -)
    {
        
ChatColor(id"!g[ZP-Apocalipsis] !yLa contrasenia debe tener por lo menos 1 palabra")
        
Menu(id)
        return 
PLUGIN_HANDLED
    
}
    else
    {
        new 
szData[512], szNombre[32]
        
        
get_user_name(idszNombre31)
        
        
Reg[id] = 1
        
        set_hudmessage
(25500, -1.0, -1.006.012.0)
        
show_hudmessage(id"Cambiaste tu contrasenia exitosamente")
        
        
formatex(szDatacharsmax(szData), "%s"ContraNueva)
        
        
fvault_set_data(NombreVaulszNombreszData)
    }
    return 
PLUGIN_HANDLED
}

/*--------------------------------------------------------------------------------------------------
------------------------------------------Opciones de Cuenta--------------------------------------*/

public Opciones(id
{
    new 
Texto[192]
    
    new 
Menu menu_create("\yOpciones""MostrarOpc")
    
    if( 
get_pcvar_num(Cambiar) != && PuedoTeam[id] == )
        
formatex(Textocharsmax(Texto), "\wCambiar de Team^n")
    else
        
formatex(Textocharsmax(Texto), "\dCambiar de Team^n")
    
    
menu_additem(MenuTexto"1"0)
    
    
menu_additem(Menu"\wCambiar Contrasenia""2"0)
    
menu_additem(Menu"\wSalir de la Cuenta""3"0)
    
    
menu_setprop(Menu,MPROP_EXITNAME,"Salir")
    
    
menu_display(idMenu0


public 
MostrarOpc(idMenuitem

    if (
item == MENU_EXIT
    { 
        
menu_destroy(Menu)
        return 
PLUGIN_HANDLED
    

    
    new 
iData[6]; 
    new 
iAccess
    new 
iCallback
    new 
iName[64]; 
    
menu_item_getinfo(MenuitemiAccessiData5iName63iCallback
    
    switch (
str_to_num(iData)) 
    { 
        case 
1:
        { 
            if( 
get_pcvar_num(Cambiar) != && PuedoTeam[id] == 0)
            {
                if( 
cs_get_user_team(id) == CS_TEAM_CT )
                {
                    
user_silentkill(id)
                    
cs_set_user_team(idCS_TEAM_T)
                }
                else
                {
                    
user_silentkill(id)
                    
cs_set_user_team(idCS_TEAM_CT)
                }
                
PuedoTeam[id] = 1
            
}
            else
            {
                
ChatColor(id"!g[Surf+Kill] !yNo esta permitido el cambio de team")
                return 
PLUGIN_HANDLED 
            
}
        }
        case 
2:
        { 
            if( 
CambiarPW[id] == )
            {
                
client_cmd(id"messagemode Nueva_Contrasenia")
                
CambiarPW[id] = 1
            
}
            else
            {
                
ChatColor(id"!g[ZP-Apocalipsis] !yNo puedes cambiar tu contrasenia mas de 1 vez por mapa")
                return 
PLUGIN_HANDLED
            
}
        }
        case 
3:
        {
            
client_cmd(id"echo ********************************;echo **** Has decidido salir de tu cuenta *****;echo ********************************;disconnect;toggleconsole")
        }        
    } 
    
    return 
PLUGIN_HANDLED 
}

public 
Llamar(id)
{
    new 
callfunc callfunc_begin("clcmd_changeteam""ghw_ghr.amxx")
    
    switch(
callfunc)
    {
        case -
2: return log_error(AMX_ERR_NOTFOUND"La funcion no se ha enconrado")
        case -
1: return log_error(AMX_ERR_NOTFOUND"El plugin no existe")
        case 
0: return log_error(AMX_ERR_NOTFOUND"Error de Tiempo")
        case 
1:
        {
            
callfunc_push_int(id)
            
callfunc_end()
            return 
1
        
}
    }
    return 
1
}

/*--------------------------------------------------------------------------------------------------
-----------------------------------------------COLOR CHAT-----------------------------------------*/

stock ChatColor(const id, const input[], any:...)
{
    new 
count 1players[32]
    static 
msg[191]
    
vformat(msg190input3)
    
    
replace_all(msg190"!g""^4"// Green Color
    
replace_all(msg190"!y""^1"// Default Color
    
replace_all(msg190"!team""^3"// Team Color
    
replace_all(msg190"!team2""^0"// Team2 Color
    
    
if (idplayers[0] = id; else get_players(playerscount"ch")
    {
    for (new 
0counti++)
    {
        if (
is_user_connected(players[i]))
        {
            
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _players[i])
            
write_byte(players[i]);
            
write_string(msg);
            
message_end();
        }
    }
}
}  
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1252\\ deff0\\ deflang11274{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
*/ 
Bueno... eso es todo y agradesco de antemano

Last edited by espromet; 12-18-2011 at 15:38.
espromet is offline
Send a message via MSN to espromet
kratos.pro
Senior Member
Join Date: Nov 2011
Location: New york
Old 12-18-2011 , 18:22   Re: [ZP][AYUDA] mi sistema de cuentas no guarda levels
#2

PHP Code:
new const NombreVaul2[] = "Ammopacks" 
--->

PHP Code:
new const NombreVaul2[] = "Frags" 
PHP Code:
zp_set_user_ammo_packs(idstr_to_num(szData)) 
----->

PHP Code:
zp_set_user_frags(idstr_to_num(szData)) 
Nose si sera asi pero saca los zp_set_userammopacks por frags

PD: pasa el include de zombie_plague_advece
__________________

Last edited by kratos.pro; 12-18-2011 at 18:27.
kratos.pro is offline
Send a message via MSN to kratos.pro
espromet
BANNED
Join Date: Nov 2011
Location: Argentina
Old 12-18-2011 , 18:42   Re: [ZP][AYUDA] mi sistema de cuentas no guarda levels
#3

creo que me sirve pero no se en que parte del include tengo que poner zp_set_user_frags... aca tenés el include de mi zombie_plague_advance:

PHP Code:
/*================================================================================
    
    ---------------------------------------
    -*- Zombie Plague 4.2 Includes File -*-
    ---------------------------------------
    
    ~~~~~~~~~~
    - How To -
    ~~~~~~~~~~
    
    To use the functions listed here on your plugin, just add the
    following line at the beginning of your script:
    
    #include <zombieplague>
    
    ~~~~~~~~~~~
    - Natives -
    ~~~~~~~~~~~
    
    These work just like any other functions: you may have to pass
    parameters and they usually return values (1 means true, 0 for
    false).
    
    Example:
    
    if ( is_user_alive(id) && zp_get_user_zombie(id) )
    {
        server_print("player %d is alive and a zombie", id)
    }
    
    ~~~~~~~~~~~~
    - Forwards -
    ~~~~~~~~~~~~
    
    Forwards get called whenever an event happens during the game.
    You need to make a public function somewhere on your script,
    and it will automatically be triggered at the right time.
    
    Example:
    
    public zp_user_infected_post(id, infector)
    {
        server_print("Player %d just got infected by %d!", id, infector)
    }
    
    Also, take note of cases when there's a suffix:
    
    * _pre  : means the forward will be called BEFORE the event happens
    * _post : means it will be called AFTER the event takes place
    
=================================================================================*/

#if defined _zombieplague_included
  #endinput
#endif
#define _zombieplague_included

/* Returns whether a player is a zombie */
native zp_get_user_zombie(id)

/* Returns whether a player is a nemesis */
native zp_nemesis(id)

/* Returns whether a player is a survivor */
native zp_get_user_survivor(id)

/* Returns whether a player is a sniper */
native zp_get_user_sniper(id)

/* Returns whether a player is a sniper */
native zp_make_user_sniper(id)

/* Returns whether a player is a assassin */
native zp_get_user_assassin(id)

/* Returns whether a player is a assassin */
native zp_make_user_assassin(id)

native zp_get_user_nemesis(id)

/* Returns whether a player is the first zombie */
native zp_get_user_first_zombie(id)

/* Returns whether a player is the last zombie */
native zp_get_user_last_zombie(id)

/* Returns whether a player is the last human */
native zp_get_user_last_human(id)

/* Returns a player's current zombie class ID */
native zp_get_user_zombie_class(id)

/* Sets a player's zombie class ID (for the next infection) */
native zp_set_user_zombie_class(idclassid)

/* Returns a player's ammo pack count */
native zp_get_user_ammo_packs(id)

/* Sets a player's ammo pack count */
native zp_set_user_ammo_packs(idamount)

/* Returns the default maximum health of a zombie */
native zp_get_zombie_maxhealth(id)

native zp_get_user_next_class(id)

/* Returns a player's custom flashlight batteries charge */
native zp_get_user_batteries(id)

/* Sets a player's custom flashlight batteries charge */
native zp_set_user_batteries(idvalue)

/* Forces a player to become a zombie (infection rounds only) */
native zp_infect_user(idinfector 0)

/* Forces a player to become a human (infection rounds only) */
native zp_disinfect_user(id)

/* Respawns a player to a specific team (infections rounds only) */
native zp_respawn_user(idteam)

/* Returns whether the round has started (i.e. a game mode began) */
native zp_has_round_started()

/* Returns whether it's a nemesis round */
native zp_is_nemesis_round()

/* Returns whether it's a nemesis round */
native zp_is_assassin_round()

/* Returns whether it's a survivor round */
native zp_is_survivor_round()

/* Returns whether it's a swarm round */
native zp_is_swarm_round()

/* Returns whether it's a plague round */
native zp_is_plague_round()

/* Teams for zp_register_extra_item() */
enum
{
    
ZP_TEAM_ANY 0,
    
ZP_TEAM_ZOMBIE,
    
ZP_TEAM_HUMAN
}

/* Registers a custom item which will be added to the extra items menu of ZP.
*  Returns an internal extra item ID (which is needed to correctly catch selection
*  events for the zp_extra_item_selected() forward) or -1 on failure. */
native zp_register_extra_item(const name[], costteam)

/* Registers a custom class which will be added to the zombie classes menu of ZP.
*  Returns an internal zombie class ID (which is then used to identify the class
*  when calling the zp_get_user_zombie_class() native) or -1 on failure. */
native zp_register_zombie_class(const name[], const info[], const model[], const clawmodel[], hpspeedFloat:gravityFloat:knockback)

/* ============================================================================ */

/* Called when the round starts
*  gamemode - will indicate which mode has commenced
*  player   - will hold the affected player id (if applicable) */
forward zp_round_started(gamemodeplayer)

/* Game modes for zp_round_started() */
enum
{
    
MODE_NONE 0,
    
MODE_INFECTION,
    
MODE_NEMESIS,
    
MODE_SURVIVOR,
    
MODE_SWARM,
    
MODE_MULTI,
    
MODE_PLAGUE,
        
MODE_SNIPER,
        
MODE_ASSASSIN
}

/* Called when the round ends */
forward zp_round_ended(winteam)

/* Winning teams for zp_round_ended() */
enum
{
    
WIN_NO_ONE 0,
    
WIN_ZOMBIES,
    
WIN_HUMANS
}

/* Called when a player gets infected. */
forward zp_user_infected_pre(idinfector)
forward zp_user_infected_post(idinfector)

/* Called when a player turns back to human */
forward zp_user_humanized_pre(id)
forward zp_user_humanized_post(id)

/* Called when a player buys an extra item from the ZP menu
*  player - will hold the id of the player who's buying
*  itemid - will contain the internal extra item ID */
forward zp_extra_item_selected(playeritemid

(ME MARCARÍAS DONDE TENGO QUE PONER: zp_set_user_frags ??)

Last edited by espromet; 12-18-2011 at 18:43.
espromet is offline
Send a message via MSN to espromet
kratos.pro
Senior Member
Join Date: Nov 2011
Location: New york
Old 12-18-2011 , 18:46   Re: [ZP][AYUDA] mi sistema de cuentas no guarda levels
#4

Quote:
Originally Posted by espromet View Post
creo que me sirve pero no se en que parte del include tengo que poner zp_set_user_frags... aca tenés el include de mi zombie_plague_advance:

PHP Code:
/*================================================================================
    
    ---------------------------------------
    -*- Zombie Plague 4.2 Includes File -*-
    ---------------------------------------
    
    ~~~~~~~~~~
    - How To -
    ~~~~~~~~~~
    
    To use the functions listed here on your plugin, just add the
    following line at the beginning of your script:
    
    #include <zombieplague>
    
    ~~~~~~~~~~~
    - Natives -
    ~~~~~~~~~~~
    
    These work just like any other functions: you may have to pass
    parameters and they usually return values (1 means true, 0 for
    false).
    
    Example:
    
    if ( is_user_alive(id) && zp_get_user_zombie(id) )
    {
        server_print("player %d is alive and a zombie", id)
    }
    
    ~~~~~~~~~~~~
    - Forwards -
    ~~~~~~~~~~~~
    
    Forwards get called whenever an event happens during the game.
    You need to make a public function somewhere on your script,
    and it will automatically be triggered at the right time.
    
    Example:
    
    public zp_user_infected_post(id, infector)
    {
        server_print("Player %d just got infected by %d!", id, infector)
    }
    
    Also, take note of cases when there's a suffix:
    
    * _pre  : means the forward will be called BEFORE the event happens
    * _post : means it will be called AFTER the event takes place
    
=================================================================================*/

#if defined _zombieplague_included
  #endinput
#endif
#define _zombieplague_included

/* Returns whether a player is a zombie */
native zp_get_user_zombie(id)

/* Returns whether a player is a nemesis */
native zp_nemesis(id)

/* Returns whether a player is a survivor */
native zp_get_user_survivor(id)

/* Returns whether a player is a sniper */
native zp_get_user_sniper(id)

/* Returns whether a player is a sniper */
native zp_make_user_sniper(id)

/* Returns whether a player is a assassin */
native zp_get_user_assassin(id)

/* Returns whether a player is a assassin */
native zp_make_user_assassin(id)

native zp_get_user_nemesis(id)

/* Returns whether a player is the first zombie */
native zp_get_user_first_zombie(id)

/* Returns whether a player is the last zombie */
native zp_get_user_last_zombie(id)

/* Returns whether a player is the last human */
native zp_get_user_last_human(id)

/* Returns a player's current zombie class ID */
native zp_get_user_zombie_class(id)

/* Sets a player's zombie class ID (for the next infection) */
native zp_set_user_zombie_class(idclassid)

/* Returns a player's ammo pack count */
native zp_get_user_ammo_packs(id)

/* Sets a player's ammo pack count */
native zp_set_user_ammo_packs(idamount)

/* Returns the default maximum health of a zombie */
native zp_get_zombie_maxhealth(id)

native zp_get_user_next_class(id)

/* Returns a player's custom flashlight batteries charge */
native zp_get_user_batteries(id)

/* Sets a player's custom flashlight batteries charge */
native zp_set_user_batteries(idvalue)

/* Forces a player to become a zombie (infection rounds only) */
native zp_infect_user(idinfector 0)

/* Forces a player to become a human (infection rounds only) */
native zp_disinfect_user(id)

/* Respawns a player to a specific team (infections rounds only) */
native zp_respawn_user(idteam)

/* Returns whether the round has started (i.e. a game mode began) */
native zp_has_round_started()

/* Returns whether it's a nemesis round */
native zp_is_nemesis_round()

/* Returns whether it's a nemesis round */
native zp_is_assassin_round()

/* Returns whether it's a survivor round */
native zp_is_survivor_round()

/* Returns whether it's a swarm round */
native zp_is_swarm_round()

/* Returns whether it's a plague round */
native zp_is_plague_round()

/* Teams for zp_register_extra_item() */
enum
{
    
ZP_TEAM_ANY 0,
    
ZP_TEAM_ZOMBIE,
    
ZP_TEAM_HUMAN
}

/* Registers a custom item which will be added to the extra items menu of ZP.
*  Returns an internal extra item ID (which is needed to correctly catch selection
*  events for the zp_extra_item_selected() forward) or -1 on failure. */
native zp_register_extra_item(const name[], costteam)

/* Registers a custom class which will be added to the zombie classes menu of ZP.
*  Returns an internal zombie class ID (which is then used to identify the class
*  when calling the zp_get_user_zombie_class() native) or -1 on failure. */
native zp_register_zombie_class(const name[], const info[], const model[], const clawmodel[], hpspeedFloat:gravityFloat:knockback)

/* ============================================================================ */

/* Called when the round starts
*  gamemode - will indicate which mode has commenced
*  player   - will hold the affected player id (if applicable) */
forward zp_round_started(gamemodeplayer)

/* Game modes for zp_round_started() */
enum
{
    
MODE_NONE 0,
    
MODE_INFECTION,
    
MODE_NEMESIS,
    
MODE_SURVIVOR,
    
MODE_SWARM,
    
MODE_MULTI,
    
MODE_PLAGUE,
        
MODE_SNIPER,
        
MODE_ASSASSIN
}

/* Called when the round ends */
forward zp_round_ended(winteam)

/* Winning teams for zp_round_ended() */
enum
{
    
WIN_NO_ONE 0,
    
WIN_ZOMBIES,
    
WIN_HUMANS
}

/* Called when a player gets infected. */
forward zp_user_infected_pre(idinfector)
forward zp_user_infected_post(idinfector)

/* Called when a player turns back to human */
forward zp_user_humanized_pre(id)
forward zp_user_humanized_post(id)

/* Called when a player buys an extra item from the ZP menu
*  player - will hold the id of the player who's buying
*  itemid - will contain the internal extra item ID */
forward zp_extra_item_selected(playeritemid

(ME MARCARÍAS DONDE TENGO QUE PONER: zp_set_user_frags ??)

Nose mucho de pawn pero creo que es asi

PHP Code:
/*================================================================================
    
    ---------------------------------------
    -*- Zombie Plague 4.2 Includes File -*-
    ---------------------------------------
    
    ~~~~~~~~~~
    - How To -
    ~~~~~~~~~~
    
    To use the functions listed here on your plugin, just add the
    following line at the beginning of your script:
    
    #include <zombieplague>
    
    ~~~~~~~~~~~
    - Natives -
    ~~~~~~~~~~~
    
    These work just like any other functions: you may have to pass
    parameters and they usually return values (1 means true, 0 for
    false).
    
    Example:
    
    if ( is_user_alive(id) && zp_get_user_zombie(id) )
    {
        server_print("player %d is alive and a zombie", id)
    }
    
    ~~~~~~~~~~~~
    - Forwards -
    ~~~~~~~~~~~~
    
    Forwards get called whenever an event happens during the game.
    You need to make a public function somewhere on your script,
    and it will automatically be triggered at the right time.
    
    Example:
    
    public zp_user_infected_post(id, infector)
    {
        server_print("Player %d just got infected by %d!", id, infector)
    }
    
    Also, take note of cases when there's a suffix:
    
    * _pre  : means the forward will be called BEFORE the event happens
    * _post : means it will be called AFTER the event takes place
    
=================================================================================*/

#if defined _zombieplague_included
  #endinput
#endif
#define _zombieplague_included

/* Returns whether a player is a zombie */
native zp_get_user_zombie(id)

/* Returns whether a player is a nemesis */
native zp_nemesis(id)

/* Returns whether a player is a survivor */
native zp_get_user_survivor(id)

/* Returns whether a player is a sniper */
native zp_get_user_sniper(id)

/* Returns whether a player is a sniper */
native zp_make_user_sniper(id)

/* Returns whether a player is a assassin */
native zp_get_user_assassin(id)

/* Returns whether a player is a assassin */
native zp_make_user_assassin(id)

native zp_get_user_nemesis(id)

/* Returns whether a player is the first zombie */
native zp_get_user_first_zombie(id)

/* Returns whether a player is the last zombie */
native zp_get_user_last_zombie(id)

/* Returns whether a player is the last human */
native zp_get_user_last_human(id)

/* Returns a player's current zombie class ID */
native zp_get_user_zombie_class(id)

/* Sets a player's zombie class ID (for the next infection) */
native zp_set_user_zombie_class(idclassid)

/* Returns a player's ammo pack count */
native zp_get_user_ammo_packs(id)

/*nosexdsoypt */
native zp_get_user_frags(id)

/* Sets a player's ammo pack count */
native zp_set_user_ammo_packs(idamount)

/*soyptptpt*/
native zp_set_user_frags(idamount)

/* Returns the default maximum health of a zombie */
native zp_get_zombie_maxhealth(id)

native zp_get_user_next_class(id)

/* Returns a player's custom flashlight batteries charge */
native zp_get_user_batteries(id)

/* Sets a player's custom flashlight batteries charge */
native zp_set_user_batteries(idvalue)

/* Forces a player to become a zombie (infection rounds only) */
native zp_infect_user(idinfector 0)

/* Forces a player to become a human (infection rounds only) */
native zp_disinfect_user(id)

/* Respawns a player to a specific team (infections rounds only) */
native zp_respawn_user(idteam)

/* Returns whether the round has started (i.e. a game mode began) */
native zp_has_round_started()

/* Returns whether it's a nemesis round */
native zp_is_nemesis_round()

/* Returns whether it's a nemesis round */
native zp_is_assassin_round()

/* Returns whether it's a survivor round */
native zp_is_survivor_round()

/* Returns whether it's a swarm round */
native zp_is_swarm_round()

/* Returns whether it's a plague round */
native zp_is_plague_round()

/* Teams for zp_register_extra_item() */
enum
{
    
ZP_TEAM_ANY 0,
    
ZP_TEAM_ZOMBIE,
    
ZP_TEAM_HUMAN
}

/* Registers a custom item which will be added to the extra items menu of ZP.
*  Returns an internal extra item ID (which is needed to correctly catch selection
*  events for the zp_extra_item_selected() forward) or -1 on failure. */
native zp_register_extra_item(const name[], costteam)

/* Registers a custom class which will be added to the zombie classes menu of ZP.
*  Returns an internal zombie class ID (which is then used to identify the class
*  when calling the zp_get_user_zombie_class() native) or -1 on failure. */
native zp_register_zombie_class(const name[], const info[], const model[], const clawmodel[], hpspeedFloat:gravityFloat:knockback)

/* ============================================================================ */

/* Called when the round starts
*  gamemode - will indicate which mode has commenced
*  player   - will hold the affected player id (if applicable) */
forward zp_round_started(gamemodeplayer)

/* Game modes for zp_round_started() */
enum
{
    
MODE_NONE 0,
    
MODE_INFECTION,
    
MODE_NEMESIS,
    
MODE_SURVIVOR,
    
MODE_SWARM,
    
MODE_MULTI,
    
MODE_PLAGUE,
        
MODE_SNIPER,
        
MODE_ASSASSIN
}

/* Called when the round ends */
forward zp_round_ended(winteam)

/* Winning teams for zp_round_ended() */
enum
{
    
WIN_NO_ONE 0,
    
WIN_ZOMBIES,
    
WIN_HUMANS
}

/* Called when a player gets infected. */
forward zp_user_infected_pre(idinfector)
forward zp_user_infected_post(idinfector)

/* Called when a player turns back to human */
forward zp_user_humanized_pre(id)
forward zp_user_humanized_post(id)

/* Called when a player buys an extra item from the ZP menu
*  player - will hold the id of the player who's buying
*  itemid - will contain the internal extra item ID */
forward zp_extra_item_selected(playeritemid
Creo que es asi sino hablamos por pm
__________________
kratos.pro is offline
Send a message via MSN to kratos.pro
espromet
BANNED
Join Date: Nov 2011
Location: Argentina
Old 12-18-2011 , 18:52   Re: [ZP][AYUDA] mi sistema de cuentas no guarda levels
#5

jajajajaja ahora no me funciona el sistema de cuentas... compila todo bien pero no aparece al entrar :p
espromet is offline
Send a message via MSN to espromet
kratos.pro
Senior Member
Join Date: Nov 2011
Location: New york
Old 12-18-2011 , 18:54   Re: [ZP][AYUDA] mi sistema de cuentas no guarda levels
#6

Quote:
Originally Posted by espromet View Post
jajajajaja ahora no me funciona el sistema de cuentas... compila todo bien pero no aparece al entrar :p
PM
__________________
kratos.pro is offline
Send a message via MSN to kratos.pro
espromet
BANNED
Join Date: Nov 2011
Location: Argentina
Old 12-18-2011 , 19:02   Re: [ZP][AYUDA] mi sistema de cuentas no guarda levels
#7

che... hablemos por msn, te paso el mío: maxiriver_kpo@hotmail. com

Last edited by espromet; 12-18-2011 at 19:03.
espromet is offline
Send a message via MSN to espromet
-Fanaticspx1
Senior Member
Join Date: Aug 2010
Location: Venezuela
Old 12-19-2011 , 10:25   Re: [ZP][AYUDA] mi sistema de cuentas no guarda levels
#8

PHP Code:
public Guardar(id)
{
    if( 
Reg[id] != )
        return 
PLUGIN_HANDLED
    
    
new szData[512], szNombre[32]
    
    
get_user_name(idszNombrecharsmax(szNombre))
    
    
formatex(szDatacharsmax(szData), "%d"zp_get_user_frags(id))
    
    
fvault_set_data(NombreVaul2szNombreszData)

__________________
DE LOS ERRORES SE APRENDE. ATT: Starsailor
-Fanaticspx1 is offline
Send a message via MSN to -Fanaticspx1 Send a message via Skype™ to -Fanaticspx1
Korxu
Senior Member
Join Date: Sep 2010
Old 12-19-2011 , 13:08   Re: [ZP][AYUDA] mi sistema de cuentas no guarda levels
#9

Quote:
Originally Posted by -Fanaticspx1 View Post
PHP Code:
public Guardar(id)
{
    if( 
Reg[id] != )
        return 
PLUGIN_HANDLED
    
    
new szData[512], szNombre[32]
    
    
get_user_name(idszNombrecharsmax(szNombre))
    
    
formatex(szDatacharsmax(szData), "%d"zp_get_user_frags(id))
    
    
fvault_set_data(NombreVaul2szNombreszData)

Lo que os gusta crear variables tan inmensas.... ¿Para que quieres 512 celdas si solo vas a guardar los frags?
Korxu is offline
espromet
BANNED
Join Date: Nov 2011
Location: Argentina
Old 12-19-2011 , 13:36   Re: [ZP][AYUDA] mi sistema de cuentas no guarda levels
#10

No se porqué pero al poner eso no me funciona el sistema de cuentas
espromet is offline
Send a message via MSN to espromet
 



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 05:42.


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