Raised This Month: $ Target: $400
 0% 

KnifeModels Error


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
MayroN
Senior Member
Join Date: Aug 2017
Location: Kyiv
Old 05-24-2018 , 14:53   Re: KnifeModels Error
Reply With Quote #7

Quote:
Originally Posted by akcaliberg View Post
PHP Code:
new iRandom random_num(0g_iKnivesNum 1); 
Thanks for your good advice
+Found an even better option.Replaced it
PHP Code:
public player_spawn(id)  
{  
if(
is_user_bot(id) && get_pcvar_num(g_pAtSpawn) && !g_iKnife[id] && g_bFirstTime[id])  
{  
g_bFirstTime[id] = false  
new iRandom random_num(0g_iKnivesNum); 
g_iKnife[id] = iRandom
ArrayGetArray(g_aKnivesiRandomg_eKnife[id]); 
OnSelectKnife(id); 
}  

By that
PHP Code:
public player_spawn(id

        if(
is_user_bot(id))
        
g_iKnife[id] = random_num(0g_iKnivesNum -1);
        
ArrayGetArray(g_aKnivesg_iKnife[id], g_eKnife[id]); 

It's better.And the mistake disappeared
MayroN is offline
Send a message via ICQ to MayroN Send a message via Skype™ to MayroN
 



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:37.


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