Raised This Month: $ Target: $400
 0% 

change v_ model for a few seconds


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Nutu_
AlliedModders Donor
Join Date: Mar 2016
Location: Germany
Old 04-27-2024 , 14:51   change v_ model for a few seconds
Reply With Quote #1

hi guys, lets say i would like to change a view model while buying smth from a shop menu, ex.
PHP Code:
case :
        {
            if (!
is_user_alive(id)) {
                
CromChat(id"!g[%s]!n You can't buy that item because you are dead."PREFIX);
                
client_cmd(id"spk ^"%s^""SoundMenu );
            }
            else
            {
                if ( 
points 10 ) {
                    
client_cmd id"spk ^"%s^""SoundMenu );
                    
CromChat (id"!g[%s]!n You dont have enough to buy !g100HP+100AP!n, you need !g10 points"PREFIX);
                    return 
PLUGIN_HANDLED;
                }
                new 
health get_user_health(id);
                if( 
health 300 ) {
                    
set_user_health (idget_user_health (id) + 100);
                    
set_user_armor(idget_user_armor(id) + 100);
                    
gKillerPointsid ] -= 10;
                    
client_cmd id"spk ^"%s^""MenuSound );
                    
set_hudmessage(255255255, -1.00.4501.05.00.10.21)
                    
show_hudmessage(id"You have purchased 100HP+100AP.");
                    
CromChat (0"!g[%s]!n Player!t %s !nhas purchased !g100HP+100AP !n[!g 10 points!n ]"PREFIXname);
                }
                else {
                    
client_cmd id"spk ^"%s^""SoundMenu );
                    
CromChat(id"!g[%s]!n You are not allowed to buy health over !g300."PREFIX);
                }
            }
        } 
and while buying the health i would like to add a specific animation v_.mdl and then to be back to normal, to the weapon or the pistol or the knife that the player had in head, is that possible?
__________________
a simple act of caring creates an endless ripple.
Nutu_ is offline
 



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 13:38.


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