Quote:
Originally Posted by Franc1sco
Check log errors, you did something wrong in the server, because the plugins works well.
|
please help me :
PHP Code:
#include <sourcemod>
#include <sdktools>
#include <cstrike>
#include <fpvm_interface>
#define VIWEMODEL "models/weaponf/v_animeawp.mdl"
#define WORLDMODEL "models/weaponf/w_animeawp.mdl"
public void OnPluginStart()
{
HookEvent("player_spawn", Event_PlayerSpawn, EventHookMode_Pre);
}
public void OnMapStart()
{
AddFileToDownloadsTable("materials/models/weaponf/v_models/animeawp/awp.vmt");
AddFileToDownloadsTable("materials/models/weaponf/v_models/animeawp/awp.vtf");
AddFileToDownloadsTable("materials/models/weaponf/v_models/animeawp/awp_exponent.vtf");
AddFileToDownloadsTable("materials/models/weaponf/w_models/w_animeawp/awp.vmt");
AddFileToDownloadsTable("materials/models/weaponf/w_models/w_animeawp/awp.vtf");
AddFileToDownloadsTable("materials/models/weaponf/w_models/w_animeawp/awp_exponent.vtf");
AddFileToDownloadsTable("models/weaponf/v_animeawp.dx90.vtx");
AddFileToDownloadsTable("models/weaponf/v_animeawp.mdl");
AddFileToDownloadsTable("models/weaponf/v_animeawp.vvd");
AddFileToDownloadsTable("models/weaponf/w_animeawp.dx90.vtx");
AddFileToDownloadsTable("models/weaponf/w_animeawp.mdl");
AddFileToDownloadsTable("models/weaponf/w_animeawp.vvd");
PrecacheModel(WORLDMODEL);
PrecacheModel(VIWEMODEL);
}
public Action Event_PlayerSpawn(Event event, const char[] name, bool dontBroadcast)
{
int client = GetClientOfUserId(event.GetInt("userid"));
FPVMI_SetClientModel(client, "weapon_awp", VIWEMODEL, WORLDMODEL, -1);
}