Creation/Dev/Script/Functions/enablefeatures: Difference between revisions

From Graal Bible
mNo edit summary
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Category:Scripting Reference]]
''Clientside''


 
example:  
example: <pre>
<pre>function onCreated()
function onCreated()
{
{
   enablefeatures(allfeatures - 0x100);
   enablefeatures(allfeatures - 0x100);
}</pre>
}
</pre>
 
<p>Disables hearts over the player's head.</p>
<p>Disables hearts over the player's head.</p>


Features are encoded as bits as listed below:
{| border="1" cellpadding="2" width="100%"
{| border="1" cellpadding="2" width="100%"
|'''Value'''
|'''Value'''
Line 64: Line 69:
|-
|-
|}
|}
'''Note:''' 0x#### is simply hexadecimal notation, so these codes hold no special meaning other than being numbers written in radix-16. E.g., 0x10 = 16 is the 4th bit (starting with the 0th bit).

Latest revision as of 03:13, 18 September 2011

Clientside

example:

function onCreated()
{
  enablefeatures(allfeatures - 0x100);
}

Disables hearts over the player's head.


Features are encoded as bits as listed below:

Value Description
1 M key (map)
2 P key (pause)
4 Q key (weapon select)
8 R key (show ratings)
0x10 S+A key combination for dropping items
0x20 S+D key combination for switching weapons
0x40 TAB key (if disabled then you cannot switch to the chat field with TAB)
0x80 Display of chat text
0x100 Display of the hearts over player heads
0x200 Display of nicknames
0x400 Toall/PM-icons on the minimap
0x800 Right-click on players opens their profile
0x1000 Emoticons (disable it if you want to do other stuff with control+keys)
0x2000 Alt+5 for making snapshots (deprecated)
0x4000 Alt+8/9 for zooming (deprecated)
0x8000 Allows F2 output (savelog()/echo())
allfeatures All of the previously stated feature flags enabled

Note: 0x#### is simply hexadecimal notation, so these codes hold no special meaning other than being numbers written in radix-16. E.g., 0x10 = 16 is the 4th bit (starting with the 0th bit).