Approved Special Models

Gameplay Addons
User avatar
Mohamed Alaa
Mod Developer
Mod Developer
Egypt
Posts: 622
Joined: 2 Years Ago
Location: Egypt
Has thanked: 34 times
Been thanked: 48 times
Age: 19
Contact:

Re: Special Models

#51

Post by Mohamed Alaa » 1 Year Ago

Luxurious wrote:
1 Year Ago
Need to Put many skin for admin`s !!
You can add as many as you want.
Make sure to add , between each model's name as: admin_model1 , admin_model2 , ....
Want your own mod edition? PM me.
Accepting web projects.
CS 1.6 hosting: powergamingtech.com

User avatar
Luxurious
Senior Member
Senior Member
Egypt
Posts: 150
Joined: 1 Year Ago
Location: Egypt
Has thanked: 3 times
Been thanked: 4 times
Contact:

#52

Post by Luxurious » 1 Year Ago

yes .... but i don`t want it as Random need it with VIP access
BeTalk Zombie-Escape V1.4
IP : 51.77.103.159:27015

User avatar
Mohamed Alaa
Mod Developer
Mod Developer
Egypt
Posts: 622
Joined: 2 Years Ago
Location: Egypt
Has thanked: 34 times
Been thanked: 48 times
Age: 19
Contact:

#53

Post by Mohamed Alaa » 1 Year Ago

