Member
|
07-31-2021
, 13:02
Re: Model By Flag for Zombie Escape Mod (problem) !
|
#18
|
Quote:
Originally Posted by 1M1e
add #include <amxmodx>
and you don't have reapi_version.inc
|
PHP Code:
#include <amxmodx>
#include <reapi>
#include <cs_weap_models_api>
#include <zombieplague>
// Defines
#define MODEL_MAX_LENGTH 64
#define PLAYERMODEL_MAX_LENGTH 32
#define ACCESS_MAX_LENGTH 32
new g_szAccess_player_vip_models[2] = "m"
new g_szAccess_admin_models[2] = "o"
new g_szAccess_jocker_models[2] = "n"
new g_szAccess_vip_models[2] = "s"
new g_szAccess_dorothy_models[2] = "p"
new g_szAccess_flora_models[2] = "q"
new g_szAccess_ChoiJiYoon_models[2] = "y"
new g_szAccess_deadpool_models[2] = "w"
new g_szAccess_assassincreed_models[2] = "v"
new const szDorothyModel[][] =
{
"Dorothy_Dark_Knight"
}
new const szAssassinCreedModel[][] =
{
"AssassinCreed"
}
new const szDeadPoolModel[][] =
{
"DeadPool"
}
new const szChoiJiYoonModel[][] =
{
"Choi_Ji_Yoon"
}
new const szFloraModel[][] =
{
"Flora_Paladin"
}
new const szJokerModel[][] =
{
"Joker"
}
new const szAgentSmithModel[][] =
{
"agent_smith"
}
new const szVipHumanModel[][] =
{
"human_vip"
}
new const szVipZombieModel[][] =
{
"zombie_vip"
}
new const v_szVipZombieKnifeModel[][] =
{
"models/StonerServerWeaponsModels/v_knife_zombie_vip.mdl"
}
// Dynamic Arrays: Models
new Array:g_szVipHumanModel, Array:g_szVipZombieModel, Array:g_v_szVipZombieKnifeModel, Array:g_szJokerModel, Array:g_szAgentSmithModel, Array:g_szDorothyModel, Array:g_szFloraModel,
Array:g_szAssassinCreedModel, Array:g_szDeadPoolModel, Array:g_szChoiJiYoonModel
public plugin_init()
{
register_plugin("[ZE] Special Models", 2.9, 1M1e)
}
public plugin_precache()
{
// Initialize Arrays
g_szDorothyModel = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
g_szFloraModel = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
g_szAgentSmithModel = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
g_szJokerModel = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
g_szVipHumanModel = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
g_szVipZombieModel = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
g_v_szVipZombieKnifeModel = ArrayCreate(MODEL_MAX_LENGTH, 1)
g_szAssassinCreedModel = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
g_szDeadPoolModel = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
g_szChoiJiYoonModel = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
// Load our Default Values
new iIndex
if(ArraySize(g_szDorothyModel) == 0)
{
for(iIndex = 0; iIndex < sizeof szDorothyModel; iIndex++)
ArrayPushString(g_szDorothyModel, szDorothyModel[iIndex])
}
if(ArraySize(g_szAssassinCreedModel) == 0)
{
for(iIndex = 0; iIndex < sizeof szAssassinCreedModel; iIndex++)
ArrayPushString(g_szAssassinCreedModel, szAssassinCreedModel[iIndex])
}
if(ArraySize(g_szDeadPoolModel) == 0)
{
for(iIndex = 0; iIndex < sizeof szDeadPoolModel; iIndex++)
ArrayPushString(g_szDeadPoolModel, szDeadPoolModel[iIndex])
}
if(ArraySize(g_szChoiJiYoonModel) == 0)
{
for(iIndex = 0; iIndex < sizeof szChoiJiYoonModel; iIndex++)
ArrayPushString(g_szChoiJiYoonModel, szChoiJiYoonModel[iIndex])
}
if(ArraySize(g_szFloraModel) == 0)
{
for(iIndex = 0; iIndex < sizeof szFloraModel; iIndex++)
ArrayPushString(g_szFloraModel, szFloraModel[iIndex])
}
if(ArraySize(g_szAgentSmithModel) == 0)
{
for(iIndex = 0; iIndex < sizeof szAgentSmithModel; iIndex++)
ArrayPushString(g_szAgentSmithModel, szAgentSmithModel[iIndex])
}
if(ArraySize(g_szJokerModel) == 0)
{
for(iIndex = 0; iIndex < sizeof szJokerModel; iIndex++)
ArrayPushString(g_szJokerModel, szJokerModel[iIndex])
}
if(ArraySize(g_szVipHumanModel) == 0)
{
for(iIndex = 0; iIndex < sizeof szVipHumanModel; iIndex++)
ArrayPushString(g_szVipHumanModel, szVipHumanModel[iIndex])
}
if(ArraySize(g_szVipZombieModel) == 0)
{
for(iIndex = 0; iIndex < sizeof szVipZombieModel; iIndex++)
ArrayPushString(g_szVipZombieModel, szVipZombieModel[iIndex])
}
if(ArraySize(g_v_szVipZombieKnifeModel) == 0)
{
for(iIndex = 0; iIndex < sizeof v_szVipZombieKnifeModel; iIndex++)
ArrayPushString(g_v_szVipZombieKnifeModel, v_szVipZombieKnifeModel[iIndex])
}
// Precache
new szPlayerModel[PLAYERMODEL_MAX_LENGTH], szModel[MODEL_MAX_LENGTH], szModelPath[128]
for (iIndex = 0; iIndex < ArraySize(g_szDorothyModel); iIndex++)
{
ArrayGetString(g_szDorothyModel, iIndex, szPlayerModel, charsmax(szPlayerModel))
formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
precache_model(szModelPath)
}
for (iIndex = 0; iIndex < ArraySize(g_szAssassinCreedModel); iIndex++)
{
ArrayGetString(g_szAssassinCreedModel, iIndex, szPlayerModel, charsmax(szPlayerModel))
formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
precache_model(szModelPath)
}
for (iIndex = 0; iIndex < ArraySize(g_szDeadPoolModel); iIndex++)
{
ArrayGetString(g_szDeadPoolModel, iIndex, szPlayerModel, charsmax(szPlayerModel))
formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
precache_model(szModelPath)
}
for (iIndex = 0; iIndex < ArraySize(g_szChoiJiYoonModel); iIndex++)
{
ArrayGetString(g_szChoiJiYoonModel, iIndex, szPlayerModel, charsmax(szPlayerModel))
formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
precache_model(szModelPath)
}
for (iIndex = 0; iIndex < ArraySize(g_szFloraModel); iIndex++)
{
ArrayGetString(g_szFloraModel, iIndex, szPlayerModel, charsmax(szPlayerModel))
formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
precache_model(szModelPath)
}
for (iIndex = 0; iIndex < ArraySize(g_szAgentSmithModel); iIndex++)
{
ArrayGetString(g_szAgentSmithModel, iIndex, szPlayerModel, charsmax(szPlayerModel))
formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
precache_model(szModelPath)
}
for (iIndex = 0; iIndex < ArraySize(g_szJokerModel); iIndex++)
{
ArrayGetString(g_szJokerModel, iIndex, szPlayerModel, charsmax(szPlayerModel))
formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
precache_model(szModelPath)
}
for (iIndex = 0; iIndex < ArraySize(g_szVipHumanModel); iIndex++)
{
ArrayGetString(g_szVipHumanModel, iIndex, szPlayerModel, charsmax(szPlayerModel))
formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
precache_model(szModelPath)
}
for (iIndex = 0; iIndex < ArraySize(g_szVipZombieModel); iIndex++)
{
ArrayGetString(g_szVipZombieModel, iIndex, szPlayerModel, charsmax(szPlayerModel))
formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
precache_model(szModelPath)
}
for (iIndex = 0; iIndex < ArraySize(g_v_szVipZombieKnifeModel); iIndex++)
{
ArrayGetString(g_v_szVipZombieKnifeModel, iIndex, szModel, charsmax(szModel))
precache_model(szModel)
}
}
public zp_user_humanized_pre(id)
{
if(zp_get_user_zombie(id) || !is_user_alive(id))
return
new szPlayerModel[PLAYERMODEL_MAX_LENGTH]
if (get_user_flags(id) & (read_flags(g_szAccess_dorothy_models)))
{
ArrayGetString(g_szDorothyModel, random_num(0, ArraySize(g_szDorothyModel) - 1), szPlayerModel, charsmax(szPlayerModel))
rg_set_user_model(id, szPlayerModel)
}
else if (get_user_flags(id) & (read_flags(g_szAccess_flora_models)))
{
ArrayGetString(g_szFloraModel, random_num(0, ArraySize(g_szFloraModel) - 1), szPlayerModel, charsmax(szPlayerModel))
rg_set_user_model(id, szPlayerModel)
}
else if (get_user_flags(id) & (read_flags(g_szAccess_assassincreed_models)))
{
ArrayGetString(g_szAssassinCreedModel, random_num(0, ArraySize(g_szAssassinCreedModel) - 1), szPlayerModel, charsmax(szPlayerModel))
rg_set_user_model(id, szPlayerModel)
}
else if (get_user_flags(id) & (read_flags(g_szAccess_deadpool_models)))
{
ArrayGetString(g_szDeadPoolModel, random_num(0, ArraySize(g_szDeadPoolModel) - 1), szPlayerModel, charsmax(szPlayerModel))
rg_set_user_model(id, szPlayerModel)
}
else if (get_user_flags(id) & (read_flags(g_szAccess_ChoiJiYoon_models)))
{
ArrayGetString(g_szChoiJiYoonModel, random_num(0, ArraySize(g_szChoiJiYoonModel) - 1), szPlayerModel, charsmax(szPlayerModel))
rg_set_user_model(id, szPlayerModel)
}
else if (get_user_flags(id) & (read_flags(g_szAccess_admin_models)))
{
ArrayGetString(g_szAgentSmithModel, random_num(0, ArraySize(g_szAgentSmithModel) - 1), szPlayerModel, charsmax(szPlayerModel))
rg_set_user_model(id, szPlayerModel)
}
else if (get_user_flags(id) & (read_flags(g_szAccess_jocker_models)))
{
ArrayGetString(g_szJokerModel, random_num(0, ArraySize(g_szJokerModel) - 1), szPlayerModel, charsmax(szPlayerModel))
rg_set_user_model(id, szPlayerModel)
}
else if (get_user_flags(id) & (read_flags(g_szAccess_player_vip_models)))
{
ArrayGetString(g_szVipHumanModel, random_num(0, ArraySize(g_szVipHumanModel) - 1), szPlayerModel, charsmax(szPlayerModel))
rg_set_user_model(id, szPlayerModel)
}
}
public zp_user_infected_pre(iVictim, iInfector)
{
if(!is_user_alive(iVictim))
return
// Set Zombie Models
new szPlayerModel[PLAYERMODEL_MAX_LENGTH], szModel[MODEL_MAX_LENGTH]
if (get_user_flags(iVictim) & (read_flags(g_szAccess_vip_models)))
{
// Set Zombie Vip Model
ArrayGetString(g_szVipZombieModel, random_num(0, ArraySize(g_szVipZombieModel) - 1), szPlayerModel, charsmax(szPlayerModel))
rg_set_user_model(iVictim, szPlayerModel)
// Set Vip Zombie Knife Model
ArrayGetString(g_v_szVipZombieKnifeModel, random_num(0, ArraySize(g_v_szVipZombieKnifeModel) - 1), szModel, charsmax(szModel))
cs_set_player_view_model(iVictim, CSW_KNIFE, szModel)
cs_set_player_weap_model(iVictim, CSW_KNIFE, "") // Leave Blank so knife not appear with zombies
}
Bro you helping me much Thanks , But I still getting problems
HTML Code:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2013 ITB CompuPhase, AMX Mod X Team
Error: Argument type mismatch (argument 2) on line 78
Error: Undefined symbol "M1e" on line 78
Error: Expected token: "}", but found "-end of file-" on line 331
3 Errors.
Could not locate output file xvskins.amx (compile failed).
|
|