Raised This Month: $ Target: $400
 0% 

[SNIPPET] Block Keys


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Mathias.
Veteran Member
Join Date: Aug 2010
Location: Canada is my city
Old 11-18-2012 , 14:43   Re: [SNIPPET] Block Keys
Reply With Quote #5

PHP Code:
        if (StrEqual(blockkey"alt1"false))
        {
            
Blocked_Keys[KEY_IN_ALT1] = true;
            
changed true;
        }
        else if (
StrEqual(blockkey"al2"false))
        {
            
Blocked_Keys[KEY_IN_ALT2] = true;
            
changed true;
        }... 
Don't put else if since you can have many keys to block. Exemple, if you block 'al2' (which spelling wrong by the way) it will work fine, but if you block alt1 and al2 and the player hold alt1 and al2 in the same time than al2 won't be blocked since it check the condition of alt1, do is part and switch to the end.
Mathias. 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 18:37.


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