AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to set weapon skin? (https://forums.alliedmods.net/showthread.php?t=184281)

Leech_v2 05-03-2012 07:59

How to set weapon skin?
 
How to set skin for view model?
use pev_skin
v_knife.mdl

【set_pev(v_index, pev_skin, 1)】

Bilal Pro 05-03-2012 08:42

Re: How to set weapon skin?
 
quick example:

PHP Code:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <fakemeta>

#define PLUGIN "Knifes skin"
#define VERSION "1.0"
#define AUTHOR "Bilal"

new knife[] = "models/v_knife.mdl"// put ur models name here.
new knife2[] = "models/p_knife.mdl"// put ur models name here.

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("say /test""test")
}

public 
plugin_precache()
{
    
precache_model(knife)
    
precache_model(knife2)
}

public 
test(id)
{
    
set_pev(idpev_viewmodel2knife)
    
set_pev(idpev_weaponmodel2knife2)
    
client_print(idprint_chat"You succesfully switched ur knife")



Leech_v2 05-03-2012 08:54

Re: How to set weapon skin?
 
Quote:

Originally Posted by Bilal Pro (Post 1701069)
quick example:

PHP Code:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <fakemeta>

#define PLUGIN "Knifes skin"
#define VERSION "1.0"
#define AUTHOR "Bilal"

new knife[] = "models/v_knife.mdl"// put ur models name here.
new knife2[] = "models/p_knife.mdl"// put ur models name here.

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("say /test""test")
}

public 
plugin_precache()
{
    
precache_model(knife)
    
precache_model(knife2)
}

public 
test(id)
{
    
set_pev(idpev_viewmodel2knife)
    
set_pev(idpev_weaponmodel2knife2)
    
client_print(idprint_chat"You succesfully switched ur knife")



how to use set_pev(???, pev_skin, 1/0)

.Dare Devil. 05-03-2012 08:55

Re: How to set weapon skin?
 
Quote:

Originally Posted by Bilal Pro (Post 1701069)
quick example:

PHP Code:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <fakemeta>

#define PLUGIN "Knifes skin"
#define VERSION "1.0"
#define AUTHOR "Bilal"

new knife[] = "models/v_knife.mdl"// put ur models name here.
new knife2[] = "models/p_knife.mdl"// put ur models name here.

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("say /test""test")
}

public 
plugin_precache()
{
    
precache_model(knife)
    
precache_model(knife2)
}

public 
test(id)
{
    
set_pev(idpev_viewmodel2knife)
    
set_pev(idpev_weaponmodel2knife2)
    
client_print(idprint_chat"You succesfully switched ur knife")



he means the skin not a model.
there are inside of the model skins and submodels/bodyparts.

Well, actually i would like to know too.

Bilal Pro 05-03-2012 08:57

Re: How to set weapon skin?
 
PHP Code:

set_pev(indexvalueanny

And also Dare devil Im sorry if he didnt ment this but now he also knows how to change weapon skins

Leech_v2 05-03-2012 17:47

Re: How to set weapon skin?
 
Quote:

Originally Posted by Bilal Pro (Post 1701083)
PHP Code:

set_pev(indexvalueanny

And also Dare devil Im sorry if he didnt ment this but now he also knows how to change weapon skins

how to get index form view model?

Bilal Pro 05-03-2012 18:43

Re: How to set weapon skin?
 
What do you mean?, index is a.k.a id / iplayer

.Dare Devil. 05-04-2012 00:04

Re: How to set weapon skin?
 
Quote:

Originally Posted by Bilal Pro (Post 1701487)
What do you mean?, index is a.k.a id / iplayer

you see the example the v_ak47.mdl is actually entity with model and ofcourse with id.


in game there are id 1-32 = player 33-3072(even mayby a more) = entities and ohter stuff.
but this view model entity id is in client side game, so it is very hard to get it.
I am sure there are trick to get this id.

claudiuhks 05-04-2012 01:20

Re: How to set weapon skin?
 
Quote:

Originally Posted by .Dare Devil. (Post 1701716)
33-3072(even mayby a more) = entities and ohter stuff.

In Half-Life 1 games, entities count could be maximum 600.

pm_defs.h
PHP Code:

#define    MAX_PHYSENTS 600           // Must have room for all entities in the world.
#define MAX_MOVEENTS 64 



All times are GMT -4. The time now is 00:25.

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