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

[CSGO] Custom model bomb


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mietek98
Junior Member
Join Date: Jul 2016
Old 07-30-2016 , 01:09   [CSGO] Custom model bomb
Reply With Quote #1

How can I replace a model bomb?
mietek98 is offline
bLacK-bLooD
AlliedModders Donor
Join Date: Jun 2008
Old 07-30-2016 , 09:50   Re: [CSGO] Custom model bomb
Reply With Quote #2

Also interested.
__________________
We all live under the same sky but we have different horizons.
bLacK-bLooD is offline
CamerDisco
AlliedModders Donor
Join Date: Aug 2015
Location: Poland
Old 07-30-2016 , 12:09   Re: [CSGO] Custom model bomb
Reply With Quote #3

FPVM Interface( https://forums.alliedmods.net/showthread.php?t=276697 ) is working with weapon_c4.
CamerDisco is offline
bLacK-bLooD
AlliedModders Donor
Join Date: Jun 2008
Old 07-30-2016 , 12:18   Re: [CSGO] Custom model bomb
Reply With Quote #4

Quote:
Originally Posted by CamerDisco View Post
FPVM Interface( https://forums.alliedmods.net/showthread.php?t=276697 ) is working with weapon_c4.
But this will get our servers banned by Valve.
__________________
We all live under the same sky but we have different horizons.
bLacK-bLooD is offline
CamerDisco
AlliedModders Donor
Join Date: Aug 2015
Location: Poland
Old 07-30-2016 , 12:40   Re: [CSGO] Custom model bomb
Reply With Quote #5

Each method change models can be banned. It's always risk.

Last edited by CamerDisco; 07-30-2016 at 12:45.
CamerDisco is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 07-30-2016 , 13:01   Re: [CSGO] Custom model bomb
Reply With Quote #6

For bomb on the ground you can try this: https://forums.alliedmods.net/showthread.php?p=1821388
Mitchell is offline
mietek98
Junior Member
Join Date: Jul 2016
Old 07-31-2016 , 10:50   Re: [CSGO] Custom model bomb
Reply With Quote #7

And for this plugin I can get banned?
Code:
#include <sourcemod>
#include <sdkhooks> 
#include <sdktools>

#define MODEL "models/weapons/epal.mdl" // custom view model

new g_PVMid[MAXPLAYERS]; // Predicted ViewModel ID's
new g_iSMGModel;    // Custom ViewModel index
new g_iWorldSMGModel; //precached model index


public OnPluginStart()
{
    HookEvent("player_spawn", Event_PlayerSpawn);
}

public OnConfigsExecuted()
{
    g_iSMGModel = PrecacheModel("models/weapons/epal.mdl"); // Custom model

    g_iWorldSMGModel = PrecacheModel("models/weapons/d_rif_galilar.mdl");
}

public OnClientPostAdminCheck(client){
    SDKHook(client, SDKHook_WeaponSwitchPost, OnClientWeaponSwitchPost);    
}

public OnClientWeaponSwitchPost(client, wpnid)
{
    
    decl String:szWpn[64];
    GetEntityClassname(wpnid,szWpn,sizeof(szWpn));
    
    if(StrEqual(szWpn, "weapon_galilar")){
        SetEntProp(wpnid, Prop_Send, "m_nModelIndex", 0);
        SetEntProp(g_PVMid[client], Prop_Send, "m_nModelIndex", g_iSMGModel);
    }
}

public Event_PlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast)
{
    new client = GetClientOfUserId(GetEventInt(event, "userid"));
    g_PVMid[client] = Weapon_GetViewModelIndex(client, -1);
    
} 

// Thanks to gubka for these 2 functions below.

// Get model index and prevent server from crash
Weapon_GetViewModelIndex(client, sIndex)
{
    while ((sIndex = FindEntityByClassname2(sIndex, "predicted_viewmodel")) != -1)
    {
        new Owner = GetEntPropEnt(sIndex, Prop_Send, "m_hOwner");
        
        if (Owner != client)
            continue;
        
        return sIndex;
    }
    return -1;
}
// Get entity name
FindEntityByClassname2(sStartEnt, String:szClassname[])
{
    while (sStartEnt > -1 && !IsValidEntity(sStartEnt)) sStartEnt--;
    return FindEntityByClassname(sStartEnt, szClassname);
}  

public OnEntityCreated(entid){
    decl String:szWpn[64];
    GetEntityClassname(entid, szWpn, sizeof(szWpn));
    if(StrEqual(szWpn, "weapon_galilar")){
        SDKHook(entid, SDKHook_SpawnPost, OnEntitySpawn);
    }
}
public OnEntitySpawn(entid){ 
    
    new WMid = GetEntPropEnt(entid, Prop_Send, "m_hWeaponWorldModel")
    SetEntProp(WMid, Prop_Send, "m_nModelIndex", g_iWorldSMGModel);
}  

public OnMapStart() 
{ 
	 g_iSMGModel = PrecacheModel(MODEL); // Custom model 

	
	// model downloads

}
mietek98 is offline
CamerDisco
AlliedModders Donor
Join Date: Aug 2015
Location: Poland
Old 07-31-2016 , 10:59   Re: [CSGO] Custom model bomb
Reply With Quote #8

Theoretically no, but practically yes, It's valve.
CamerDisco is offline
ESK0
BANNED
Join Date: May 2014
Location: Czech Republic
Old 07-31-2016 , 19:48   Re: [CSGO] Custom model bomb
Reply With Quote #9

As psychonic said we can use custom model + custom texture.
ESK0 is offline
Reply



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 23:59.


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