Luxurious wrote:
1 Year Ago
yes .... but i don`t want it as Random need it with VIP access
It will be included in the next updates.
Want your own mod edition? PM me.
Accepting web projects.
CS 1.6 hosting: powergamingtech.com

User avatar
konno
Member
Member
Brazil
Posts: 44
Joined: 2 Years Ago
Location: Brazil
Has thanked: 2 times
Been thanked: 1 time
Age: 27
Contact:

#54

Post by konno » 1 Year Ago

Help Jack. fix error

Code: Select all

#include <zombie_escape>

// Setting File
new const ZE_SETTING_RESOURCES[] = "zombie_escape.ini"

// Defines
#define MODEL_MAX_LENGTH 64
#define PLAYERMODEL_MAX_LENGTH 32
#define ACCESS_MAX_LENGTH 32
#define ADMIN_MODELS_ACCESS ADMIN_LEVEL_C
#define GIRL_MODELS_ACCESS ADMIN_LEVEL_D

// Default Models
new const szAdminHumanModel[][] = 
{
	"humano_od"
}

new const szAdminZombieModel[][] = 
{
	"zumbi_od"
}

new const szGirlHumanModel[][] = 
{
	"humana_girl"
}

new const szGirlZombieModel[][] = 
{
	"zombie_girl"
}

new const v_szAdminHumanKnifeModel[][] = 
{
	"models/zombie_escape/v_knife_human_admin.mdl"
}

new const v_szAdminZombieKnifeModel[][] = 
{
	"models/zombie_escape/v_knife_zombie_admin.mdl"
}


// Dynamic Arrays: Models
new Array:g_szAdminHumanModel, Array:g_szAdminZombieModel, Array:g_szGirlHumanModel, Array:g_szGirlZombieModel, Array:g_v_szAdminHumanKnifeModel, Array:g_v_szAdminZombieKnifeModel

public plugin_init()
{
	register_plugin("[ZE] Special Models", ZE_VERSION, AUTHORS)
}

public plugin_precache()
{
	// Initialize Arrays
	g_szAdminHumanModel = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
	g_szAdminZombieModel = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
	g_szGirlHumanModel = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
	g_szGirlZombieModel = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
	g_v_szAdminHumanKnifeModel = ArrayCreate(MODEL_MAX_LENGTH, 1)
	g_v_szAdminZombieKnifeModel = ArrayCreate(MODEL_MAX_LENGTH, 1)
	
	// Load From External File
	amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN ADMIN", g_szAdminHumanModel)
	amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "ZOMBIE ADMIN", g_szAdminZombieModel)
	amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN ADMIN", g_szGirlHumanModel)
	amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "ZOMBIE ADMIN", g_szGirlZombieModel)
	amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Weapon Models", "V_KNIFE HUMAN ADMIN", g_v_szAdminHumanKnifeModel)
	amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Weapon Models", "V_KNIFE ZOMBIE ADMIN", g_v_szAdminZombieKnifeModel)
	
	// Load our Default Values
	new iIndex
	
	if(ArraySize(g_szAdminHumanModel) == 0)
	{
		for(iIndex = 0; iIndex < sizeof szAdminHumanModel; iIndex++)
			ArrayPushString(g_szAdminHumanModel, szAdminHumanModel[iIndex])
		
		// Save to external file
		amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN ADMIN", g_szAdminHumanModel)
	}
	
	if(ArraySize(g_szAdminZombieModel) == 0)
	{
		for(iIndex = 0; iIndex < sizeof szAdminZombieModel; iIndex++)
			ArrayPushString(g_szAdminZombieModel, szAdminZombieModel[iIndex])
		
		// Save to external file
		amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "ZOMBIE ADMIN", g_szAdminZombieModel)
	}
//Girl
	if(ArraySize(g_szGirlHumanModel) == 0)
	{
		for(iIndex = 0; iIndex < sizeof szGirlHumanModel; iIndex++)
			ArrayPushString(g_szGirlHumanModel, szGirlHumanModel[iIndex])
		
		// Save to external file
		amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN GIRL", g_szAdminHumanModel)
	}
	
	if(ArraySize(g_szGirlZombieModel) == 0)
	{
		for(iIndex = 0; iIndex < sizeof szGirlZombieModel; iIndex++)
			ArrayPushString(g_szGirlZombieModel, szGirlZombieModel[iIndex])
		
		// Save to external file
		amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "ZOMBIE GIRL", g_szAdminZombieModel)
	}
//girl
	
	if(ArraySize(g_v_szAdminHumanKnifeModel) == 0)
	{
		for(iIndex = 0; iIndex < sizeof v_szAdminHumanKnifeModel; iIndex++)
			ArrayPushString(g_v_szAdminHumanKnifeModel, v_szAdminHumanKnifeModel[iIndex])
		
		// Save to external file
		amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Weapon Models", "V_KNIFE HUMAN ADMIN", g_v_szAdminHumanKnifeModel)
	}
	
	if(ArraySize(g_v_szAdminZombieKnifeModel) == 0)
	{
		for(iIndex = 0; iIndex < sizeof v_szAdminZombieKnifeModel; iIndex++)
			ArrayPushString(g_v_szAdminZombieKnifeModel, v_szAdminZombieKnifeModel[iIndex])
		
		// Save to external file
		amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Weapon Models", "V_KNIFE ZOMBIE ADMIN", g_v_szAdminZombieKnifeModel)
	}
	

	// Precache
	new szPlayerModel[PLAYERMODEL_MAX_LENGTH], szModel[MODEL_MAX_LENGTH], 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)
	}
	
	for (iIndex = 0; iIndex < ArraySize(g_szAdminZombieModel); iIndex++)
	{
		ArrayGetString(g_szAdminZombieModel, iIndex, szPlayerModel, charsmax(szPlayerModel))
		formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
		precache_model(szModelPath)
	}
//girl
	for (iIndex = 0; iIndex < ArraySize(g_szGirlHumanModel); iIndex++)
	{
		ArrayGetString(g_szGirlHumanModel, iIndex, szPlayerModel, charsmax(szPlayerModel))
		formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
		precache_model(szModelPath)
	}
	
	for (iIndex = 0; iIndex < ArraySize(g_szGirlZombieModel); iIndex++)
	{
		ArrayGetString(g_szGirlZombieModel, iIndex, szPlayerModel, charsmax(szPlayerModel))
		formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
		precache_model(szModelPath)
	}
//girl
	
	for (iIndex = 0; iIndex < ArraySize(g_v_szAdminHumanKnifeModel); iIndex++)
	{
		ArrayGetString(g_v_szAdminHumanKnifeModel, iIndex, szModel, charsmax(szModel))
		precache_model(szModel)
	}
	
	for (iIndex = 0; iIndex < ArraySize(g_v_szAdminZombieKnifeModel); iIndex++)
	{
		ArrayGetString(g_v_szAdminZombieKnifeModel, iIndex, szModel, charsmax(szModel))
		precache_model(szModel)
	}
}

public ze_user_humanized(id)
{
	if(ze_is_user_zombie(id) || !is_user_alive(id))
		return
		
	new szPlayerModel[PLAYERMODEL_MAX_LENGTH], szModel[MODEL_MAX_LENGTH]

	// Player Admin?
	if(get_user_flags(id) & ADMIN_MODELS_ACCESS)
	{
		// Set Admin Human Model
		ArrayGetString(g_szAdminHumanModel, random_num(0, ArraySize(g_szAdminHumanModel) - 1), szPlayerModel, charsmax(szPlayerModel))
		rg_set_user_model(id, szPlayerModel)
		
		// Set Admin Human Knife Model
		ArrayGetString(g_v_szAdminHumanKnifeModel, random_num(0, ArraySize(g_v_szAdminHumanKnifeModel) - 1), szModel, charsmax(szModel))
		cs_set_player_view_model(id, CSW_KNIFE, szModel)
	}
	// Player Girl?
	if(get_user_flags(id) & GIRL_MODELS_ACCESS)
	{
		// Set Girl Human Model
		ArrayGetString(g_szGirlHumanModel, random_num(0, ArraySize(g_szGirlHumanModel) - 1), szPlayerModel, charsmax(szPlayerModel))
		rg_set_user_model(id, szPlayerModel)
		
	}
}

public ze_user_infected(iVictim, iInfector)
{
	if(!is_user_alive(iVictim))
		return
		
	// Set Zombie Models
	new szPlayerModel[PLAYERMODEL_MAX_LENGTH], szModel[MODEL_MAX_LENGTH]
	
	// Player Admin?
	if(get_user_flags(iVictim) & ADMIN_MODELS_ACCESS)
	{
		// Set Zombie Admin Model
		ArrayGetString(g_szAdminZombieModel, random_num(0, ArraySize(g_szAdminZombieModel) - 1), szPlayerModel, charsmax(szPlayerModel))
		rg_set_user_model(iVictim, szPlayerModel)
		
		// Set Admin Zombie Knife Model
		ArrayGetString(g_v_szAdminZombieKnifeModel, random_num(0, ArraySize(g_v_szAdminZombieKnifeModel) - 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
	}

	// Player Girl?
	if(get_user_flags(iVictim) & GIRL_MODELS_ACCESS)
	{
		// Set Zombie Girl Model
		ArrayGetString(g_szGirlZombieModel, random_num(0, ArraySize(g_szGirlZombieModel) - 1), szPlayerModel, charsmax(szPlayerModel))
		rg_set_user_model(iVictim, szPlayerModel)
	}

}

User avatar
Mohamed Alaa
Mod Developer
Mod Developer
Egypt
Posts: 622
Joined: 2 Years Ago
Location: Egypt
Has thanked: 34 times
Been thanked: 48 times
Age: 19
Contact:

#55

Post by Mohamed Alaa » 1 Year Ago

konno wrote:
1 Year Ago
Help Jack. fix error

Code: Select all

#include <zombie_escape>

// Setting File
new const ZE_SETTING_RESOURCES[] = "zombie_escape.ini"

// Defines
#define MODEL_MAX_LENGTH 64
#define PLAYERMODEL_MAX_LENGTH 32
#define ACCESS_MAX_LENGTH 32
#define ADMIN_MODELS_ACCESS ADMIN_LEVEL_C
#define GIRL_MODELS_ACCESS ADMIN_LEVEL_D

// Default Models
new const szAdminHumanModel[][] = 
{
	"humano_od"
}

new const szAdminZombieModel[][] = 
{
	"zumbi_od"
}

new const szGirlHumanModel[][] = 
{
	"humana_girl"
}

new const szGirlZombieModel[][] = 
{
	"zombie_girl"
}

new const v_szAdminHumanKnifeModel[][] = 
{
	"models/zombie_escape/v_knife_human_admin.mdl"
}

new const v_szAdminZombieKnifeModel[][] = 
{
	"models/zombie_escape/v_knife_zombie_admin.mdl"
}


// Dynamic Arrays: Models
new Array:g_szAdminHumanModel, Array:g_szAdminZombieModel, Array:g_szGirlHumanModel, Array:g_szGirlZombieModel, Array:g_v_szAdminHumanKnifeModel, Array:g_v_szAdminZombieKnifeModel

public plugin_init()
{
	register_plugin("[ZE] Special Models", ZE_VERSION, AUTHORS)
}

public plugin_precache()
{
	// Initialize Arrays
	g_szAdminHumanModel = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
	g_szAdminZombieModel = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
	g_szGirlHumanModel = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
	g_szGirlZombieModel = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
	g_v_szAdminHumanKnifeModel = ArrayCreate(MODEL_MAX_LENGTH, 1)
	g_v_szAdminZombieKnifeModel = ArrayCreate(MODEL_MAX_LENGTH, 1)
	
	// Load From External File
	amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN ADMIN", g_szAdminHumanModel)
	amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "ZOMBIE ADMIN", g_szAdminZombieModel)
	amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN ADMIN", g_szGirlHumanModel)
	amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "ZOMBIE ADMIN", g_szGirlZombieModel)
	amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Weapon Models", "V_KNIFE HUMAN ADMIN", g_v_szAdminHumanKnifeModel)
	amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Weapon Models", "V_KNIFE ZOMBIE ADMIN", g_v_szAdminZombieKnifeModel)
	
	// Load our Default Values
	new iIndex
	
	if(ArraySize(g_szAdminHumanModel) == 0)
	{
		for(iIndex = 0; iIndex < sizeof szAdminHumanModel; iIndex++)
			ArrayPushString(g_szAdminHumanModel, szAdminHumanModel[iIndex])
		
		// Save to external file
		amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN ADMIN", g_szAdminHumanModel)
	}
	
	if(ArraySize(g_szAdminZombieModel) == 0)
	{
		for(iIndex = 0; iIndex < sizeof szAdminZombieModel; iIndex++)
			ArrayPushString(g_szAdminZombieModel, szAdminZombieModel[iIndex])
		
		// Save to external file
		amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "ZOMBIE ADMIN", g_szAdminZombieModel)
	}
//Girl
	if(ArraySize(g_szGirlHumanModel) == 0)
	{
		for(iIndex = 0; iIndex < sizeof szGirlHumanModel; iIndex++)
			ArrayPushString(g_szGirlHumanModel, szGirlHumanModel[iIndex])
		
		// Save to external file
		amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN GIRL", g_szAdminHumanModel)
	}
	
	if(ArraySize(g_szGirlZombieModel) == 0)
	{
		for(iIndex = 0; iIndex < sizeof szGirlZombieModel; iIndex++)
			ArrayPushString(g_szGirlZombieModel, szGirlZombieModel[iIndex])
		
		// Save to external file
		amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "ZOMBIE GIRL", g_szAdminZombieModel)
	}
//girl
	
	if(ArraySize(g_v_szAdminHumanKnifeModel) == 0)
	{
		for(iIndex = 0; iIndex < sizeof v_szAdminHumanKnifeModel; iIndex++)
			ArrayPushString(g_v_szAdminHumanKnifeModel, v_szAdminHumanKnifeModel[iIndex])
		
		// Save to external file
		amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Weapon Models", "V_KNIFE HUMAN ADMIN", g_v_szAdminHumanKnifeModel)
	}
	
	if(ArraySize(g_v_szAdminZombieKnifeModel) == 0)
	{
		for(iIndex = 0; iIndex < sizeof v_szAdminZombieKnifeModel; iIndex++)
			ArrayPushString(g_v_szAdminZombieKnifeModel, v_szAdminZombieKnifeModel[iIndex])
		
		// Save to external file
		amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Weapon Models", "V_KNIFE ZOMBIE ADMIN", g_v_szAdminZombieKnifeModel)
	}
	

	// Precache
	new szPlayerModel[PLAYERMODEL_MAX_LENGTH], szModel[MODEL_MAX_LENGTH], 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)
	}
	
	for (iIndex = 0; iIndex < ArraySize(g_szAdminZombieModel); iIndex++)
	{
		ArrayGetString(g_szAdminZombieModel, iIndex, szPlayerModel, charsmax(szPlayerModel))
		formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
		precache_model(szModelPath)
	}
//girl
	for (iIndex = 0; iIndex < ArraySize(g_szGirlHumanModel); iIndex++)
	{
		ArrayGetString(g_szGirlHumanModel, iIndex, szPlayerModel, charsmax(szPlayerModel))
		formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
		precache_model(szModelPath)
	}
	
	for (iIndex = 0; iIndex < ArraySize(g_szGirlZombieModel); iIndex++)
	{
		ArrayGetString(g_szGirlZombieModel, iIndex, szPlayerModel, charsmax(szPlayerModel))
		formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
		precache_model(szModelPath)
	}
//girl
	
	for (iIndex = 0; iIndex < ArraySize(g_v_szAdminHumanKnifeModel); iIndex++)
	{
		ArrayGetString(g_v_szAdminHumanKnifeModel, iIndex, szModel, charsmax(szModel))
		precache_model(szModel)
	}
	
	for (iIndex = 0; iIndex < ArraySize(g_v_szAdminZombieKnifeModel); iIndex++)
	{
		ArrayGetString(g_v_szAdminZombieKnifeModel, iIndex, szModel, charsmax(szModel))
		precache_model(szModel)
	}
}

public ze_user_humanized(id)
{
	if(ze_is_user_zombie(id) || !is_user_alive(id))
		return
		
	new szPlayerModel[PLAYERMODEL_MAX_LENGTH], szModel[MODEL_MAX_LENGTH]

	// Player Admin?
	if(get_user_flags(id) & ADMIN_MODELS_ACCESS)
	{
		// Set Admin Human Model
		ArrayGetString(g_szAdminHumanModel, random_num(0, ArraySize(g_szAdminHumanModel) - 1), szPlayerModel, charsmax(szPlayerModel))
		rg_set_user_model(id, szPlayerModel)
		
		// Set Admin Human Knife Model
		ArrayGetString(g_v_szAdminHumanKnifeModel, random_num(0, ArraySize(g_v_szAdminHumanKnifeModel) - 1), szModel, charsmax(szModel))
		cs_set_player_view_model(id, CSW_KNIFE, szModel)
	}
	// Player Girl?
	if(get_user_flags(id) & GIRL_MODELS_ACCESS)
	{
		// Set Girl Human Model
		ArrayGetString(g_szGirlHumanModel, random_num(0, ArraySize(g_szGirlHumanModel) - 1), szPlayerModel, charsmax(szPlayerModel))
		rg_set_user_model(id, szPlayerModel)
		
	}
}

public ze_user_infected(iVictim, iInfector)
{
	if(!is_user_alive(iVictim))
		return
		
	// Set Zombie Models
	new szPlayerModel[PLAYERMODEL_MAX_LENGTH], szModel[MODEL_MAX_LENGTH]
	
	// Player Admin?
	if(get_user_flags(iVictim) & ADMIN_MODELS_ACCESS)
	{
		// Set Zombie Admin Model
		ArrayGetString(g_szAdminZombieModel, random_num(0, ArraySize(g_szAdminZombieModel) - 1), szPlayerModel, charsmax(szPlayerModel))
		rg_set_user_model(iVictim, szPlayerModel)
		
		// Set Admin Zombie Knife Model
		ArrayGetString(g_v_szAdminZombieKnifeModel, random_num(0, ArraySize(g_v_szAdminZombieKnifeModel) - 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
	}

	// Player Girl?
	if(get_user_flags(iVictim) & GIRL_MODELS_ACCESS)
	{
		// Set Zombie Girl Model
		ArrayGetString(g_szGirlZombieModel, random_num(0, ArraySize(g_szGirlZombieModel) - 1), szPlayerModel, charsmax(szPlayerModel))
		rg_set_user_model(iVictim, szPlayerModel)
	}

}
What is the error?!?!
Want your own mod edition? PM me.
Accepting web projects.
CS 1.6 hosting: powergamingtech.com

User avatar
konno
Member
Member
Brazil
Posts: 44
Joined: 2 Years Ago
Location: Brazil
Has thanked: 2 times
Been thanked: 1 time
Age: 27
Contact:

#56

Post by konno » 1 Year Ago

downloads but not but does not change skin

drkatkit
Member
Member
Poland
Posts: 8
Joined: 11 Months Ago
Has thanked: 2 times
Been thanked: 0
Contact:

#57

Post by drkatkit » 11 Months Ago

Image
How to fix it?
[Of course I know I can upload this file locally, but I bet that all players will have this error.]

User avatar
Mohamed Alaa
Mod Developer
Mod Developer
Egypt
Posts: 622
Joined: 2 Years Ago
Location: Egypt
Has thanked: 34 times
Been thanked: 48 times
Age: 19
Contact:

#58

Post by Mohamed Alaa » 11 Months Ago

drkatkit wrote:
11 Months Ago
Image
How to fix it?
[Of course I know I can upload this file locally, but I bet that all players will have this error.]
Try this code:

Code: Select all

#include <zombie_escape>

// Setting File
new const ZE_SETTING_RESOURCES[] = "zombie_escape.ini"

// Defines
#define MODEL_MAX_LENGTH 64
#define PLAYERMODEL_MAX_LENGTH 32
#define ACCESS_MAX_LENGTH 32
#define ADMIN_MODELS_ACCESS ADMIN_LEVEL_H

// Default Models
new const szAdminHumanModel[][] = 
{
	"vip"
}

new const szAdminZombieModel[][] = 
{
	"zombie_admin"
}

new const v_szAdminHumanKnifeModel[][] = 
{
	"models/zombie_escape/v_knife_human_admin.mdl"
}

new const v_szAdminZombieKnifeModel[][] = 
{
	"models/zombie_escape/v_knife_zombie_admin.mdl"
}

new const szHumanModel1[][] = 
{
	"human1"
}

new const szHumanModel2[][] = 
{
	"human2"
}

new const szHumanModel3[][] = 
{
	"human3"
}

new const szHumanModel4[][] = 
{
	"human4"
}

// Dynamic Arrays: Models
new Array:g_szAdminHumanModel, Array:g_szAdminZombieModel, Array:g_v_szAdminHumanKnifeModel, Array:g_v_szAdminZombieKnifeModel,
Array:g_szHumanModel1, Array:g_szHumanModel2, Array:g_szHumanModel3, Array:g_szHumanModel4

public plugin_init()
{
	register_plugin("[ZE] Special Models", ZE_VERSION, AUTHORS)
}

public plugin_precache()
{
	// Initialize Arrays
	g_szAdminHumanModel = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
	g_szAdminZombieModel = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
	g_v_szAdminHumanKnifeModel = ArrayCreate(MODEL_MAX_LENGTH, 1)
	g_v_szAdminZombieKnifeModel = ArrayCreate(MODEL_MAX_LENGTH, 1)
	g_szHumanModel1 = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
	g_szHumanModel2 = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
	g_szHumanModel3 = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
	g_szHumanModel4 = ArrayCreate(PLAYERMODEL_MAX_LENGTH, 1)
	
	// Load From External File
	amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN ADMIN", g_szAdminHumanModel)
	amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "ZOMBIE ADMIN", g_szAdminZombieModel)
	amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Weapon Models", "V_KNIFE HUMAN ADMIN", g_v_szAdminHumanKnifeModel)
	amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Weapon Models", "V_KNIFE ZOMBIE ADMIN", g_v_szAdminZombieKnifeModel)
	amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 1", g_szHumanModel1)
	amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 2", g_szHumanModel2)
	amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 3", g_szHumanModel3)
	amx_load_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 4", g_szHumanModel4)
	
	// Load our Default Values
	new iIndex
	
	if(ArraySize(g_szAdminHumanModel) == 0)
	{
		for(iIndex = 0; iIndex < sizeof szAdminHumanModel; iIndex++)
			ArrayPushString(g_szAdminHumanModel, szAdminHumanModel[iIndex])
		
		// Save to external file
		amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN ADMIN", g_szAdminHumanModel)
	}
	
	if(ArraySize(g_szAdminZombieModel) == 0)
	{
		for(iIndex = 0; iIndex < sizeof szAdminZombieModel; iIndex++)
			ArrayPushString(g_szAdminZombieModel, szAdminZombieModel[iIndex])
		
		// Save to external file
		amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "ZOMBIE ADMIN", g_szAdminZombieModel)
	}
	
	if(ArraySize(g_v_szAdminHumanKnifeModel) == 0)
	{
		for(iIndex = 0; iIndex < sizeof v_szAdminHumanKnifeModel; iIndex++)
			ArrayPushString(g_v_szAdminHumanKnifeModel, v_szAdminHumanKnifeModel[iIndex])
		
		// Save to external file
		amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Weapon Models", "V_KNIFE HUMAN ADMIN", g_v_szAdminHumanKnifeModel)
	}
	
	if(ArraySize(g_v_szAdminZombieKnifeModel) == 0)
	{
		for(iIndex = 0; iIndex < sizeof v_szAdminZombieKnifeModel; iIndex++)
			ArrayPushString(g_v_szAdminZombieKnifeModel, v_szAdminZombieKnifeModel[iIndex])
		
		// Save to external file
		amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Weapon Models", "V_KNIFE ZOMBIE ADMIN", g_v_szAdminZombieKnifeModel)
	}
	
	if(ArraySize(g_szHumanModel1) == 0)
	{
		for(iIndex = 0; iIndex < sizeof szHumanModel1; iIndex++)
			ArrayPushString(g_szHumanModel1, szHumanModel1[iIndex])
		
		// Save to external file
		amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 1", g_szHumanModel1)
	}
	
	if(ArraySize(g_szHumanModel2) == 0)
	{
		for(iIndex = 0; iIndex < sizeof szHumanModel2; iIndex++)
			ArrayPushString(g_szHumanModel2, szHumanModel2[iIndex])
		
		// Save to external file
		amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 2", g_szHumanModel2)
	}
	
	if(ArraySize(g_szHumanModel3) == 0)
	{
		for(iIndex = 0; iIndex < sizeof szHumanModel3; iIndex++)
			ArrayPushString(g_szHumanModel3, szHumanModel3[iIndex])
		
		// Save to external file
		amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 3", g_szHumanModel3)
	}
	
	if(ArraySize(g_szHumanModel4) == 0)
	{
		for(iIndex = 0; iIndex < sizeof szHumanModel4; iIndex++)
			ArrayPushString(g_szHumanModel4, szHumanModel4[iIndex])
		
		// Save to external file
		amx_save_setting_string_arr(ZE_SETTING_RESOURCES, "Player Models", "HUMAN 4", g_szHumanModel4)
	}

	// Precache
	new szPlayerModel[PLAYERMODEL_MAX_LENGTH], szModel[MODEL_MAX_LENGTH], 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)
		formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%sT.mdl", szPlayerModel, szPlayerModel)
		if (file_exists(szModelPath)) precache_model(szModelPath)
	}
	
	for (iIndex = 0; iIndex < ArraySize(g_szAdminZombieModel); iIndex++)
	{
		ArrayGetString(g_szAdminZombieModel, iIndex, szPlayerModel, charsmax(szPlayerModel))
		formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
		precache_model(szModelPath)
		formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%sT.mdl", szPlayerModel, szPlayerModel)
		if (file_exists(szModelPath)) precache_model(szModelPath)
	}
	
	for (iIndex = 0; iIndex < ArraySize(g_szHumanModel1); iIndex++)
	{
		ArrayGetString(g_szHumanModel1, iIndex, szPlayerModel, charsmax(szPlayerModel))
		formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
		precache_model(szModelPath)
		formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%sT.mdl", szPlayerModel, szPlayerModel)
		if (file_exists(szModelPath)) precache_model(szModelPath)
	}
	
	for (iIndex = 0; iIndex < ArraySize(g_szHumanModel2); iIndex++)
	{
		ArrayGetString(g_szHumanModel2, iIndex, szPlayerModel, charsmax(szPlayerModel))
		formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
		precache_model(szModelPath)
		formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%sT.mdl", szPlayerModel, szPlayerModel)
		if (file_exists(szModelPath)) precache_model(szModelPath)
	}
	
	for (iIndex = 0; iIndex < ArraySize(g_szHumanModel3); iIndex++)
	{
		ArrayGetString(g_szHumanModel3, iIndex, szPlayerModel, charsmax(szPlayerModel))
		formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
		precache_model(szModelPath)
		formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%sT.mdl", szPlayerModel, szPlayerModel)
		if (file_exists(szModelPath)) precache_model(szModelPath)
	}
	
	for (iIndex = 0; iIndex < ArraySize(g_szHumanModel4); iIndex++)
	{
		ArrayGetString(g_szHumanModel4, iIndex, szPlayerModel, charsmax(szPlayerModel))
		formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%s.mdl", szPlayerModel, szPlayerModel)
		precache_model(szModelPath)
		formatex(szModelPath, charsmax(szModelPath), "models/player/%s/%sT.mdl", szPlayerModel, szPlayerModel)
		if (file_exists(szModelPath)) precache_model(szModelPath)
	}
	
	for (iIndex = 0; iIndex < ArraySize(g_v_szAdminHumanKnifeModel); iIndex++)
	{
		ArrayGetString(g_v_szAdminHumanKnifeModel, iIndex, szModel, charsmax(szModel))
		precache_model(szModel)
	}
	
	for (iIndex = 0; iIndex < ArraySize(g_v_szAdminZombieKnifeModel); iIndex++)
	{
		ArrayGetString(g_v_szAdminZombieKnifeModel, iIndex, szModel, charsmax(szModel))
		precache_model(szModel)
	}
}

public ze_user_humanized(id)
{
	if(ze_is_user_zombie(id) || !is_user_alive(id))
		return
		
	new szPlayerModel[PLAYERMODEL_MAX_LENGTH], szModel[MODEL_MAX_LENGTH]

	// Player Admin?
	if(get_user_flags(id) & ADMIN_MODELS_ACCESS)
	{
		// Set Admin Human Model
		ArrayGetString(g_szAdminHumanModel, random_num(0, ArraySize(g_szAdminHumanModel) - 1), szPlayerModel, charsmax(szPlayerModel))
		rg_set_user_model(id, szPlayerModel)
		
		// Set Admin Human Knife Model
		ArrayGetString(g_v_szAdminHumanKnifeModel, random_num(0, ArraySize(g_v_szAdminHumanKnifeModel) - 1), szModel, charsmax(szModel))
		cs_set_player_view_model(id, CSW_KNIFE, szModel)
	}
	else
	{
		// Rest Player Model (Model Randomly)
		switch(random_num(0, 130))
		{
			case 0..30:
			{
				ArrayGetString(g_szHumanModel1, random_num(0, ArraySize(g_szHumanModel1) - 1), szPlayerModel, charsmax(szPlayerModel))
				rg_set_user_model(id, szPlayerModel)
			}
			case 31..70:
			{
				ArrayGetString(g_szHumanModel2, random_num(0, ArraySize(g_szHumanModel2) - 1), szPlayerModel, charsmax(szPlayerModel))
				rg_set_user_model(id, szPlayerModel)
			}
			case 71..100:
			{
				ArrayGetString(g_szHumanModel3, random_num(0, ArraySize(g_szHumanModel3) - 1), szPlayerModel, charsmax(szPlayerModel))
				rg_set_user_model(id, szPlayerModel)
			}
			case 101..130:
			{
				ArrayGetString(g_szHumanModel4, random_num(0, ArraySize(g_szHumanModel4) - 1), szPlayerModel, charsmax(szPlayerModel))
				rg_set_user_model(id, szPlayerModel)
			}
		}
	}
}

public ze_user_infected(iVictim, iInfector)
{
	if(!is_user_alive(iVictim))
		return
		
	// Set Zombie Models
	new szPlayerModel[PLAYERMODEL_MAX_LENGTH], szModel[MODEL_MAX_LENGTH]
	
	// Player Admin?
	if(get_user_flags(iVictim) & ADMIN_MODELS_ACCESS)
	{
		// Set Zombie Admin Model
		ArrayGetString(g_szAdminZombieModel, random_num(0, ArraySize(g_szAdminZombieModel) - 1), szPlayerModel, charsmax(szPlayerModel))
		rg_set_user_model(iVictim, szPlayerModel)
		
		// Set Admin Zombie Knife Model
		ArrayGetString(g_v_szAdminZombieKnifeModel, random_num(0, ArraySize(g_v_szAdminZombieKnifeModel) - 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
	}
}
These users thanked the author Mohamed Alaa for the post:
drkatkit (11 Months Ago)
Want your own mod edition? PM me.
Accepting web projects.
CS 1.6 hosting: powergamingtech.com

drkatkit
Member
Member
Poland
Posts: 8
Joined: 11 Months Ago
Has thanked: 2 times
Been thanked: 0
Contact:

#59

Post by drkatkit » 11 Months Ago

Okey works, thank you ;)

User avatar
Muhammet20
Veteran Member
Veteran Member
Syria
Posts: 401
Joined: 1 Year Ago
Location: Turkey
Has thanked: 36 times
Been thanked: 5 times
Age: 13
Contact:

#60

Post by Muhammet20 » 4 Months Ago

Jack GamePlay wrote:
2 Years Ago
Special Models

Description:
  • With this plugin you will be able to add Extra-Models for the mod. So now you can change these models:
    [list]ADMIN/VIP Human Model
    ADMIN/VIP Zombie Model
    ADMIN/VIP Human Knife Model
    ADMIN/VIP Zombie Knife Model
    Humans Models (4 Models Available)
[/list]
Settings:
  • You can change the ADMIN Access from the source code and compile it again. To change models you can do this from zombie_escape.ini
Installing:
  • Like any plugin just put the .amxx file into your plugins folder then go to plugins-zombie_escape and add the plugin name at the end of the file.
  • Important Notice: Make sure when you put this plugin name in plugins-zombie_escape.ini to be always under this plugin: ze_resources.amxx

Downloads:
  • Special Models.zip
  • Models.rar

a ok ok its working now
.::Kaya Gaming || Never Give Up || Zombie Escape::. [Server is Under The Work]
https://kaya-gaming.ga/

I just believe in two things, First thing is who i see in the mirror, second thing is who i don't see in the sky.

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests