Raised This Month: $12 Target: $400
 3% 

[CS GO] Script Request for custom model


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dr.Mohammad
Senior Member
Join Date: Jan 2016
Location: CSGO Servers
Old 07-10-2018 , 12:42   [CS GO] Script Request for custom model
Reply With Quote #1

Hi guys!

I want to change the default knife / weapon / gloves model to the custom model.
Example Custom Model:
https://gamebanana.com/skins/161856
https://gamebanana.com/skins/161564
https://gamebanana.com/skins/159504

I read the valve rules and I do not want to ban GSLT.
Please give me any ideas or help
Thank you

Last edited by Dr.Mohammad; 07-10-2018 at 12:43.
Dr.Mohammad is offline
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Old 07-10-2018 , 13:36   Re: [CS GO] Script Request for custom model
Reply With Quote #2

Use my plugins:

Custom gloves -> https://forums.alliedmods.net/showthread.php?p=2468866 (no banned)
Custom weapons/knives - > https://forums.alliedmods.net/showthread.php?t=276779 (read the first post)
__________________
Veteran Coder -> Activity channel
Coding on CS2 and taking paid and free jobs.

Contact: Steam, Telegram or discord ( franug ).

You like my work? +Rep in my steam profile comments or donate.


Last edited by Franc1sco; 07-10-2018 at 14:08.
Franc1sco is offline
Send a message via MSN to Franc1sco
Dr.Mohammad
Senior Member
Join Date: Jan 2016
Location: CSGO Servers
Old 07-10-2018 , 15:07   Re: [CS GO] Script Request for custom model
Reply With Quote #3

Quote:
Originally Posted by Franc1sco View Post
Use my plugins:

Custom gloves -> https://forums.alliedmods.net/showthread.php?p=2468866 (no banned)
Custom weapons/knives - > https://forums.alliedmods.net/showthread.php?t=276779 (read the first post)
dont work for me:
i have casual server
https://forums.alliedmods.net/showthread.php?p=2468866


are you sure?
https://forums.alliedmods.net/showthread.php?t=276779

Last edited by Dr.Mohammad; 07-10-2018 at 15:08.
Dr.Mohammad is offline
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Old 07-10-2018 , 15:12   Re: [CS GO] Script Request for custom model
Reply With Quote #4

Quote:
Originally Posted by Dr.Mohammad View Post
Check log errors, you did something wrong in the server, because the plugins works well.
__________________
Veteran Coder -> Activity channel
Coding on CS2 and taking paid and free jobs.

Contact: Steam, Telegram or discord ( franug ).

You like my work? +Rep in my steam profile comments or donate.

Franc1sco is offline
Send a message via MSN to Franc1sco
Dr.Mohammad
Senior Member
Join Date: Jan 2016
Location: CSGO Servers
Old 07-11-2018 , 07:50   Re: [CS GO] Script Request for custom model
Reply With Quote #5

Quote:
Originally Posted by Franc1sco View Post
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_PlayerSpawnEventHookMode_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[] namebool dontBroadcast)
{
    
int client GetClientOfUserId(event.GetInt("userid"));
    
    
FPVMI_SetClientModel(client"weapon_awp"VIWEMODELWORLDMODEL, -1);

Dr.Mohammad is offline
mug1wara
AlliedModders Donor
Join Date: Jun 2018
Old 07-11-2018 , 08:09   Re: [CS GO] Script Request for custom model
Reply With Quote #6

You need to precache every file that you "AddFileToDownloadsTable".
mug1wara is offline
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Old 07-11-2018 , 08:16   Re: [CS GO] Script Request for custom model
Reply With Quote #7

Quote:
Originally Posted by mug1wara View Post
You need to precache every file that you "AddFileToDownloadsTable".
That is not true.

Quote:
Originally Posted by Dr.Mohammad View Post
please help me
Contact with me on steam or telegram and we see it.
__________________
Veteran Coder -> Activity channel
Coding on CS2 and taking paid and free jobs.

Contact: Steam, Telegram or discord ( franug ).

You like my work? +Rep in my steam profile comments or donate.


Last edited by Franc1sco; 07-11-2018 at 08:18.
Franc1sco is offline
Send a message via MSN to Franc1sco
mug1wara
AlliedModders Donor
Join Date: Jun 2018
Old 07-11-2018 , 09:59   Re: [CS GO] Script Request for custom model
Reply With Quote #8

In this case, yes it is true.


EDIT: Remove -1

Last edited by mug1wara; 07-11-2018 at 10:03.
mug1wara is offline
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Old 07-11-2018 , 10:05   Re: [CS GO] Script Request for custom model
Reply With Quote #9

Quote:
Originally Posted by mug1wara View Post
In this case, yes it is true.
Nope.

You can check in these plugins that you just need to precache the .mdl file in a model:
https://github.com/Franc1sco/Custom-...mKnives.sp#L95
https://github.com/Franc1sco/Franug-...ug_cwm.sp#L280
__________________
Veteran Coder -> Activity channel
Coding on CS2 and taking paid and free jobs.

Contact: Steam, Telegram or discord ( franug ).

You like my work? +Rep in my steam profile comments or donate.

Franc1sco is offline
Send a message via MSN to Franc1sco
mug1wara
AlliedModders Donor
Join Date: Jun 2018
Old 07-11-2018 , 12:43   Re: [CS GO] Script Request for custom model
Reply With Quote #10

I like how you just say "Nope" xD

And yes you're right, it also says in the name wtf? "Precache-MODEL" XDDDD
mug1wara is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:32.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode