Raised This Month: $32 Target: $400
 8% 

Solved BEST way to reset player model ? ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SHIELD755
Veteran Member
Join Date: Feb 2018
Location: FROM MARVEL STUDIO
Old 03-05-2019 , 05:33   BEST way to reset player model ? ?
Reply With Quote #1

hii , can anybody suggest me best way to reset player model if the player model set to coustom like

i am using a HERO plugin and after some time a randomly person choosen as hero and its model change to hero model with this command
PHP Code:
public hero(id)
{
g_HeroActive 1
cs_set_user_model
(idModel_Hero)

but the promblem is that how can i reset player default model after the death of hero or end of HERO event (g_heroactive = 0) , i tried by using
PHP Code:
public ondeath(id)
{
g_heroactive 0
cs_reset_user_model
(id)

but failed so can anybody help me

Last edited by SHIELD755; 03-05-2019 at 06:54.
SHIELD755 is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 03-05-2019 , 05:39   Re: BEST way to reset player model ? ?
Reply With Quote #2

will it depends if the default model is a custom model or regural class model.

you can use cstrike module native >> cs_reset_user_model(index);

make sure also ondeath is called.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 03-05-2019 at 05:46.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 03-05-2019 , 05:59   Re: BEST way to reset player model ? ?
Reply With Quote #3

you can also try reset model after player respawn instead of dead

PHP Code:
public ondeath(id

    if(
g_HeroActive)
        
g_HeroActive 
}

public 
fw_Player_Spawn_Post(id)
{
    
cs_reset_user_model(id

__________________
My plugin:

Last edited by Celena Luna; 03-05-2019 at 06:01.
Celena Luna is offline
SHIELD755
Veteran Member
Join Date: Feb 2018
Location: FROM MARVEL STUDIO
Old 03-05-2019 , 06:55   Re: BEST way to reset player model ? ?
Reply With Quote #4

Quote:
Originally Posted by Celena Luna View Post
you can also try reset model after player respawn instead of dead

PHP Code:
public ondeath(id

    if(
g_HeroActive)
        
g_HeroActive 
}

public 
fw_Player_Spawn_Post(id)
{
    
cs_reset_user_model(id

THANKS , first time your code does not work but when i add "cs_reset_user_model(iVictim)" index with victim which is HERO than it works
SHIELD755 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 01:35.


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