Page 1 of 1

[Modificare plugin] Player Model

Posted: 31 Jul 2019, 04:10
by Ykaru
Salut, am gasit acest plugin care dupa cum zice ar trebui sa modifice modelele playerilor si adminilor, dar dupa ce-l compilez si adaug pe server primesc eroarea :
Host_Error: PF_precache_model_I: Bad string 'models/player/F_Model_T/F_T.mdl'
FATAL ERROR (shutting down): Host_Error: PF_precache_model_I: Bad string 'models/player/F_Model_T/F_T.mdl'

Daca poate cineva sa-l rezolve sau daca stiti voi un plugin pentru modificare skinuri, dar sa fie pe permisii ca sa pot da adminilor un model si playerilor alt model.
| Afiseaza codul
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <cstrike>
#include <hamsandwich>
#include <fakemeta>

new const PLUGIN[] = "New Plug-In";
new const VERSION[] = "1.0";

new const g_szPlayerModels[][] =
{
	"models/player/F_Model_T/F_T.mdl",
	"models/player/F_Model_Ct/F_Ct.mdl",
	"models/player/A_Model_T/A_T.mdl",
	"models/player/A_Model_Ct/A_Ct.mdl",
	"models/player/P_Model_Ct/P_Ct.mdl"
}

public plugin_precache()
{
	for (new i = 0; i < sizeof g_szPlayerModels; i++)
		engfunc(EngFunc_PrecacheModel, g_szPlayerModels);
}

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, "Adventx")
	
	RegisterHam(Ham_Spawn, "player", "fw_PlayerSpawn_Post", 1);
	
	// Add your code here...
}

public fw_PlayerSpawn_Post(id)
{
	if (!is_user_alive(id))
		return HAM_IGNORED;
	
	if (get_user_flags(id) && ADMIN_IMMUNITY)
	{
		switch (cs_get_user_team(id))
		{
			case CS_TEAM_T:cs_set_user_model(id, g_szPlayerModels[0]);
			case CS_TEAM_CT:cs_set_user_model(id, g_szPlayerModels[1]);
		}
	}
	
	if (get_user_flags(id) && ADMIN_RESERVATION)
	{
		switch (cs_get_user_team(id))
		{
			case CS_TEAM_T:cs_set_user_model(id, g_szPlayerModels[2]);
			case CS_TEAM_CT:cs_set_user_model(id, g_szPlayerModels[3]);
		}
	}
	
	else
	{
		switch (cs_get_user_team(id))
		{
			case CS_TEAM_CT:cs_set_user_model(id, g_szPlayerModels[4]);
		}
	}
	
	return HAM_IGNORED;
}

/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/

Re: [Modificare plugin] Player Model

Posted: 31 Jul 2019, 18:46
by A k c 3 n 7
Esti sigur ca ai pus models/player/F_Model_T/F_T.mdl in folder si cu numele care trebuie?

Re: [Modificare plugin] Player Model

Posted: 01 Aug 2019, 02:28
by Ykaru
Da, oricum am rezolvat.
Multumesc oricum.
Cer T/C