Me pide el model/player, pero no me lo da en el modo.* Solucionado *
#1
Bueno, lo que intento decir, es que cree un modo con un model especifico, cuando arranco el servidor, no responde por falta de "models/player/zp_supercat/zp_supercat.mdl".
Le instalo el model, arranca, cuando tiro el modo me aparece el model de ct, y no el model "zp_supercat".
TUT: Modos individuales by csaxel.

Dejo el humanme y la forma en que precacheo el model..
Código PHP:
new const modelo_cat[] = { "zp_supercat" }
    for (
0sizeof(modelo_cat); i++)
    {
        
formatex(buffercharsmax(buffer), "models/player/%s/%s.mdl"modelo_cat[i], modelo_cat[i]);
        if (
file_exists(buffer)) precache_model(buffer[i]);
    } 

Código PHP:
// Function Human Me (player id, turn into a survivor, silent mode)
humanme(idsurvivorsilentmode)
{
    
// User humanize attempt forward
    
ExecuteForward(g_fwUserHumanize_attemptg_fwDummyResultidsurvivor)
    
    
// One or more plugins blocked the "humanization". Only allow this after making sure it's
    // not going to leave us with no humans. Take into account a last player leaving case.
    // BUGFIX: only allow after a mode has started, to prevent blocking first survivor e.g.
    
if (g_fwDummyResult >= ZP_PLUGIN_HANDLED && g_modestarted && fnGetHumans() > g_lastplayerleaving)
        return;
    
    
// Pre user humanize forward
    
ExecuteForward(g_fwUserHumanized_preg_fwDummyResultidsurvivor)
    
    
// Remove previous tasks
    
remove_task(id+TASK_MODEL)
    
remove_task(id+TASK_BLOOD)
    
remove_task(id+TASK_AURA)
    
remove_task(id+TASK_BURN)
    
remove_task(id+TASK_NVISION)
    
    
// Reset some vars
    
g_zombie[id] = false
    g_nemesis
[id] = false
    g_survivor
[id] = false
    g_firstzombie
[id] = false
    g_canbuy
[id] = true
    g_buytime
[id] = get_gametime()
    
    
// Remove survivor's aura (bugfix)
    
set_pev(idpev_effectspev(idpev_effects) &~ EF_BRIGHTLIGHT)
    
    
// Remove spawn protection (bugfix)
    
g_nodamage[id] = false
    set_pev
(idpev_effectspev(idpev_effects) &~ EF_NODRAW)
    
    
// Reset burning duration counter (bugfix)
    
g_burning_duration[id] = 0
    
    
// Remove CS nightvision if player owns one (bugfix)
    
if (cs_get_user_nvg(id))
    {
        
cs_set_user_nvg(id0)
        if (
get_pcvar_num(cvar_customnvg)) remove_task(id+TASK_NVISION)
        else if (
g_nvisionenabled[id]) set_user_gnvision(id0)
    }
    
    
// Drop previous weapons
    
drop_weapons(id1)
    
drop_weapons(id2)
    
    
// Strip off from weapons
    
fm_strip_user_weapons(id)
    
fm_give_item(id"weapon_knife")
    
    
// Set human attributes based on the mode
    
if (survivor == 2
    {
        
cat[id] = true;

        
fm_set_user_health(idget_pcvar_num(cvar_cathp))

        
fm_strip_user_weapons(id)
        
fm_give_item(id"weapon_knife")
        
fm_give_item(id"weapon_m3")

        
turn_off_flashlight(id)
    }
    else if (
survivor == 1)
    {
        
// Survivor
        
g_survivor[id] = true
        
        
// Set Health [0 = auto]
        
if (get_pcvar_num(cvar_survhp) == 0)
        {
            if (
get_pcvar_num(cvar_survbasehp) == 0)
                
fm_set_user_health(idget_pcvar_num(cvar_humanhp) * fnGetAlive())
            else
                
fm_set_user_health(idget_pcvar_num(cvar_survbasehp) * fnGetAlive())
        }
        else
            
fm_set_user_health(idget_pcvar_num(cvar_survhp))
        
        
// Set gravity, if frozen set the restore gravity value instead
        
if (!g_frozen[id]) set_pev(idpev_gravityget_pcvar_float(cvar_survgravity))
        else 
g_frozen_gravity[id] = get_pcvar_float(cvar_survgravity)
        
        
// Set survivor maxspeed
        
ExecuteHamB(Ham_Player_ResetMaxSpeedid)
        
        
// Give survivor his own weapon
        
static survweapon[32]
        
get_pcvar_string(cvar_survweaponsurvweaponcharsmax(survweapon))
        
fm_give_item(idsurvweapon)
        
ExecuteHamB(Ham_GiveAmmoidMAXBPAMMO[cs_weapon_name_to_id(survweapon)], AMMOTYPE[cs_weapon_name_to_id(survweapon)], MAXBPAMMO[cs_weapon_name_to_id(survweapon)])
        
        
// Turn off his flashlight
        
turn_off_flashlight(id)
        
        
// Give the survivor a bright light
        
if (get_pcvar_num(cvar_survaura)) set_pev(idpev_effectspev(idpev_effects) | EF_BRIGHTLIGHT)
        
        
// Survivor bots will also need nightvision to see in the dark
        
if (g_isbot[id])
        {
            
g_nvision[id] = true
            cs_set_user_nvg
(id1)
        }
    }
    else
    {
        
// Human taking an antidote
        
        // Set health
        
fm_set_user_health(idget_pcvar_num(cvar_humanhp))
        
        
// Set gravity, if frozen set the restore gravity value instead
        
if (!g_frozen[id]) set_pev(idpev_gravityget_pcvar_float(cvar_humangravity))
        else 
g_frozen_gravity[id] = get_pcvar_float(cvar_humangravity)
        
        
// Set human maxspeed
        
ExecuteHamB(Ham_Player_ResetMaxSpeedid)
        
        
// Show custom buy menu?
        
if (get_pcvar_num(cvar_buycustom))
            
set_task(0.2"show_menu_buy1"id+TASK_SPAWN)
        
        
// Silent mode = no HUD messages, no antidote sound
        
if (!silentmode)
        {
            
// Antidote sound
            
static sound[64]
            
ArrayGetString(sound_antidoterandom_num(0ArraySize(sound_antidote) - 1), soundcharsmax(sound))
            
emit_sound(idCHAN_ITEMsound1.0ATTN_NORM0PITCH_NORM)
            
            
// Show Antidote HUD notice
            
set_dhudmessage(0155255HUD_INFECT_XHUD_INFECT_Y00.05.01.01.0)
            
show_dhudmessage(0"%L"LANG_PLAYER"NOTICE_ANTIDOTE"g_playername[id])
        }
    }
    
    
// Switch to CT
    
if (fm_cs_get_user_team(id) != FM_CS_TEAM_CT// need to change team?
    
{
        
remove_task(id+TASK_TEAM)
        
fm_cs_set_user_team(idFM_CS_TEAM_CT)
        
fm_user_team_update(id)
    }
    
    
// Custom models stuff
    
static currentmodel[32], tempmodel[32], already_has_modeliiRandsize
    already_has_model 
false
    
    
if (g_handle_models_on_separate_ent)
    {
        
// Set the right model
        
if (cat[id])
        {
            for (
0sizeof(modelo_cat); i++)
            {
                if (
equal(modelo_cat[i], currentmodel)) already_has_model true;
            }
            if (!
already_has_model)
            {
                
iRand random_num(0charsmax(modelo_cat))
                
copy(g_playermodel[id], charsmax(g_playermodel[]), modelo_cat[iRand])
            }
        }
        else if (
g_survivor[id])
        {
            
iRand random_num(0ArraySize(model_survivor) - 1)
            
ArrayGetString(model_survivoriRandg_playermodel[id], charsmax(g_playermodel[]))
            if (
g_set_modelindex_offsetfm_cs_set_user_model_index(idArrayGetCell(g_modelindex_survivoriRand))
        }
        else
        {
            if (
get_pcvar_num(cvar_adminmodelshuman) && (get_user_flags(id) & g_access_flag[ACCESS_ADMIN_MODELS]))
            {
                
iRand random_num(0ArraySize(model_admin_human) - 1)
                
ArrayGetString(model_admin_humaniRandg_playermodel[id], charsmax(g_playermodel[]))
                if (
g_set_modelindex_offsetfm_cs_set_user_model_index(idArrayGetCell(g_modelindex_admin_humaniRand))
            }
            else
            {
                
iRand random_num(0ArraySize(model_human) - 1)
                
ArrayGetString(model_humaniRandg_playermodel[id], charsmax(g_playermodel[]))
                if (
g_set_modelindex_offsetfm_cs_set_user_model_index(idArrayGetCell(g_modelindex_humaniRand))
            }
        }
        
        
// Set model on player model entity
        
fm_set_playermodel_ent(id)
        
        
// Set survivor glow / remove glow on player model entity, unless frozen
        
if (!g_frozen[id])
        {
            if (
g_survivor[id] && get_pcvar_num(cvar_survglow))
                
fm_set_rendering(g_ent_playermodel[id], kRenderFxGlowShell00255kRenderNormal25)
            else
                
fm_set_rendering(g_ent_playermodel[id])
        }
    }
    else
    {
        
// Get current model for comparing it with the current one
        
fm_cs_get_user_model(idcurrentmodelcharsmax(currentmodel))
        
        
// Set the right model, after checking that we don't already have it
        
if (g_survivor[id])
        {
            
size ArraySize(model_survivor)
            for (
0sizei++)
            {
                
ArrayGetString(model_survivoritempmodelcharsmax(tempmodel))
                if (
equal(currentmodeltempmodel)) already_has_model true
            
}
            
            if (!
already_has_model)
            {
                
iRand random_num(0size 1)
                
ArrayGetString(model_survivoriRandg_playermodel[id], charsmax(g_playermodel[]))
                if (
g_set_modelindex_offsetfm_cs_set_user_model_index(idArrayGetCell(g_modelindex_survivoriRand))
            }
        }
        else
        {
            if (
get_pcvar_num(cvar_adminmodelshuman) && (get_user_flags(id) & g_access_flag[ACCESS_ADMIN_MODELS]))
            {
                
size ArraySize(model_admin_human)
                for (
0sizei++)
                {
                    
ArrayGetString(model_admin_humanitempmodelcharsmax(tempmodel))
                    if (
equal(currentmodeltempmodel)) already_has_model true
                
}
                
                if (!
already_has_model)
                {
                    
iRand random_num(0size 1)
                    
ArrayGetString(model_admin_humaniRandg_playermodel[id], charsmax(g_playermodel[]))
                    if (
g_set_modelindex_offsetfm_cs_set_user_model_index(idArrayGetCell(g_modelindex_admin_humaniRand))
                }
            }
            else
            {
                
size ArraySize(model_human)
                for (
0sizei++)
                {
                    
ArrayGetString(model_humanitempmodelcharsmax(tempmodel))
                    if (
equal(currentmodeltempmodel)) already_has_model true
                
}
                
                if (!
already_has_model)
                {
                    
iRand random_num(0size 1)
                    
ArrayGetString(model_humaniRandg_playermodel[id], charsmax(g_playermodel[]))
                    if (
g_set_modelindex_offsetfm_cs_set_user_model_index(idArrayGetCell(g_modelindex_humaniRand))
                }
            }
        }
        
        
// Need to change the model?
        
if (!already_has_model)
        {
            
// An additional delay is offset at round start
            // since SVC_BAD is more likely to be triggered there
            
if (g_newround)
                
set_task(5.0 g_modelchange_delay"fm_user_model_update"id+TASK_MODEL)
            else
                
fm_user_model_update(id+TASK_MODEL)
        }
        
        
// Set survivor glow / remove glow, unless frozen
        
if (!g_frozen[id])
        {
            if (
g_survivor[id] && get_pcvar_num(cvar_survglow))
                
fm_set_rendering(idkRenderFxGlowShell00255kRenderNormal25)
            else
                
fm_set_rendering(id)
        }
    }
    
    
// Restore FOV?
    
if (get_pcvar_num(cvar_zombiefov) != 90 && get_pcvar_num(cvar_zombiefov) != 0)
    {
        
message_begin(MSG_ONEg_msgSetFOV_id)
        
write_byte(90// angle
        
message_end()
    }
    
    
// Disable nightvision when turning into human/survivor (bugfix)
    
if (g_nvision[id])
    {
        if (
get_pcvar_num(cvar_customnvg)) remove_task(id+TASK_NVISION)
        else if (
g_nvisionenabled[id]) set_user_gnvision(id0)
        
g_nvision[id] = false
        g_nvisionenabled
[id] = false
    
}
    
    
// Post user humanize forward
    
ExecuteForward(g_fwUserHumanized_postg_fwDummyResultidsurvivor)
    
    
// Last Zombie Check
    
fnCheckLastZombie()



Archivos adjuntos
.sma   Descargar AMXX / zr_bio_4.3.1.sma (Tamaño: 348.68 KB / Descargas: 3)
Responder
#2
Código PHP:
new const modelo_cat[] = { "zp_supercat" 
---->
Código PHP:
new const modelo_cat[] = { "modo" 

o
si lo estas definiendo con el nombre zp_supercat
en tu carpeta y el nombre del model debe quedar

models/player/zp_supercat/zp_supercat.mdl
[Imagen: 76561198090851442.png]
Responder
#3
(20/05/2019, 09:54 PM)PredatorFlys escribió:
Código PHP:
new const modelo_cat[] = { "zp_supercat" 
---->
Código PHP:
new const modelo_cat[] = { "modo" 

o
si lo estas definiendo con el nombre zp_supercat
en tu carpeta y el nombre del model debe quedar

models/player/zp_supercat/zp_supercat.mdl

Lo estoy definiendo como zp_supercat, solo es un ej del nombre "modo"..
En otro lado, si no instalo el model, no arranca el servidor, creo que explique bastante bien mi problema..
Responder
#4
Código PHP:
for (0sizeof(modelo_cat); i++)
    {
        
formatex(buffercharsmax(buffer), "models/player/%s/%s.mdl"modelo_cat[i], modelo_cat[i]);
        if (
file_exists(buffer)) precache_model(buffer[i]);
    } 

------------>

Código PHP:
formatex(buffercharsmax(buffer), "models/player/%s/%s.mdl"modelo_catmodelo_cat);
if (
file_exists(buffer)) precache_model(buffer); 
Responder
#5
Código PHP:
if (file_exists(buffer)) precache_model(buffer[i]); 
el error esta en buffer[i]

Código PHP:
buffer[i] ---> buffer 
[Imagen: 76561198090851442.png]
Responder
#6
(20/05/2019, 10:38 PM)PredatorFlys escribió:
Código PHP:
if (file_exists(buffer)) precache_model(buffer[i]); 
el error esta en buffer[i]

Código PHP:
buffer[i] ---> buffer 

Nomedigas (?
La constante también ya que es solamente una cadena, si fuera bidimensional y tuviera más de un modelo, sería consistente el código.
Responder
#7
(20/05/2019, 10:56 PM)Exertency escribió:
(20/05/2019, 10:38 PM)PredatorFlys escribió:
Código PHP:
if (file_exists(buffer)) precache_model(buffer[i]); 
el error esta en buffer[i]

Código PHP:
buffer[i] ---> buffer 

Nomedigas (?
La constante también ya que es solamente una cadena, si fuera bidimensional y tuviera más de un modelo, sería consistente el código.

yo asumía que pondría mas modelos, pero si esta mal de igual manera.

Código PHP:
new modelo_cat[] = "zp_supercat"

public plugin_precache( )
{
    
precache_player_model(modelo_cat)
}
stock precache_player_model(const modelname[]) 

    static 
longname[128]
    
formatex(longnamecharsmax(longname), "models/player/%s/%s.mdl"modelnamemodelname
    
precache_model(longname

    
copy(longname[strlen(longname)-4], charsmax(longname) - (strlen(longname)-4), "T.mdl"
    if (
file_exists(longname)) precache_model(longname


y
Código PHP:
new const modelo_cat[][] = 
{
    
"zp_supercat",
    
"modo"
}  


public 
plugin_precache()
{
    for ( new 
sizeofmodelo_cat ) ; i++ )
    {
        
precache_player_modelmodelo_cat] )
    }
}  

stock precache_player_model(const modelname[]) 

    static 
longname[128]
    
formatex(longnamecharsmax(longname), "models/player/%s/%s.mdl"modelnamemodelname
    
precache_model(longname

    
copy(longname[strlen(longname)-4], charsmax(longname) - (strlen(longname)-4), "T.mdl"
    if (
file_exists(longname)) precache_model(longname

[Imagen: 76561198090851442.png]
Responder
#8
Lo puse de ambas formas, pero ahora me da un model de tt.
Me base en este tuto csaxel modo individual


Archivos adjuntos
.sma   Descargar AMXX / zr_bio_4.3.1.sma (Tamaño: 348.68 KB / Descargas: 3)
Responder
#9
si te fijas
zombieplague.ini o zp_zombieclasses.ini deberia estar todos los models a precachear
tienes que subirlo uno a uno o deshabilitarlo.
[Imagen: 76561198090851442.png]
Responder
#10
Si, vi, pero el modo no esta echa de esa manera, como la que viene el modo survivor que el nombre del mod lo estableces en el .ini, esta interno el modo, con respecto al model..
Código PHP:
if (g_handle_models_on_separate_ent)
    {
        
// Set the right model
        
if (cat[id])
        {
            for (
0sizeof(modelo_cat); i++)
            {
                if (
equal(modelo_cat[i], currentmodel)) already_has_model true;
            }
            if (!
already_has_model)
            {
                
iRand random_num(0charsmax(modelo_cat))
                
copy(g_playermodel[id], charsmax(g_playermodel[]), modelo_cat[iRand])
            }
        } 
Puede ser que me este equivocando en el humanme?
Responder
#11
no te se decir, prueba con el plugin por defecto sin modificar con sus archivos por defecto a ver si prende, si lo hace probablemente el que tiene un error eres tu.
[Imagen: 76561198090851442.png]
Responder
#12
Si Man, el error es mio, pero seguí el tut al pie de la letra, por eso pido ayuda.. el precacheo no Es el problema.. si no a la hora de setear el modo y darle el módel pero bueno gracias por intentar
Responder
#13
Los tutoriales no son para hacer c&p, son para entender ciertas cosas. Whatever
[Imagen: bvpq9q-6.png]

NO DOY AYUDA VIA MENSAJE PRIVADO

* Si requieres algún servicio de pago puedes contactarme vía MP o en mi facebook
Responder
#14
(21/05/2019, 03:34 PM)kikizon2 escribió: Los tutoriales no son para hacer c&p, son para entender ciertas cosas. Whatever

x2
[Imagen: 76561198090851442.png]
Responder
#15
Si mirarían solo intentaba comprender que partes del modo son importantes no copipastee todo. Si no ayudan no comentes gracias (y)
Responder
#16
deja code original, y que exactamente querías añadir.
[Imagen: 76561198090851442.png]
Responder
#17
(21/05/2019, 06:55 PM)PredatorFlys escribió: deja code original, y que exactamente querías añadir.

No voy a que me hagan todo el trabajo, yo le puse el codigo del modo al zombie plague que puse de adjunto unos comentarios atras, mi problema es que cuando tiro el MODO, el MODO no tiene el model que le puse.
En las unicas partes en el que el modo adquiere el model, es en el precache, y el seteo en humanme. Por eso deje ambas partes, no veo el caso de acusarme de copypaste, porque el modo tiene muchas cvar, yo solo le puse las básicas para que funcione!.
MODO: jugabilidad del juego unica y especifica en el que un player adquiere un poder y/o arma en especial para continuar con el desarrollo del juego que es aniquilar zombies o humanos.
Responder
#18
C&P y mal hecho Whatever

Código PHP:
humanme(idsurvivorsilentmode)
{
    
// User humanize attempt forward
    
ExecuteForward(g_fwUserHumanize_attemptg_fwDummyResultidsurvivor)
    
    
// One or more plugins blocked the "humanization". Only allow this after making sure it's
    // not going to leave us with no humans. Take into account a last player leaving case.
    // BUGFIX: only allow after a mode has started, to prevent blocking first survivor e.g.
    
if (g_fwDummyResult >= ZP_PLUGIN_HANDLED && g_modestarted && fnGetHumans() > g_lastplayerleaving)
        return;
    
    
// Pre user humanize forward
    
ExecuteForward(g_fwUserHumanized_preg_fwDummyResultidsurvivor)
    
    
// Remove previous tasks
    
remove_task(id+TASK_MODEL)
    
remove_task(id+TASK_BLOOD)
    
remove_task(id+TASK_AURA)
    
remove_task(id+TASK_BURN)
    
remove_task(id+TASK_NVISION)
    
    
// Reset some vars
    
g_zombie[id] = false
    g_nemesis
[id] = false
    g_survivor
[id] = false
    g_firstzombie
[id] = false
    g_canbuy
[id] = true
    g_buytime
[id] = get_gametime()
    
    
// Remove survivor's aura (bugfix)
    
set_pev(idpev_effectspev(idpev_effects) &~ EF_BRIGHTLIGHT)
    
    
// Remove spawn protection (bugfix)
    
g_nodamage[id] = false
    set_pev
(idpev_effectspev(idpev_effects) &~ EF_NODRAW)
    
    
// Reset burning duration counter (bugfix)
    
g_burning_duration[id] = 0
    
    
// Remove CS nightvision if player owns one (bugfix)
    
if (cs_get_user_nvg(id))
    {
        
cs_set_user_nvg(id0)
        if (
get_pcvar_num(cvar_customnvg)) remove_task(id+TASK_NVISION)
        else if (
g_nvisionenabled[id]) set_user_gnvision(id0)
    }
    
    
// Drop previous weapons
    
drop_weapons(id1)
    
drop_weapons(id2)
    
    
// Strip off from weapons
    
fm_strip_user_weapons(id)
    
fm_give_item(id"weapon_knife")
    
    
// Set human attributes based on the mode
    
if (survivor == 2
    {
        
cat[id] = true;

        
fm_set_user_health(idget_pcvar_num(cvar_cathp))

        
fm_strip_user_weapons(id)
        
fm_give_item(id"weapon_knife")
        
fm_give_item(id"weapon_m3")

        
turn_off_flashlight(id)
    }
    else if (
survivor == 1)
    {
        
// Survivor
        
g_survivor[id] = true
        
        
// Set Health [0 = auto]
        
if (get_pcvar_num(cvar_survhp) == 0)
        {
            if (
get_pcvar_num(cvar_survbasehp) == 0)
                
fm_set_user_health(idget_pcvar_num(cvar_humanhp) * fnGetAlive())
            else
                
fm_set_user_health(idget_pcvar_num(cvar_survbasehp) * fnGetAlive())
        }
        else
            
fm_set_user_health(idget_pcvar_num(cvar_survhp))
        
        
// Set gravity, if frozen set the restore gravity value instead
        
if (!g_frozen[id]) set_pev(idpev_gravityget_pcvar_float(cvar_survgravity))
        else 
g_frozen_gravity[id] = get_pcvar_float(cvar_survgravity)
        
        
// Set survivor maxspeed
        
ExecuteHamB(Ham_Player_ResetMaxSpeedid)
        
        
// Give survivor his own weapon
        
static survweapon[32]
        
get_pcvar_string(cvar_survweaponsurvweaponcharsmax(survweapon))
        
fm_give_item(idsurvweapon)
        
ExecuteHamB(Ham_GiveAmmoidMAXBPAMMO[cs_weapon_name_to_id(survweapon)], AMMOTYPE[cs_weapon_name_to_id(survweapon)], MAXBPAMMO[cs_weapon_name_to_id(survweapon)])
        
        
// Turn off his flashlight
        
turn_off_flashlight(id)
        
        
// Give the survivor a bright light
        
if (get_pcvar_num(cvar_survaura)) set_pev(idpev_effectspev(idpev_effects) | EF_BRIGHTLIGHT)
        
        
// Survivor bots will also need nightvision to see in the dark
        
if (g_isbot[id])
        {
            
g_nvision[id] = true
            cs_set_user_nvg
(id1)
        }
    }
    else
    {
        
// Human taking an antidote
        
        // Set health
        
fm_set_user_health(idget_pcvar_num(cvar_humanhp))
        
        
// Set gravity, if frozen set the restore gravity value instead
        
if (!g_frozen[id]) set_pev(idpev_gravityget_pcvar_float(cvar_humangravity))
        else 
g_frozen_gravity[id] = get_pcvar_float(cvar_humangravity)
        
        
// Set human maxspeed
        
ExecuteHamB(Ham_Player_ResetMaxSpeedid)
        
        
// Show custom buy menu?
        
if (get_pcvar_num(cvar_buycustom))
            
set_task(0.2"show_menu_buy1"id+TASK_SPAWN)
        
        
// Silent mode = no HUD messages, no antidote sound
        
if (!silentmode)
        {
            
// Antidote sound
            
static sound[64]
            
ArrayGetString(sound_antidoterandom_num(0ArraySize(sound_antidote) - 1), soundcharsmax(sound))
            
emit_sound(idCHAN_ITEMsound1.0ATTN_NORM0PITCH_NORM)
            
            
// Show Antidote HUD notice
            
set_dhudmessage(0155255HUD_INFECT_XHUD_INFECT_Y00.05.01.01.0)
            
show_dhudmessage(0"%L"LANG_PLAYER"NOTICE_ANTIDOTE"g_playername[id])
        }
    }
    
    
// Switch to CT
    
if (fm_cs_get_user_team(id) != FM_CS_TEAM_CT// need to change team?
    
{
        
remove_task(id+TASK_TEAM)
        
fm_cs_set_user_team(idFM_CS_TEAM_CT)
        
fm_user_team_update(id)
    }
    
    
// Custom models stuff
    
static currentmodel[32], tempmodel[32], already_has_modeliiRandsize
    already_has_model 
false
    
    
if (g_handle_models_on_separate_ent)
    {
        
// Set the right model
           
if (g_survivor[id])
        {
            
iRand random_num(0ArraySize(model_survivor) - 1)
            
ArrayGetString(model_survivoriRandg_playermodel[id], charsmax(g_playermodel[]))
            if (
g_set_modelindex_offsetfm_cs_set_user_model_index(idArrayGetCell(g_modelindex_survivoriRand))
        }
        else
        {
            if (
get_pcvar_num(cvar_adminmodelshuman) && (get_user_flags(id) & g_access_flag[ACCESS_ADMIN_MODELS]))
            {
                
iRand random_num(0ArraySize(model_admin_human) - 1)
                
ArrayGetString(model_admin_humaniRandg_playermodel[id], charsmax(g_playermodel[]))
                if (
g_set_modelindex_offsetfm_cs_set_user_model_index(idArrayGetCell(g_modelindex_admin_humaniRand))
            }
            else
            {
                
iRand random_num(0ArraySize(model_human) - 1)
                
ArrayGetString(model_humaniRandg_playermodel[id], charsmax(g_playermodel[]))
                if (
g_set_modelindex_offsetfm_cs_set_user_model_index(idArrayGetCell(g_modelindex_humaniRand))
            }
        }
        
        
// Set model on player model entity
        
fm_set_playermodel_ent(id)
        
        
// Set survivor glow / remove glow on player model entity, unless frozen
        
if (!g_frozen[id])
        {
            if (
g_survivor[id] && get_pcvar_num(cvar_survglow))
                
fm_set_rendering(g_ent_playermodel[id], kRenderFxGlowShell00255kRenderNormal25)
            else
                
fm_set_rendering(g_ent_playermodel[id])
        }
    }
    else
    {
        
// Get current model for comparing it with the current one
        
fm_cs_get_user_model(idcurrentmodelcharsmax(currentmodel))
        
        
// Set the right model, after checking that we don't already have it
        
if (g_survivor[id])
        {
            
size ArraySize(model_survivor)
            for (
0sizei++)
            {
                
ArrayGetString(model_survivoritempmodelcharsmax(tempmodel))
                if (
equal(currentmodeltempmodel)) already_has_model true
            
}
            
            if (!
already_has_model)
            {
                
iRand random_num(0size 1)
                
ArrayGetString(model_survivoriRandg_playermodel[id], charsmax(g_playermodel[]))
                if (
g_set_modelindex_offsetfm_cs_set_user_model_index(idArrayGetCell(g_modelindex_survivoriRand))
            }
        }
        else if(
cat[id])
        {
            for (
0sizeof(modelo_cat); i++)
            {
                if (
equal(modelo_cat[i], currentmodel)) already_has_model true;
            }
            
            if (!
already_has_model)
            {
                
iRand random_num(0charsmax(modelo_cat))
                
copy(g_playermodel[id], charsmax(g_playermodel[]), modelo_cat[iRand])
            }
        }
        else
        {
            if (
get_pcvar_num(cvar_adminmodelshuman) && (get_user_flags(id) & g_access_flag[ACCESS_ADMIN_MODELS]))
            {
                
size ArraySize(model_admin_human)
                for (
0sizei++)
                {
                    
ArrayGetString(model_admin_humanitempmodelcharsmax(tempmodel))
                    if (
equal(currentmodeltempmodel)) already_has_model true
                
}
                
                if (!
already_has_model)
                {
                    
iRand random_num(0size 1)
                    
ArrayGetString(model_admin_humaniRandg_playermodel[id], charsmax(g_playermodel[]))
                    if (
g_set_modelindex_offsetfm_cs_set_user_model_index(idArrayGetCell(g_modelindex_admin_humaniRand))
                }
            }
            else
            {
                
size ArraySize(model_human)
                for (
0sizei++)
                {
                    
ArrayGetString(model_humanitempmodelcharsmax(tempmodel))
                    if (
equal(currentmodeltempmodel)) already_has_model true
                
}
                
                if (!
already_has_model)
                {
                    
iRand random_num(0size 1)
                    
ArrayGetString(model_humaniRandg_playermodel[id], charsmax(g_playermodel[]))
                    if (
g_set_modelindex_offsetfm_cs_set_user_model_index(idArrayGetCell(g_modelindex_humaniRand))
                }
            }
        }
        
        
// Need to change the model?
        
if (!already_has_model)
        {
            
// An additional delay is offset at round start
            // since SVC_BAD is more likely to be triggered there
            
if (g_newround)
                
set_task(5.0 g_modelchange_delay"fm_user_model_update"id+TASK_MODEL)
            else
                
fm_user_model_update(id+TASK_MODEL)
        }
        
        
// Set survivor glow / remove glow, unless frozen
        
if (!g_frozen[id])
        {
            if (
g_survivor[id] && get_pcvar_num(cvar_survglow))
                
fm_set_rendering(idkRenderFxGlowShell00255kRenderNormal25)
            else
                
fm_set_rendering(id)
        }
    }
    
    
// Restore FOV?
    
if (get_pcvar_num(cvar_zombiefov) != 90 && get_pcvar_num(cvar_zombiefov) != 0)
    {
        
message_begin(MSG_ONEg_msgSetFOV_id)
        
write_byte(90// angle
        
message_end()
    }
    
    
// Disable nightvision when turning into human/survivor (bugfix)
    
if (g_nvision[id])
    {
        if (
get_pcvar_num(cvar_customnvg)) remove_task(id+TASK_NVISION)
        else if (
g_nvisionenabled[id]) set_user_gnvision(id0)
        
g_nvision[id] = false
        g_nvisionenabled
[id] = false
    
}
    
    
// Post user humanize forward
    
ExecuteForward(g_fwUserHumanized_postg_fwDummyResultidsurvivor)
    
    
// Last Zombie Check
    
fnCheckLastZombie()

[Imagen: bvpq9q-6.png]

NO DOY AYUDA VIA MENSAJE PRIVADO

* Si requieres algún servicio de pago puedes contactarme vía MP o en mi facebook
Responder


Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)