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

pev_skin not working with v_model


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DjSoftero
Veteran Member
Join Date: Nov 2014
Location: Lithuania
Old 02-02-2020 , 20:13   pev_skin not working with v_model
Reply With Quote #1

am I doing something wrong, or does pev_skin not even work with view models?
this is the test plugin I was using:
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fakemeta>

new const model[] = "models/custom_v_m4a1.mdl"//models directory and name.

new user_skin[MAX_PLAYERS+1]

new const 
skin_names[][] = {
    
"skin 1",
    
"skin 2",
    
"skin 3",
    
"skin 4",
    
"skin 5",
    
"skin 6"
}

public 
plugin_init() {
    
register_event"CurWeapon","Event_CurWeapon","be""1=1" )
    
register_clcmd("say /skin""skin_menu")
}
public 
plugin_precache() {
    
precache_model(model)
}
public 
skin_menu(id) {
    new 
menu_name[] = "choose skin:"
    
new mid menu_create(menu_name"skin_menu_handler")

    for(new 
ii<sizeof(skin_names); i++) {
        
menu_additem(midskin_names[i], "")
    }

    
menu_setprop(midMPROP_EXITMEXIT_ALL)
    
menu_display(idmid)
}
public 
skin_menu_handler(idmiditem) {
    if(
item == MENU_EXIT) {
        
menu_destroy(mid)
        return 
PLUGIN_HANDLED
    
}
    
    
user_skin[id] = item
    
if(is_user_alive(id)) {
        new 
wpn cs_get_user_weapon_entity(id)
        
set_pev(wpnpev_skinitem)
    }
    
menu_destroy(mid)
    
Event_CurWeapon(id)
    
skin_menu(id)
    return 
PLUGIN_HANDLED
}
public 
Event_CurWeapon(id) {
    if(
is_user_alive(id) && get_user_weapon(id) == CSW_M4A1) {
        
        
set_pev(idpev_viewmodel2model)
        
client_print(idprint_chat"%i"user_skin[id])
        new 
wpn cs_get_user_weapon_entity(id)
        
set_pev(wpnpev_skinuser_skin[id])
    }

model itself: model
__________________
retired chump
DjSoftero is offline
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 02-03-2020 , 13:08   Re: pev_skin not working with v_model
Reply With Quote #2

it doesn't. you can only change sub-model but that's complicated too.
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 02-03-2020 , 16:59   Re: pev_skin not working with v_model
Reply With Quote #3

why don't u use pev_viewmodel2?
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 02-04-2020 , 02:10   Re: pev_skin not working with v_model
Reply With Quote #4

Quote:
Originally Posted by Napoleon_be View Post
why don't u use pev_viewmodel2?
Likely because there is a precache limit and it's quite easy to hit.
__________________
HamletEagle is offline
liubili
Junior Member
Join Date: Apr 2018
Old 02-04-2020 , 18:45   Re: pev_skin not working with v_model
Reply With Quote #5

it can sub-model be done, but it's takes A LOT of work.
4 months work - https://www.youtube.com/watch?v=WVnjP2YTczQ

Last edited by liubili; 02-04-2020 at 18:47.
liubili is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 02-05-2020 , 02:32   Re: pev_skin not working with v_model
Reply With Quote #6

Quote:
Originally Posted by liubili View Post
it can sub-model be done, but it's takes A LOT of work.
4 months work - https://www.youtube.com/watch?v=WVnjP2YTczQ
Let's be honest. Knives submodels are tremendously easier that doing submodels for the other weapons(because client only predicts in deploy - which can be seen in your video too, that little snap). I did it before in a few hours.
Submodels for guns are more complicated but it's still not nearly 4 months of work.
__________________

Last edited by HamletEagle; 02-05-2020 at 02:34.
HamletEagle is offline
liubili
Junior Member
Join Date: Apr 2018
Old 02-05-2020 , 08:51   Re: pev_skin not working with v_model
Reply With Quote #7

Quote:
Originally Posted by HamletEagle View Post
Let's be honest. Knives submodels are tremendously easier that doing submodels for the other weapons(because client only predicts in deploy - which can be seen in your video too, that little snap). I did it before in a few hours.
Submodels for guns are more complicated but it's still not nearly 4 months of work.
Yes, Knives/AWP/Scout/Grenades and C4 submodels are tremendously easier. I'm use submodels nearly 5 months (my video old, it's better now). I had in mind not only Knives 4 months of work. I have no complaints from the players. it can sub-model be done for the other weapons, but it's takes a lot of work. I'm testing other weapons submodels over time. sorry for my engish.

Last edited by liubili; 02-05-2020 at 09:47.
liubili 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 04:11.


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