#include <sdktools>
public OnPluginStart()
{
HookEvent("player_spawn", OnPlayerSpawn);
}
public OnMapStart()
{
AddFileToDownloadsTable("materials/models/player/custom_player/new_year/phoenix_body.vmt");
AddFileToDownloadsTable("materials/models/player/custom_player/new_year/phoenix_body.vtf");
AddFileToDownloadsTable("materials/models/player/custom_player/new_year/phoenix_hat.vmt");
AddFileToDownloadsTable("materials/models/player/custom_player/new_year/phoenix_hat.vtf");
AddFileToDownloadsTable("materials/models/player/custom_player/new_year/_hat_exp.vtf");
AddFileToDownloadsTable("materials/models/player/custom_player/new_year/_hat_n.vtf");
AddFileToDownloadsTable("materials/models/player/custom_player/new_year/phoenix_head.vmt");
AddFileToDownloadsTable("materials/models/player/custom_player/new_year/phoenix_head.vtf");
AddFileToDownloadsTable("materials/models/player/custom_player/new_year/phoenix_legs.vmt");
AddFileToDownloadsTable("materials/models/player/custom_player/new_year/phoenix_legs.vtf");
AddFileToDownloadsTable("materials/models/player/custom_player/new_year/phoenix_gloves.vmt");
AddFileToDownloadsTable("materials/models/player/custom_player/new_year/phoenix_gloves.vtf");
AddFileToDownloadsTable("models/player/custom_player/legacy/tm_phoenix_newyear.mdl");
AddFileToDownloadsTable("models/player/custom_player/legacy/tm_phoenix_newyear.phy");
AddFileToDownloadsTable("models/player/custom_player/legacy/tm_phoenix_newyear.vvd");
AddFileToDownloadsTable("models/player/custom_player/legacy/tm_phoenix_newyear.dx90.vtx");
PrecacheModel("models/player/custom_player/legacy/tm_phoenix_newyear.mdl");
AddFileToDownloadsTable("materials/models/player/custom_player/new_year/fbi_body.vmt");
AddFileToDownloadsTable("materials/models/player/custom_player/new_year/fbi_body.vtf");
AddFileToDownloadsTable("materials/models/player/custom_player/new_year/fbi_hat.vmt");
AddFileToDownloadsTable("materials/models/player/custom_player/new_year/fbi_hat.vtf");
AddFileToDownloadsTable("materials/models/player/custom_player/new_year/_hat_exp.vtf");
AddFileToDownloadsTable("materials/models/player/custom_player/new_year/_hat_n.vtf");
AddFileToDownloadsTable("materials/models/player/custom_player/new_year/fbi_head.vmt");
AddFileToDownloadsTable("materials/models/player/custom_player/new_year/fbi_head.vtf");
AddFileToDownloadsTable("materials/models/player/custom_player/new_year/fbi_legs.vmt");
AddFileToDownloadsTable("materials/models/player/custom_player/new_year/fbi_legs.vtf");
AddFileToDownloadsTable("materials/models/player/custom_player/new_year/fbi_gloves.vmt");
AddFileToDownloadsTable("materials/models/player/custom_player/new_year/fbi_gloves.vtf");
AddFileToDownloadsTable("models/player/custom_player/legacy/ctm_fbi_newyear.mdl");
AddFileToDownloadsTable("models/player/custom_player/legacy/ctm_fbi_newyear.phy");
AddFileToDownloadsTable("models/player/custom_player/legacy/ctm_fbi_newyear.vvd");
AddFileToDownloadsTable("models/player/custom_player/legacy/ctm_fbi_newyear.dx90.vtx");
PrecacheModel("models/player/custom_player/legacy/ctm_fbi_newyear.mdl");
PrecacheModel("models/weapons/ct_arms_gign.mdl");
}
public OnPlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast)
{
new client = GetClientOfUserId(GetEventInt(event, "userid"));
if( client > 0 && IsClientInGame(client) && IsPlayerAlive(client) ) {
if ( GetClientTeam(client) == 2 ) {
SetEntityModel(client, "models/player/custom_player/legacy/tm_phoenix_newyear.mdl");
SetEntPropString(client, Prop_Send, "m_szArmsModel", ""); // если удалить данную строку, то CT-руки будут поверх Т-рук!
}
if ( GetClientTeam(client) == 3 ) {
SetEntityModel(client, "models/player/custom_player/legacy/ctm_fbi_newyear.mdl");
SetEntPropString(client, Prop_Send, "m_szArmsModel", "models/weapons/ct_arms_gign.mdl");
}
}
}
Вот тебе плагин, пропиши пути скинов свои!