Raised This Month: $ Target: $400
 0% 

[Script] Knife Menu


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 10-31-2021 , 12:11   Re: [Script] Knife Menu
Reply With Quote #2

U only need one boolean for that. Set it to true whenever someone has choosen a knife and set it back to false when a new round is called / player spawns again.

To clean up your code, u could use 1 array to hold all your modelpaths. To precache them, simply use a loop.

PHP Code:
new const szModel[] = {
    
"models/frknife/v_firstknife.mdl",
    
"models/frknife/v_secondknife.mdl"
}; 
PHP Code:
public plugin_precache() {
    for(new 
isizeof(szModel); i++) {
        
precache_model(szModel[i]);
    }

__________________

Last edited by Napoleon_be; 10-31-2021 at 13:01.
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
 



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 11:34.


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