PDA

View Full Version : Custom Weapon Skins CSS


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.

Ned Kelly
07-21-2016, 01:48
Id be happy to maybe pay some to do a new plugin depending on cost. Just want to give my admins and donators something to say thanks for.

friagram
07-21-2016, 04:51
i dont think csgo allows that stuff anymore.

Ned Kelly
07-21-2016, 06:32
i dont think csgo allows that stuff anymore.

Its not for csgo its for css.

Ned Kelly
07-22-2016, 23:56
Anyone?

Arkarr
07-23-2016, 05:20
Anyone?
Please, wrap your code with [PHP], it's unreadable in this state. Also, you miss like 50% of the code. Can you provide the whole code ?

Ned Kelly
07-23-2016, 10:02
Please, wrap your code with [PHP], it's unreadable in this state. Also, you miss like 50% of the code. Can you provide the whole code ?

No I don't have a code for it in php I was just trying to rewrite the script of a old plugin in the link of the first post. Sorry for being brief but not that good.

Arkarr
07-23-2016, 10:17
No I don't have a code for it in php I was just trying to rewrite the script of a old plugin in the link of the first post. Sorry for being brief but not that good.
Herm.. Sorry for not begin clear enough, the code in the OP, it should be in the balise [PHP].
http://puu.sh/qbENg/90986ae426.png http://i.picresize.com/images/2016/07/23/Y7Aug.png http://puu.sh/qbEOX/2220c700fd.png
Also, you want to provide all the code if you want help, or at least, the part wich need fix.

Ned Kelly
07-23-2016, 20:33
Herm.. Sorry for not begin clear enough, the code in the OP, it should be in the balise [PHP].
http://puu.sh/qbENg/90986ae426.png http://i.picresize.com/images/2016/07/23/Y7Aug.png http://puu.sh/qbEOX/2220c700fd.png
Also, you want to provide all the code if you want help, or at least, the part wich need fix.

This is the original script of the plugin. Hence why I tried to change it as a lot of errors came up.

#pragma semicolon 1
#include <sourcemod>
#include <franug_cwi>
#include <smlib>
public Plugin:myinfo =
{
name = "SM Knuckles",
author = "Franc1sco franug",
description = "",
version = "1.0",
url = "http://www.cola-team.es"
};
new CustomModel1;
public OnMapStart()
{
// set custom model
CustomModel1 = PrecacheModel("models/weapons/franug_cwi/knuckles/v_knuckles.mdl");

// download files
File_AddToDownloadsTable("models/weapons/franug_cwi/knuckles");
File_AddToDownloadsTable("materials/models/weapons/v_models/brass_knuckles");

}
public OnEntityCreated(entity, const String:classname[])
{
// apply only to knife entity
if(StrEqual(classname, "weapon_knife"))
{
CWI_SetWeapon(entity, CustomModel1);
}
}