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

Restore model after hiding it


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Randomize
BANNED
Join Date: May 2012
Location: in your heart
Old 07-08-2013 , 05:12   Restore model after hiding it
Reply With Quote #1

1. I was trying to hide model when first zoom and it succeed, but how to restore it? Also how to user set_pev?
2. There's a problem when first zoom. I hide the model for first zoom but when I was shooting, it didn't play the sound.

PHP Code:
    g_iViewModel[id] = pev(idpev_viewmodel)
    if (
pev(id,pev_button) & IN_ATTACK2 && (get_user_weapon(id) == CSW_AWP || get_user_weapon(id) == CSW_SCOUT || get_user_weapon(id) == CSW_SG550 || get_user_weapon(id) == CSW_G3SG1) && cs_get_user_zoom(id) == CS_SET_FIRST_ZOOM)
    {
        
set_user_maxspeed(id210.0)
        
set_pev(idpev_viewmodel0)
    }
    if (
pev(id,pev_button) & IN_ATTACK2 && (get_user_weapon(id) == CSW_AWP || get_user_weapon(id) == CSW_SG550 || get_user_weapon(id) == CSW_G3SG1) && cs_get_user_zoom(id) == CS_SET_SECOND_ZOOM)
    {
        
cs_set_user_zoom(idCS_SET_NO_ZOOM1)
        
set_user_maxspeed(id210.0)
        
set_pev(idpev_viewmodelg_iViewModel[id])
    }
    else if (
pev(id,pev_button) & IN_ATTACK2 && get_user_weapon(id) == CSW_SCOUT && cs_get_user_zoom(id) == CS_SET_SECOND_ZOOM)
    {
        
cs_set_user_zoom(idCS_SET_NO_ZOOM1)
        
set_user_maxspeed(id260.0)
        
set_pev(idpev_viewmodelg_iViewModel[id])
    } 
Randomize is offline
baneado
Veteran Member
Join Date: Dec 2012
Location: amxmodx-es.com
Old 07-08-2013 , 14:02   Re: Restore model after hiding it
Reply With Quote #2

use fm_cs_get_current_weapon_ent

then make the entity invisible and visible, I think will work.
baneado 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 18:35.


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