[ZE] Nemesis Round [Fixed]
dhuhdmessage causing more errors on compiling...not good my friend...bugs after bugs
-
- Veteran Member
- Posts: 408
- Joined: 5 years ago
- Contact:
i didn't understand you question
-
- Veteran Member
- Posts: 408
- Joined: 5 years ago
- Contact:
which version of ze are you using ?Mystic Viper wrote: ↑4 years ago dhuhdmessage causing more errors on compiling...not good my friend...bugs after bugs
the plugin working with me and with lizou
why you see bugs and errors ?
I'm using v1.4 compiler and u should delete dhudmessage cuz reapi and our compiler already using this include...and with sounds
What is this: client_cmd(id,"spk zombie_escape/Nemesis_scream") no .wav or .mp3 how can detect sound
What is this: client_cmd(id,"spk zombie_escape/Nemesis_scream") no .wav or .mp3 how can detect sound
-
- Veteran Member
- Posts: 408
- Joined: 5 years ago
- Contact:
okay thanks to detect thisMystic Viper wrote: ↑4 years ago I'm using v1.4 compiler and u should delete dhudmessage cuz reapi and our compiler already using this include...and with sounds
What is this: client_cmd(id,"spk zombie_escape/Nemesis_scream") no .wav or .mp3 how can detect sound
wait i will edit
-
- Veteran Member
- Posts: 408
- Joined: 5 years ago
- Contact:
Good Now ?Mystic Viper wrote: ↑4 years ago I'm using v1.4 compiler and u should delete dhudmessage cuz reapi and our compiler already using this include...and with sounds
What is this: client_cmd(id,"spk zombie_escape/Nemesis_scream") no .wav or .mp3 how can detect sound
Check the post
first one
C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(28) : error 017: undefined symbol "HIT_GENERIC"
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(28) : error 008: must be a constant expression; assumed zero
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(29) : error 017: undefined symbol "HIT_HEAD"
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(29) : error 008: must be a constant expression; assumed zero
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(30) : error 017: undefined symbol "HIT_CHEST"
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(30) : error 008: must be a constant expression; assumed zero
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(31) : error 017: undefined symbol "HIT_STOMACH"
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(31) : error 008: must be a constant expression; assumed zero
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(32) : error 017: undefined symbol "HIT_LEFTARM"
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(32) : error 008: must be a constant expression; assumed zero
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(33) : error 017: undefined symbol "HIT_RIGHTARM"
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(33) : error 008: must be a constant expression; assumed zero
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(34) : error 017: undefined symbol "HIT_LEFTLEG"
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(34) : error 008: must be a constant expression; assumed zero
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(35) : error 017: undefined symbol "HIT_RIGHTLEG"
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(35) : error 008: must be a constant expression; assumed zero
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(141) : error 017: undefined symbol "kRenderFxNone"
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(161) : error 017: undefined symbol "kRenderFxNone"
The hell man...errors after errors
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(28) : error 008: must be a constant expression; assumed zero
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(29) : error 017: undefined symbol "HIT_HEAD"
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(29) : error 008: must be a constant expression; assumed zero
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(30) : error 017: undefined symbol "HIT_CHEST"
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(30) : error 008: must be a constant expression; assumed zero
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(31) : error 017: undefined symbol "HIT_STOMACH"
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(31) : error 008: must be a constant expression; assumed zero
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(32) : error 017: undefined symbol "HIT_LEFTARM"
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(32) : error 008: must be a constant expression; assumed zero
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(33) : error 017: undefined symbol "HIT_RIGHTARM"
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(33) : error 008: must be a constant expression; assumed zero
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(34) : error 017: undefined symbol "HIT_LEFTLEG"
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(34) : error 008: must be a constant expression; assumed zero
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(35) : error 017: undefined symbol "HIT_RIGHTLEG"
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(35) : error 008: must be a constant expression; assumed zero
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(141) : error 017: undefined symbol "kRenderFxNone"
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(161) : error 017: undefined symbol "kRenderFxNone"
The hell man...errors after errors
-
- Veteran Member
- Posts: 408
- Joined: 5 years ago
- Contact:
change your fun.inc include man, this error is from you not from meMystic Viper wrote: ↑4 years ago C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(28) : error 017: undefined symbol "HIT_GENERIC"
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(28) : error 008: must be a constant expression; assumed zero
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(29) : error 017: undefined symbol "HIT_HEAD"
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(29) : error 008: must be a constant expression; assumed zero
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(30) : error 017: undefined symbol "HIT_CHEST"
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(30) : error 008: must be a constant expression; assumed zero
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(31) : error 017: undefined symbol "HIT_STOMACH"
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(31) : error 008: must be a constant expression; assumed zero
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(32) : error 017: undefined symbol "HIT_LEFTARM"
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(32) : error 008: must be a constant expression; assumed zero
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(33) : error 017: undefined symbol "HIT_RIGHTARM"
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(33) : error 008: must be a constant expression; assumed zero
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(34) : error 017: undefined symbol "HIT_LEFTLEG"
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(34) : error 008: must be a constant expression; assumed zero
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(35) : error 017: undefined symbol "HIT_RIGHTLEG"
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(35) : error 008: must be a constant expression; assumed zero
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(141) : error 017: undefined symbol "kRenderFxNone"
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(161) : error 017: undefined symbol "kRenderFxNone"
The hell man...errors after errors
Last edited by Muhammet20 4 years ago, edited 1 time in total.
C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(13) : error 017: undefined symbol "AMXX_VERSION_NUM"
C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(45) : error 017: undefined symbol "kRenderFxNone"
Nothing working as well
C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(45) : error 017: undefined symbol "kRenderFxNone"
Nothing working as well
-
- Veteran Member
- Posts: 408
- Joined: 5 years ago
- Contact:
sorry for that check this again i posted the false fun.inc file
download this:
download/file.php?id=783
download this:
download/file.php?id=783
C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(28) : error 017: undefined symbol "HIT_GENERIC"Muhammet20 wrote: ↑4 years ago sorry for that check this again i posted the false fun.inc file
download this:
download/file.php?id=783
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(28) : error 008: must be a constant expression; assumed zero
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(29) : error 017: undefined symbol "HIT_HEAD"
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(29) : error 008: must be a constant expression; assumed zero
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(30) : error 017: undefined symbol "HIT_CHEST"
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(30) : error 008: must be a constant expression; assumed zero
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(31) : error 017: undefined symbol "HIT_STOMACH"
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(31) : error 008: must be a constant expression; assumed zero
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(32) : error 017: undefined symbol "HIT_LEFTARM"
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(32) : error 008: must be a constant expression; assumed zero
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(33) : error 017: undefined symbol "HIT_RIGHTARM"
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(33) : error 008: must be a constant expression; assumed zero
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(34) : error 017: undefined symbol "HIT_LEFTLEG"
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(34) : error 008: must be a constant expression; assumed zero
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(35) : error 017: undefined symbol "HIT_RIGHTLEG"
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(35) : error 008: must be a constant expression; assumed zero
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(141) : error 017: undefined symbol "kRenderFxNone"
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(161) : error 017: undefined symbol "kRenderFxNone"
-
- Veteran Member
- Posts: 408
- Joined: 5 years ago
- Contact:
Mystic Viper wrote: ↑4 years agoC:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(28) : error 017: undefined symbol "HIT_GENERIC"Muhammet20 wrote: ↑4 years ago sorry for that check this again i posted the false fun.inc file
download this:
download/file.php?id=783
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(28) : error 008: must be a constant expression; assumed zero
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(29) : error 017: undefined symbol "HIT_HEAD"
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(29) : error 008: must be a constant expression; assumed zero
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(30) : error 017: undefined symbol "HIT_CHEST"
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(30) : error 008: must be a constant expression; assumed zero
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(31) : error 017: undefined symbol "HIT_STOMACH"
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(31) : error 008: must be a constant expression; assumed zero
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(32) : error 017: undefined symbol "HIT_LEFTARM"
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(32) : error 008: must be a constant expression; assumed zero
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(33) : error 017: undefined symbol "HIT_RIGHTARM"
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(33) : error 008: must be a constant expression; assumed zero
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(34) : error 017: undefined symbol "HIT_LEFTLEG"
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(34) : error 008: must be a constant expression; assumed zero
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(35) : error 017: undefined symbol "HIT_RIGHTLEG"
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(35) : error 008: must be a constant expression; assumed zero
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(141) : error 017: undefined symbol "kRenderFxNone"
// C:\Users\Laur\Desktop\ZE Compiler\include\fun.inc(161) : error 017: undefined symbol "kRenderFxNone"
try this if working say to me
Code: Select all
#include <zombie_escape>
new g_nemesis_round, g_cvar_nemesis_chance, g_cvar_nemesis_gravity, g_cvar_nemesis_health, g_cvar_nemesis_speed, g_cvar_nemesis_glow, g_cvar_nemesis_leap
new g_MaxPlayers
native give_longjump(id)
public plugin_init()
{
register_plugin("[ZE] Nemsis round", "1.0", "Kaya Gaming")
register_event("HLTV", "event_newround", "a", "1=0", "2=0")
g_cvar_nemesis_chance = register_cvar("ze_nemesis_chance","20")
g_cvar_nemesis_gravity = register_cvar("ze_nemesis_gravity","650")
g_cvar_nemesis_health = register_cvar("ze_nemesis_health","30000")
g_cvar_nemesis_speed = register_cvar("ze_nemesis_speed","330")
g_cvar_nemesis_glow = register_cvar("ze_nemesis_glow","1")
g_cvar_nemesis_leap = register_cvar("ze_nemesis_leap","1")
g_MaxPlayers = get_maxplayers();
}
public plugin_natives()
{
register_native("ze_is_nemesis_round","native_nemesis_round",1)
}
public native_nemesis_round(id)
{
return g_nemesis_round
}
public ze_user_infected_pre(iVictim, iInfector, iDamage)
{
if(g_nemesis_round)
{
user_silentkill(iVictim)
}
}
public event_newround(id)
{
if(random_num(1, get_pcvar_num(g_cvar_nemesis_chance)) == 1)
{
g_nemesis_round = true
}
}
public ze_zombie_appear()
{
if(g_nemesis_round)
{
for(new id = 0; id < g_MaxPlayers; id++)
{
client_cmd(id,"spk zombie_escape/Nemesis_scream.wav")
set_hudmessage(255, 0, 0, -1.0, 0.30, 0, 6.0, 6.0)
show_hudmessage(id, "=== Nemesis Round ===")
if(ze_is_user_zombie(id))
{
nemesis_features(id)
}
}
}
}
public nemesis_features(id)
{
// User Zombie ? Nemesis Round ?
if(!ze_is_user_zombie(id) && !g_nemesis_round)
return
// Nemesis Glow
if(get_pcvar_num(g_cvar_nemesis_glow) == 1)
Set_Rendering(id, kRenderFxGlowShell, 255, 0, 0, kRenderNormal, 25)
// Nemesis Leap Jump
if(get_pcvar_num(g_cvar_nemesis_leap) == 1)
give_longjump(id)
// Nemesis Gravity
set_user_gravity(id,get_pcvar_float(g_cvar_nemesis_gravity))
// Nemesis Health
set_user_health(id,get_pcvar_num(g_cvar_nemesis_health))
// Nemesis Speed
fm_set_user_speed(id,get_pcvar_float(g_cvar_nemesis_speed))
}
public ze_roundend(id)
{
Set_Rendering(id, kRenderFxNone, 255, 255, 255, kRenderNormal, 16)
g_nemesis_round = false
}
stock fm_set_user_speed(id, Float:Speed)
{
set_pev(id, pev_maxspeed, Speed)
}
C:\Users\Laur\Desktop\ZE Compiler\ze_nemesis.sma(75) : error 017: undefined symbol "set_user_gravity"
C:\Users\Laur\Desktop\ZE Compiler\ze_nemesis.sma(78) : error 017: undefined symbol "set_user_health"
C:\Users\Laur\Desktop\ZE Compiler\ze_nemesis.sma(78) : error 017: undefined symbol "set_user_health"
-
- Veteran Member
- Posts: 408
- Joined: 5 years ago
- Contact:
Mystic Viper wrote: ↑4 years ago C:\Users\Laur\Desktop\ZE Compiler\ze_nemesis.sma(75) : error 017: undefined symbol "set_user_gravity"
C:\Users\Laur\Desktop\ZE Compiler\ze_nemesis.sma(78) : error 017: undefined symbol "set_user_health"
try this again:
Code: Select all
#include <zombie_escape>
new g_nemesis_round, g_cvar_nemesis_chance, g_cvar_nemesis_gravity, g_cvar_nemesis_health, g_cvar_nemesis_speed, g_cvar_nemesis_glow, g_cvar_nemesis_leap
new g_MaxPlayers
native give_longjump(id)
native set_user_gravity(index, Float:gravity = 1.0)
native set_user_health(index, health)
public plugin_init()
{
register_plugin("[ZE] Nemsis round", "1.0", "Kaya Gaming")
register_event("HLTV", "event_newround", "a", "1=0", "2=0")
g_cvar_nemesis_chance = register_cvar("ze_nemesis_chance","20")
g_cvar_nemesis_gravity = register_cvar("ze_nemesis_gravity","650")
g_cvar_nemesis_health = register_cvar("ze_nemesis_health","30000")
g_cvar_nemesis_speed = register_cvar("ze_nemesis_speed","330")
g_cvar_nemesis_glow = register_cvar("ze_nemesis_glow","1")
g_cvar_nemesis_leap = register_cvar("ze_nemesis_leap","1")
g_MaxPlayers = get_maxplayers();
}
public plugin_natives()
{
register_native("ze_is_nemesis_round","native_nemesis_round",1)
}
public native_nemesis_round(id)
{
return g_nemesis_round
}
public ze_user_infected_pre(iVictim, iInfector, iDamage)
{
if(g_nemesis_round)
{
user_silentkill(iVictim)
}
}
public event_newround(id)
{
if(random_num(1, get_pcvar_num(g_cvar_nemesis_chance)) == 1)
{
g_nemesis_round = true
}
}
public ze_zombie_appear()
{
if(g_nemesis_round)
{
for(new id = 0; id < g_MaxPlayers; id++)
{
client_cmd(id,"spk zombie_escape/Nemesis_scream.wav")
set_hudmessage(255, 0, 0, -1.0, 0.30, 0, 6.0, 6.0)
show_hudmessage(id, "=== Nemesis Round ===")
if(ze_is_user_zombie(id))
{
nemesis_features(id)
}
}
}
}
public nemesis_features(id)
{
// User Zombie ? Nemesis Round ?
if(!ze_is_user_zombie(id) && !g_nemesis_round)
return
// Nemesis Glow
if(get_pcvar_num(g_cvar_nemesis_glow) == 1)
Set_Rendering(id, kRenderFxGlowShell, 255, 0, 0, kRenderNormal, 25)
// Nemesis Leap Jump
if(get_pcvar_num(g_cvar_nemesis_leap) == 1)
give_longjump(id)
// Nemesis Gravity
set_user_gravity(id,get_pcvar_float(g_cvar_nemesis_gravity))
// Nemesis Health
set_user_health(id,get_pcvar_num(g_cvar_nemesis_health))
// Nemesis Speed
fm_set_user_speed(id,get_pcvar_float(g_cvar_nemesis_speed))
}
public ze_roundend(id)
{
Set_Rendering(id, kRenderFxNone, 255, 255, 255, kRenderNormal, 16)
g_nemesis_round = false
}
stock fm_set_user_speed(id, Float:Speed)
{
set_pev(id, pev_maxspeed, Speed)
}
Thanks...everything is fine now
Wait...when a player is choose to be nemesis server crash instantly
-
- Veteran Member
- Posts: 408
- Joined: 5 years ago
- Contact:
wait i will check todayMystic Viper wrote: ↑4 years ago Wait...when a player is choose to be nemesis server crash instantly
sorry for this
-
- Veteran Member
- Posts: 408
- Joined: 5 years ago
- Contact:
the problem is from the models plugin(2nd plugin)Mystic Viper wrote: ↑4 years ago Wait...when a player is choose to be nemesis server crash instantly
Code: Select all
#include <zombie_escape>
#define PLUGIN "[ZE] Nemesis Model & Knife"
#define VERSION "1.0"
#define AUTHOR "Kaya Gaming"
// Set Model
#define OFFSET_MODELINDEX 491
new g_model_locked[33]
#define CONFIG_FILE "nemesis_models.ini"
native ze_is_nemesis_round(id)
new Array:nemesis_zombie_model,Array:nemesis_zombie_modelindex,Array:nemesis_zombie_claw
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_forward(FM_SetClientKeyValue, "fw_SetClientKeyValue")
register_event("CurWeapon", "event_CurWeapon", "be", "1=1")
}
public fw_SetClientKeyValue(id, const infobuffer[], const key[])
{
if(g_model_locked[id] && equal(key, "model"))
return FMRES_SUPERCEDE
return FMRES_HANDLED
}
public plugin_precache()
{
nemesis_zombie_model = ArrayCreate(64, 1)
nemesis_zombie_modelindex = ArrayCreate(1, 1)
nemesis_zombie_claw = ArrayCreate(64, 1)
new i, buffer[128], temp_string[256]
for(i = 0; i < ArraySize(nemesis_zombie_model); i++)
{
ArrayGetString(nemesis_zombie_model, i, temp_string, sizeof(temp_string))
formatex(buffer, sizeof(buffer), "models/player/%s/%s.mdl", temp_string, temp_string)
ArrayPushCell(nemesis_zombie_modelindex, precache_model(buffer))
}
for(i = 0; i < ArraySize(nemesis_zombie_claw); i++)
{
ArrayGetString(nemesis_zombie_claw, i, temp_string, sizeof(temp_string))
precache_model(temp_string)
}
models_config()
}
public models_config()
{
// Build customization file path
new path[64]
get_configsdir(path, charsmax(path))
format(path, charsmax(path), "%s/%s", path, CONFIG_FILE)
// File not present
if (!file_exists(path))
{
new error[100]
formatex(error, charsmax(error), "[ZE] Can't Load Config File: %s!", path)
set_fail_state(error)
return;
}
// Set up some vars to hold parsing info
new linedata[1024], key[64], value[960], section
// Open customization file for reading
new file = fopen(path, "rt")
while (file && !feof(file))
{
// Read one line at a time
fgets(file, linedata, charsmax(linedata))
// Replace newlines with a null character to prevent headaches
replace(linedata, charsmax(linedata), "^n", "")
// Blank line or comment
if (!linedata[0] || linedata[0] == ';') continue;
// New section starting
if (linedata[0] == '[')
{
section++
continue;
}
// Get key and value(s)
strtok(linedata, key, charsmax(key), value, charsmax(value), '=')
// Trim spaces
trim(key)
trim(value)
switch (section)
{
case 1: // Model
{
if(equal(key, "NEMESIS_ZOMBIE_MODEL"))
{
// Parse sounds
while (value[0] != 0 && strtok(value, key, charsmax(key), value, charsmax(value), ','))
{
// Trim spaces
trim(key)
trim(value)
// Add to sounds array
ArrayPushString(nemesis_zombie_model, key)
}
}
else if(equal(key, "NEMESIS_ZOMBIE_CLAW"))
{
// Parse sounds
while (value[0] != 0 && strtok(value, key, charsmax(key), value, charsmax(value), ','))
{
// Trim spaces
trim(key)
trim(value)
// Add to sounds array
ArrayPushString(nemesis_zombie_claw, key)
}
}
}
}
}
if (file) fclose(file)
}
public ze_user_infected(iVictim,iInfector)
{
if(ze_is_nemesis_round(iVictim))
{
set_user_nemesis(iVictim)
}
}
public set_user_nemesis(id)
{
if(!is_user_alive(id) || !ze_is_user_zombie(id))
return
static temp_string[128], random1
if(ze_is_nemesis_round(id))
{
random1 = random_num(0, ArraySize(nemesis_zombie_model) - 1)
ArrayGetString(nemesis_zombie_model, random1, temp_string, sizeof(temp_string))
fm_cs_set_user_model(id, temp_string)
#if defined SET_MODELINDEX_OFFSET
static modelindex
modelindex = ArrayGetCell(nemesis_zombie_modelindex, random1)
fm_cs_set_user_model_index(id, modelindex)
#endif
}
}
public event_CurWeapon(id)
{
if(!is_user_alive(id) || !ze_is_user_zombie(id))
return
if(ze_is_nemesis_round(id) && ze_is_user_zombie(id) && get_user_weapon(id) == CSW_KNIFE)
{
static temp_string[128]
ArrayGetString(nemesis_zombie_claw, random_num(0, ArraySize(nemesis_zombie_claw) - 1), temp_string, sizeof(temp_string))
set_pev(id, pev_viewmodel2, temp_string)
set_pev(id, pev_weaponmodel2, "")
}
}
stock fm_cs_set_user_model(id, const model[])
{
g_model_locked[id] = 0
engfunc(EngFunc_SetClientKeyValue, id, engfunc(EngFunc_GetInfoKeyBuffer, id), "model", model)
g_model_locked[id] = 1
}
stock fm_cs_set_user_model_index(id, model_index)
{
if (pev_valid(id) != PDATA_SAFE)
return;
set_pdata_int(id, OFFSET_MODELINDEX, model_index)
}
-
- Veteran Member
- Posts: 408
- Joined: 5 years ago
- Contact:
try this:Mystic Viper wrote: ↑4 years ago Wait...when a player is choose to be nemesis server crash instantly
Code: Select all
#include <zombie_escape>
#define PLUGIN "[ZE] Nemesis Model & Knife"
#define VERSION "1.0"
#define AUTHOR "Kaya Gaming"
// Set Model
#define OFFSET_MODELINDEX 491
new g_model_locked[33]
#define CONFIG_FILE "nemesis_models.ini"
native ze_is_nemesis_round(id)
new Array:nemesis_zombie_model,Array:nemesis_zombie_modelindex,Array:nemesis_zombie_claw
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_forward(FM_SetClientKeyValue, "fw_SetClientKeyValue")
register_event("CurWeapon", "event_CurWeapon", "be", "1=1")
}
public fw_SetClientKeyValue(id, const infobuffer[], const key[])
{
if(g_model_locked[id] && equal(key, "model"))
return FMRES_SUPERCEDE
return FMRES_HANDLED
}
public plugin_precache()
{
nemesis_zombie_model = ArrayCreate(64, 1)
nemesis_zombie_modelindex = ArrayCreate(1, 1)
nemesis_zombie_claw = ArrayCreate(64, 1)
new i, buffer[128], temp_string[256]
for(i = 0; i < ArraySize(nemesis_zombie_model); i++)
{
ArrayGetString(nemesis_zombie_model, i, temp_string, sizeof(temp_string))
formatex(buffer, sizeof(buffer), "models/player/%s/%s.mdl", temp_string, temp_string)
ArrayPushCell(nemesis_zombie_modelindex, precache_model(buffer))
}
for(i = 0; i < ArraySize(nemesis_zombie_claw); i++)
{
ArrayGetString(nemesis_zombie_claw, i, temp_string, sizeof(temp_string))
precache_model(temp_string)
}
models_config()
}
public models_config()
{
// Build customization file path
new path[64]
get_configsdir(path, charsmax(path))
format(path, charsmax(path), "%s/%s", path, CONFIG_FILE)
// File not present
if (!file_exists(path))
{
new error[100]
formatex(error, charsmax(error), "[ZE] Can't Load Config File: %s!", path)
set_fail_state(error)
return;
}
// Set up some vars to hold parsing info
new linedata[1024], key[64], value[960], section
// Open customization file for reading
new file = fopen(path, "rt")
while (file && !feof(file))
{
// Read one line at a time
fgets(file, linedata, charsmax(linedata))
// Replace newlines with a null character to prevent headaches
replace(linedata, charsmax(linedata), "^n", "")
// Blank line or comment
if (!linedata[0] || linedata[0] == ';') continue;
// New section starting
if (linedata[0] == '[')
{
section++
continue;
}
// Get key and value(s)
strtok(linedata, key, charsmax(key), value, charsmax(value), '=')
// Trim spaces
trim(key)
trim(value)
switch (section)
{
case 1: // Model
{
if(equal(key, "NEMESIS_ZOMBIE_MODEL"))
{
// Parse sounds
while (value[0] != 0 && strtok(value, key, charsmax(key), value, charsmax(value), ','))
{
// Trim spaces
trim(key)
trim(value)
// Add to sounds array
ArrayPushString(nemesis_zombie_model, key)
}
}
else if(equal(key, "NEMESIS_ZOMBIE_CLAW"))
{
// Parse sounds
while (value[0] != 0 && strtok(value, key, charsmax(key), value, charsmax(value), ','))
{
// Trim spaces
trim(key)
trim(value)
// Add to sounds array
ArrayPushString(nemesis_zombie_claw, key)
}
}
}
}
}
if (file) fclose(file)
}
public ze_user_infected(iVictim,iInfector)
{
if(ze_is_nemesis_round(iVictim))
{
set_user_nemesis(iVictim)
}
}
public set_user_nemesis(id)
{
static temp_string[128], random1
if(ze_is_nemesis_round(id))
{
random1 = random_num(0, ArraySize(nemesis_zombie_model) - 1)
ArrayGetString(nemesis_zombie_model, random1, temp_string, sizeof(temp_string))
fm_cs_set_user_model(id, temp_string)
#if defined SET_MODELINDEX_OFFSET
static modelindex
modelindex = ArrayGetCell(nemesis_zombie_modelindex, random1)
fm_cs_set_user_model_index(id, modelindex)
#endif
}
}
public event_CurWeapon(id)
{
if(!is_user_alive(id) || !ze_is_user_zombie(id))
return
if(ze_is_nemesis_round(id) && ze_is_user_zombie(id) && get_user_weapon(id) == CSW_KNIFE)
{
static temp_string[128]
ArrayGetString(nemesis_zombie_claw, random_num(0, ArraySize(nemesis_zombie_claw) - 1), temp_string, sizeof(temp_string))
set_pev(id, pev_viewmodel2, temp_string)
set_pev(id, pev_weaponmodel2, "")
}
}
stock fm_cs_set_user_model(id, const model[])
{
g_model_locked[id] = 0
engfunc(EngFunc_SetClientKeyValue, id, engfunc(EngFunc_GetInfoKeyBuffer, id), "model", model)
g_model_locked[id] = 1
}
stock fm_cs_set_user_model_index(id, model_index)
{
if (pev_valid(id) != PDATA_SAFE)
return;
set_pdata_int(id, OFFSET_MODELINDEX, model_index)
}
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute
Sign in
Who is online
Users browsing this forum: No registered users and 2 guests