[Modificare plugin] Player Model

Modificari necesare ale pluginurilor

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
Ykaru
Membru, skill 0
Membru, skill 0
Posts: 98
Joined: 29 Jul 2019, 01:33
Detinator Steam: Da
CS Status: Ha ?
Detinator server CS: BB.LALEAGANE.RO
Fond eXtream: 0
Has thanked: 15 times

31 Jul 2019, 04:10

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 }
*/
RoyalServer
User avatar
A k c 3 n 7
Super moderator
Super moderator
Posts: 5138
Joined: 25 Aug 2014, 21:31
Detinator Steam: Da
CS Status: who dares wins
SteamID: Jandarmeria
Reputatie: Super moderator
Moderatorul anului 2023
Fost Membru Club eXtreamCS ( o luna )
Fost eXtream Mod
Fost Intermediar
Nume anterior: Sorinel
Fond eXtream: 0
Location: Unknown
Discord: remusakcent
Has thanked: 4 times
Been thanked: 46 times

31 Jul 2019, 18:46

Esti sigur ca ai pus models/player/F_Model_T/F_T.mdl in folder si cu numele care trebuie?
Ykaru
Membru, skill 0
Membru, skill 0
Posts: 98
Joined: 29 Jul 2019, 01:33
Detinator Steam: Da
CS Status: Ha ?
Detinator server CS: BB.LALEAGANE.RO
Fond eXtream: 0
Has thanked: 15 times

01 Aug 2019, 02:28

Da, oricum am rezolvat.
Multumesc oricum.
Cer T/C
Post Reply

Return to “Modificari pluginuri”

  • Information