AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   [CS GO] Script Request for custom model (https://forums.alliedmods.net/showthread.php?t=309018)

Dr.Mohammad 07-10-2018 12:42

[CS GO] Script Request for custom model
 
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

Franc1sco 07-10-2018 13:36

Re: [CS GO] Script Request for custom model
 
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)

Dr.Mohammad 07-10-2018 15:07

Re: [CS GO] Script Request for custom model
 
Quote:

Originally Posted by Franc1sco (Post 2602726)
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

Franc1sco 07-10-2018 15:12

Re: [CS GO] Script Request for custom model
 
Quote:

Originally Posted by Dr.Mohammad (Post 2602754)

Check log errors, you did something wrong in the server, because the plugins works well.

Dr.Mohammad 07-11-2018 07:50

Re: [CS GO] Script Request for custom model
 
Quote:

Originally Posted by Franc1sco (Post 2602756)
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);



mug1wara 07-11-2018 08:09

Re: [CS GO] Script Request for custom model
 
You need to precache every file that you "AddFileToDownloadsTable".

Franc1sco 07-11-2018 08:16

Re: [CS GO] Script Request for custom model
 
Quote:

Originally Posted by mug1wara (Post 2602899)
You need to precache every file that you "AddFileToDownloadsTable".

That is not true.

Quote:

Originally Posted by Dr.Mohammad (Post 2602897)
please help me

Contact with me on steam or telegram and we see it.

mug1wara 07-11-2018 09:59

Re: [CS GO] Script Request for custom model
 
In this case, yes it is true.


EDIT: Remove -1

Franc1sco 07-11-2018 10:05

Re: [CS GO] Script Request for custom model
 
Quote:

Originally Posted by mug1wara (Post 2602933)
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

mug1wara 07-11-2018 12:43

Re: [CS GO] Script Request for custom model
 
I like how you just say "Nope" xD

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


All times are GMT -4. The time now is 09:42.

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