Ned Kelly
07-19-2016, 20:23
Over the last couple of days of been trying to remake a plugin https://forums.alliedmods.net/showthread.php?t=244926
So I compiled a new plugin and it works and shows in console as loaded but the models haven't changed.
This is what I used to make plugin not sure if I need to add or change anything as my scripting is basic at best.
#include <sourcemod>
public Plugin myinfo =
{
name = "Ned's Weapons",
author = "ned_kelly",
description = "Weapon Skins",
version = "1.0",
url = ""
};
#if !defined _smartdm_include
#define _smartdm_include
#define STRING(%1) %1, sizeof(%1)
stock Downloader_ParseMDL(const String:model[], String:internal[], maxlen1, String:files[][], maxsize, maxlen2)
{
if(!FileExists2(model))
return 0;
new m_iID;
new m_iVersion;
new m_iNum = 0;
new m_iDirNum = 0;
new m_iOffset = 0;
new m_iDirOffset = 0;
new m_iNameOffset = 0;
new m_iIdx = 0;
// Bayonet Knife
new CustomModel1;
// AWP Asiimov
new CustomModel2;
// AK47 Vulcan
new CustomModel3;
public OnMapStart()
{
CustomModel1 = PrecacheModel("models/weapons/bayonet/v_knife_t.mdl");
File_AddToDownloadsTable("materials/models/weapons/knife_bayonet");
File_AddToDownloadsTable("models/weapons/bayonet");
CustomModel2 = PrecacheModel("models/weapons/awp_csgo/v_snip_awp.mdl");
File_AddToDownloadsTable("materials/models/weapons/awp_csgo");
File_AddToDownloadsTable("materials/models/weapons/awp_csgo");
File_AddToDownloadsTable("models/weapons/amp_csgo");
CustomModel3 = PrecacheModel("models/weapons/vulcan/v_rif_ak47.mdl");
File_AddToDownloadsTable("materials/models/weapons/vulcan/rif_ak47");
File_AddToDownloadsTable("materials/models/weapons/vulcan/arms");
File_AddToDownloadsTable("models/weapons/vulcan");
}
public OnEntityCreated(entity, const String:classname[])
{
// Bayonet Knife
if(StrEqual(classname, "weapon_knife"))
{
Please any help would be great.
I posted this in the wrong section at the start and told to repost here.
Cheers
Ned Kelly.
So I compiled a new plugin and it works and shows in console as loaded but the models haven't changed.
This is what I used to make plugin not sure if I need to add or change anything as my scripting is basic at best.
#include <sourcemod>
public Plugin myinfo =
{
name = "Ned's Weapons",
author = "ned_kelly",
description = "Weapon Skins",
version = "1.0",
url = ""
};
#if !defined _smartdm_include
#define _smartdm_include
#define STRING(%1) %1, sizeof(%1)
stock Downloader_ParseMDL(const String:model[], String:internal[], maxlen1, String:files[][], maxsize, maxlen2)
{
if(!FileExists2(model))
return 0;
new m_iID;
new m_iVersion;
new m_iNum = 0;
new m_iDirNum = 0;
new m_iOffset = 0;
new m_iDirOffset = 0;
new m_iNameOffset = 0;
new m_iIdx = 0;
// Bayonet Knife
new CustomModel1;
// AWP Asiimov
new CustomModel2;
// AK47 Vulcan
new CustomModel3;
public OnMapStart()
{
CustomModel1 = PrecacheModel("models/weapons/bayonet/v_knife_t.mdl");
File_AddToDownloadsTable("materials/models/weapons/knife_bayonet");
File_AddToDownloadsTable("models/weapons/bayonet");
CustomModel2 = PrecacheModel("models/weapons/awp_csgo/v_snip_awp.mdl");
File_AddToDownloadsTable("materials/models/weapons/awp_csgo");
File_AddToDownloadsTable("materials/models/weapons/awp_csgo");
File_AddToDownloadsTable("models/weapons/amp_csgo");
CustomModel3 = PrecacheModel("models/weapons/vulcan/v_rif_ak47.mdl");
File_AddToDownloadsTable("materials/models/weapons/vulcan/rif_ak47");
File_AddToDownloadsTable("materials/models/weapons/vulcan/arms");
File_AddToDownloadsTable("models/weapons/vulcan");
}
public OnEntityCreated(entity, const String:classname[])
{
// Bayonet Knife
if(StrEqual(classname, "weapon_knife"))
{
Please any help would be great.
I posted this in the wrong section at the start and told to repost here.
Cheers
Ned Kelly.