Description:
- New simple plugin for only for Owners, this plugin will will give special model for anyone who have flag "l" // ADMIN_RCON & available only for human. Enjoy !!
- Simply install it like any plugin and Don't forget to put your own model..
Code: Select all
#include <zombie_escape>
// Setting file
new const ZE_SETTING_RESOURCES[] = "zombie_escape.ini"
#define ADMIN_MODELS_ACCESS ADMIN_RCON
// Default models
new const szAdminHumanModel[][] =
{
"human_owner"
}
// Dynamic Arrays: Models
new Array:g_szAdminHumanModel
public plugin_init()
{
register_plugin("[ZE] Owner Skin", ZE_VERSION, AUTHORS)
}
public plugin_precache()
{
// Initialize arrays
g_szAdminHumanModel = ArrayCreate(32, 1)
// Load from external file
amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN OWNER", g_szAdminHumanModel)
// Load our default Values
new iIndex
if(ArraySize(g_szAdminHumanModel) == 0)
{
for(iIndex = 0; iIndex < charsmax(szAdminHumanModel); iIndex++)
ArrayPushString(g_szAdminHumanModel, szAdminHumanModel[iIndex])
// Save to external file
amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN OWNER", g_szAdminHumanModel)
}
// Precache
new szPlayerModel[32], szModelPath[128]
for (iIndex = 0; iIndex < ArraySize(g_szAdminHumanModel); iIndex++)
{
ArrayGetString(g_szAdminHumanModel, iIndex, szPlayerModel, charsmax(szPlayerModel))
formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
precache_model(szModelPath)
}
}
public ze_user_humanized(id)
{
if(ze_is_user_zombie(id) || !is_user_alive(id) || !(get_user_flags(id) & ADMIN_MODELS_ACCESS))
return
new szPlayerModel[32]
// Set owner model
ArrayGetString(g_szAdminHumanModel, random_num(0, ArraySize(g_szAdminHumanModel) - 1), szPlayerModel, charsmax(szPlayerModel))
rg_set_user_model(id, szPlayerModel)
}
jack u can do this in your special model sma ?Jack GamePlay wrote: ↑5 years ago A clean code:Code: Select all
#include <zombie_escape> // Setting file new const ZE_SETTING_RESOURCES[] = "zombie_escape.ini" #define ADMIN_MODELS_ACCESS ADMIN_RCON // Default models new const szAdminHumanModel[][] = { "human_owner" } // Dynamic Arrays: Models new Array:g_szAdminHumanModel public plugin_init() { register_plugin("[ZE] Owner Skin", ZE_VERSION, AUTHORS) } public plugin_precache() { // Initialize arrays g_szAdminHumanModel = ArrayCreate(32, 1) // Load from external file amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN OWNER", g_szAdminHumanModel) // Load our default Values new iIndex if(ArraySize(g_szAdminHumanModel) == 0) { for(iIndex = 0; iIndex < charsmax(szAdminHumanModel); iIndex++) ArrayPushString(g_szAdminHumanModel, szAdminHumanModel[iIndex]) // Save to external file amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN OWNER", g_szAdminHumanModel) } // Precache new szPlayerModel[32], szModelPath[128] for (iIndex = 0; iIndex < ArraySize(g_szAdminHumanModel); iIndex++) { ArrayGetString(g_szAdminHumanModel, iIndex, szPlayerModel, charsmax(szPlayerModel)) formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel) precache_model(szModelPath) } } public ze_user_humanized(id) { if(ze_is_user_zombie(id) || !is_user_alive(id) || !(get_user_flags(id) & ADMIN_MODELS_ACCESS)) return new szPlayerModel[32] // Set owner model ArrayGetString(g_szAdminHumanModel, random_num(0, ArraySize(g_szAdminHumanModel) - 1), szPlayerModel, charsmax(szPlayerModel)) rg_set_user_model(id, szPlayerModel) }
What's wrong with it?
nothing wrong with it.... just an extra out side external code for 1 modelJack GamePlay wrote: ↑5 years agoWhat's wrong with it?
Anyway, we won't do anything with plugins/extra items on the site before we finish the mod's update.
We have added new natives & more stuff.
Wait for it.
Like me but you can use this its work in my server
He who fails to plan is planning to fail
Code: Select all
#include <zombie_escape>
// Setting file
new const ZE_SETTING_RESOURCES[] = "zombie_escape.ini"
#define ADMIN_MODELS_ACCESS ADMIN_RCON
// Default models
new const szAdminHumanModel[][] =
{
"human_owner"
}
// Dynamic Arrays: Models
new Array:g_szAdminHumanModel
public plugin_init()
{
register_plugin("[ZE] Owner Skin", ZE_VERSION, AUTHORS)
}
public plugin_precache()
{
// Initialize arrays
g_szAdminHumanModel = ArrayCreate(32, 1)
// Load from external file
amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN OWNER", g_szAdminHumanModel)
// Load our default Values
new iIndex
if(ArraySize(g_szAdminHumanModel) == 0)
{
for(iIndex = 0; iIndex < charsmax(szAdminHumanModel); iIndex++)
ArrayPushString(g_szAdminHumanModel, szAdminHumanModel[iIndex])
// Save to external file
amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN OWNER", g_szAdminHumanModel)
}
// Precache
new szPlayerModel[32], szModelPath[128]
for (iIndex = 0; iIndex < ArraySize(g_szAdminHumanModel); iIndex++)
{
ArrayGetString(g_szAdminHumanModel, iIndex, szPlayerModel, charsmax(szPlayerModel))
formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
precache_model(szModelPath)
}
}
public ze_user_humanized(id)
{
if(!(get_user_flags(id) & ADMIN_MODELS_ACCESS))
return
new szPlayerModel[32]
// Set owner model
ArrayGetString(g_szAdminHumanModel, random_num(0, ArraySize(g_szAdminHumanModel) - 1), szPlayerModel, charsmax(szPlayerModel))
rg_set_user_model(id, szPlayerModel)
}
He who fails to plan is planning to fail
You need to be a member in order to post a reply
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
Users browsing this forum: No registered users and 0 guests