ZP Hats
#1
Hola nuevamente, queria poner en mi zp un sistema de gorritos por puntos pero no encuentro ninguno por el foro alguien tuviera por ahi un codigo asi lo adapto pls me ayudarian bastante Excitedeyes ya que intente hacerlo pero no puedo jaja o no necesariamente por puntos por nivel pero dentro del zp
Responder
#2
En mis temas tengo uno.
Responder
#3
no me acuerdo de que parte del foro los saque pero les dejo los creditos....

Código PHP:
//-----------------------hats
new g_ent[33]
//Hats
new const hat_1[] = { "models/zp-ext/zp_staff.mdl" }
new const 
hat_2[] = { "models/zp-ext/zp_mod.mdl" }
new const 
hat_3[] = { "models/zp-ext/zp_admin.mdl" 
new const 
hat_4[] = { "models/zp-ext/zp_4.mdl" }
new const 
hat_5[] = { "models/zp-ext/zp_5.mdl" }
new const 
hat_6[] = { "models/zp-ext/zp_6.mdl" 
new const 
hat_7[] = { "models/zp-ext/zp_7.mdl" 

precache
Código PHP:
// Hat
    
engfunc(EngFunc_PrecacheModelhat_1)
    
engfunc(EngFunc_PrecacheModelhat_2)
    
engfunc(EngFunc_PrecacheModelhat_3
    
engfunc(EngFunc_PrecacheModelhat_4)
    
engfunc(EngFunc_PrecacheModelhat_5)
    
engfunc(EngFunc_PrecacheModelhat_6
    
engfunc(EngFunc_PrecacheModelhat_7

te vas despues a public fw_PlayerSpawn_Post(id) y abajo de
Código PHP:
    // Bots stuff
    
if (is_user_bot(id))
    {
        
// Turn off NVG for bots
        
fm_set_bot_nvg(id0)
        
        
// Automatically buy extra items/weapons after first zombie is chosen
        
if (get_pcvar_num(cvar_extraitems))
        {
            if (
g_newroundset_task(10.0+get_pcvar_float(cvar_warmup), "bot_buy_extras"id+TASK_SPAWN)
            else 
set_task(10.0"bot_buy_extras"id+TASK_SPAWN)
        }
    } 

pegas esto de abajo y listo

Código PHP:
    new ent g_ent[id]
    new 
infotarget engfunc(EngFunc_AllocString"info_target")
    
    if (!
pev_valid(ent))
    {
        
engfunc(EngFunc_RemoveEntityent)
        
g_ent[id] = ent engfunc (EngFunc_CreateNamedEntityinfotarget)
        
set_pev(entpev_movetypeMOVETYPE_FOLLOW)
        
set_pev(entpev_aimentid)
        if (
is_user_admin(id)) 
    {

        if (
is_user_alive(id)) 
        {
            if (
get_user_flags(id) & ACCESS_FLAG1)
                
engfunc(EngFunc_SetModelenthat_1)
            else if (
get_user_flags(id) & ACCESS_FLAG7)
                
engfunc(EngFunc_SetModelenthat_2)
            else if (
get_user_flags(id) & ACCESS_FLAG6)
                
engfunc(EngFunc_SetModelenthat_3)
            else if (
get_user_flags(id) & ACCESS_FLAG5)
                
engfunc(EngFunc_SetModelenthat_3)
            else if (
get_user_flags(id) & ACCESS_FLAG4)
                
engfunc(EngFunc_SetModelenthat_3)
            else
            {
                if(
g_reset[id] >= 10)
                
engfunc(EngFunc_SetModelenthat_4)
                else if(
g_level[id] >= 5)
                
engfunc(EngFunc_SetModelenthat_5)
                else if(
g_level[id] >= 3)
                
engfunc(EngFunc_SetModelenthat_6)
                else if(
g_level[id] >= 1)
                
engfunc(EngFunc_SetModelenthat_7)
                }
            }
        }
    } 

sombreros para los adm o si es un usuario sin adm le da el respectivo por reset, no los probe los de por reset cualquiera cosa me avisas
Responder
#4
(06/06/2019, 02:38 AM)metita escribió: En mis temas tengo uno.

es para 1.8.3 y yo uso el 1.8.2 Whatdone

(06/06/2019, 12:39 PM)GoldenCosta escribió: no me acuerdo de que parte del foro los saque pero les dejo los creditos....

Código PHP:
//-----------------------hats
new g_ent[33]
//Hats
new const hat_1[] = { "models/zp-ext/zp_staff.mdl" }
new const 
hat_2[] = { "models/zp-ext/zp_mod.mdl" }
new const 
hat_3[] = { "models/zp-ext/zp_admin.mdl" 
new const 
hat_4[] = { "models/zp-ext/zp_4.mdl" }
new const 
hat_5[] = { "models/zp-ext/zp_5.mdl" }
new const 
hat_6[] = { "models/zp-ext/zp_6.mdl" 
new const 
hat_7[] = { "models/zp-ext/zp_7.mdl" 

precache
Código PHP:
// Hat
    
engfunc(EngFunc_PrecacheModelhat_1)
    
engfunc(EngFunc_PrecacheModelhat_2)
    
engfunc(EngFunc_PrecacheModelhat_3
    
engfunc(EngFunc_PrecacheModelhat_4)
    
engfunc(EngFunc_PrecacheModelhat_5)
    
engfunc(EngFunc_PrecacheModelhat_6
    
engfunc(EngFunc_PrecacheModelhat_7

te vas despues a public fw_PlayerSpawn_Post(id) y abajo de
Código PHP:
    // Bots stuff
    
if (is_user_bot(id))
    {
        
// Turn off NVG for bots
        
fm_set_bot_nvg(id0)
        
        
// Automatically buy extra items/weapons after first zombie is chosen
        
if (get_pcvar_num(cvar_extraitems))
        {
            if (
g_newroundset_task(10.0+get_pcvar_float(cvar_warmup), "bot_buy_extras"id+TASK_SPAWN)
            else 
set_task(10.0"bot_buy_extras"id+TASK_SPAWN)
        }
    } 

pegas esto de abajo y listo

Código PHP:
    new ent g_ent[id]
    new 
infotarget engfunc(EngFunc_AllocString"info_target")
    
    if (!
pev_valid(ent))
    {
        
engfunc(EngFunc_RemoveEntityent)
        
g_ent[id] = ent engfunc (EngFunc_CreateNamedEntityinfotarget)
        
set_pev(entpev_movetypeMOVETYPE_FOLLOW)
        
set_pev(entpev_aimentid)
        if (
is_user_admin(id)) 
    {

        if (
is_user_alive(id)) 
        {
            if (
get_user_flags(id) & ACCESS_FLAG1)
                
engfunc(EngFunc_SetModelenthat_1)
            else if (
get_user_flags(id) & ACCESS_FLAG7)
                
engfunc(EngFunc_SetModelenthat_2)
            else if (
get_user_flags(id) & ACCESS_FLAG6)
                
engfunc(EngFunc_SetModelenthat_3)
            else if (
get_user_flags(id) & ACCESS_FLAG5)
                
engfunc(EngFunc_SetModelenthat_3)
            else if (
get_user_flags(id) & ACCESS_FLAG4)
                
engfunc(EngFunc_SetModelenthat_3)
            else
            {
                if(
g_reset[id] >= 10)
                
engfunc(EngFunc_SetModelenthat_4)
                else if(
g_level[id] >= 5)
                
engfunc(EngFunc_SetModelenthat_5)
                else if(
g_level[id] >= 3)
                
engfunc(EngFunc_SetModelenthat_6)
                else if(
g_level[id] >= 1)
                
engfunc(EngFunc_SetModelenthat_7)
                }
            }
        }
    } 

sombreros para los adm o si es un usuario sin adm le da el respectivo por reset, no los probe los de por reset cualquiera cosa me avisas

No tengo la linea de // Bots stuff pero lo puedo pegar en alguna parte del public fw_PlayerSpawn_Post(id) ?
Responder
#5
que zp tenes? abajo de donde estan los models?
busca entre medio de esos lugares, asi lo tengo yo
Código PHP:
    // Remove glow
    
fm_set_rendering(id)
    
    
#endif
    
    // Bots stuff
    
if (is_user_bot(id))
    {
        
// Turn off NVG for bots
        
fm_set_bot_nvg(id0)
        
        
// Automatically buy extra items/weapons after first zombie is chosen
        
if (get_pcvar_num(cvar_extraitems))
        {
            if (
g_newroundset_task(10.0+get_pcvar_float(cvar_warmup), "bot_buy_extras"id+TASK_SPAWN)
            else 
set_task(10.0"bot_buy_extras"id+TASK_SPAWN)
        }
    }
    
    new 
ent g_ent[id]
    new 
infotarget engfunc(EngFunc_AllocString"info_target")
    
    if (!
pev_valid(ent))
    {
        
engfunc(EngFunc_RemoveEntityent)
        
g_ent[id] = ent engfunc (EngFunc_CreateNamedEntityinfotarget)
        
set_pev(entpev_movetypeMOVETYPE_FOLLOW)
        
set_pev(entpev_aimentid)
        if (
is_user_admin(id)) 
    {

        if (
is_user_alive(id)) 
        {
            if (
get_user_flags(id) & ACCESS_FLAG1)
                
engfunc(EngFunc_SetModelenthat_1)
            else if (
get_user_flags(id) & ACCESS_FLAG7)
                
engfunc(EngFunc_SetModelenthat_2)
            else if (
get_user_flags(id) & ACCESS_FLAG6)
                
engfunc(EngFunc_SetModelenthat_3)
            else if (
get_user_flags(id) & ACCESS_FLAG5)
                
engfunc(EngFunc_SetModelenthat_3)
            else if (
get_user_flags(id) & ACCESS_FLAG4)
                
engfunc(EngFunc_SetModelenthat_3)
            }
        }
    } 
    
// Show custom buy menu?
    
if (get_pcvar_num(cvar_buycustom))
        
set_task(0.4"show_menu_buy1"id+TASK_SPAWN)
    
    
// Get spawn protection time
    
static Float:sptime
    sptime 
get_pcvar_float(cvar_spawnprotection)
    
    
// Enable spawn protection for humans spawning mid-round
    
if (!g_newround && sptime 0.0)
    {
        
// Dont take any damage
        
g_nodamage[id] = true
        
        
// Make temporarily invisible
        
set_pev(idpev_effectspev(idpev_effects) | EF_NODRAW)
        
        
// Set task to remove it
        
set_task(sptime"remove_spawn_protection"id+TASK_SPAWN)
    }
    
    
// Last Zombie Check
    
set_task(0.1"fnCheckLastZombie")

Responder
#6
(06/06/2019, 09:13 PM)GoldenCosta escribió: que zp tenes? abajo de donde estan los models?
busca entre medio de esos lugares, asi lo tengo yo
Código PHP:
    // Remove glow
    
fm_set_rendering(id)
    
    
#endif
    
    // Bots stuff
    
if (is_user_bot(id))
    {
        
// Turn off NVG for bots
        
fm_set_bot_nvg(id0)
        
        
// Automatically buy extra items/weapons after first zombie is chosen
        
if (get_pcvar_num(cvar_extraitems))
        {
            if (
g_newroundset_task(10.0+get_pcvar_float(cvar_warmup), "bot_buy_extras"id+TASK_SPAWN)
            else 
set_task(10.0"bot_buy_extras"id+TASK_SPAWN)
        }
    }
    
    new 
ent g_ent[id]
    new 
infotarget engfunc(EngFunc_AllocString"info_target")
    
    if (!
pev_valid(ent))
    {
        
engfunc(EngFunc_RemoveEntityent)
        
g_ent[id] = ent engfunc (EngFunc_CreateNamedEntityinfotarget)
        
set_pev(entpev_movetypeMOVETYPE_FOLLOW)
        
set_pev(entpev_aimentid)
        if (
is_user_admin(id)) 
    {

        if (
is_user_alive(id)) 
        {
            if (
get_user_flags(id) & ACCESS_FLAG1)
                
engfunc(EngFunc_SetModelenthat_1)
            else if (
get_user_flags(id) & ACCESS_FLAG7)
                
engfunc(EngFunc_SetModelenthat_2)
            else if (
get_user_flags(id) & ACCESS_FLAG6)
                
engfunc(EngFunc_SetModelenthat_3)
            else if (
get_user_flags(id) & ACCESS_FLAG5)
                
engfunc(EngFunc_SetModelenthat_3)
            else if (
get_user_flags(id) & ACCESS_FLAG4)
                
engfunc(EngFunc_SetModelenthat_3)
            }
        }
    } 
    
// Show custom buy menu?
    
if (get_pcvar_num(cvar_buycustom))
        
set_task(0.4"show_menu_buy1"id+TASK_SPAWN)
    
    
// Get spawn protection time
    
static Float:sptime
    sptime 
get_pcvar_float(cvar_spawnprotection)
    
    
// Enable spawn protection for humans spawning mid-round
    
if (!g_newround && sptime 0.0)
    {
        
// Dont take any damage
        
g_nodamage[id] = true
        
        
// Make temporarily invisible
        
set_pev(idpev_effectspev(idpev_effects) | EF_NODRAW)
        
        
// Set task to remove it
        
set_task(sptime"remove_spawn_protection"id+TASK_SPAWN)
    }
    
    
// Last Zombie Check
    
set_task(0.1"fnCheckLastZombie")


tengo esto mira
Código PHP:
    // Reset player vars
    
reset_vars(id0)
    
g_buytime[id] = get_gametime()
    
    
// Show custom buy menu?
    
if (get_pcvar_num(cvar_buycustom)) {
        
fm_strip_user_weapons(id)
        
fm_give_item(id"weapon_knife")
        
show_menu_armamento(id)
    } 
Responder
#7
arriba de ese
Código PHP:
// Show custom buy menu?
    
if (get_pcvar_num(cvar_buycustom)) {
        
fm_strip_user_weapons(id)
        
fm_give_item(id"weapon_knife")
        
show_menu_armamento(id)
    } 
Responder
#8
(06/06/2019, 10:33 PM)GoldenCosta escribió: arriba de ese
Código PHP:
// Show custom buy menu?
    
if (get_pcvar_num(cvar_buycustom)) {
        
fm_strip_user_weapons(id)
        
fm_give_item(id"weapon_knife")
        
show_menu_armamento(id)
    } 

Muchas gracias ya pude ! pregunta como hago para que pueda abrirlo mediante un menu?
Responder
#9
sistema automatico man.... :<
Responder


Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)