![]() |
enablefeatures() help
Ok, I want to change what happens when you press Q on my server.
So, I gotta enable everything BUT q with enablefeatures. I disabled some stuff but not everything, so it is done clientside and it looks like this: NPC Code: given that the wiki says this as paramaters for enablefeatures PHP Code:
Bad news ... 0x80 is ENABLED, as we told it to be, BUT there is now NO CHAT TEXT above the player! and ox200 is ENABLED but now there are NO NICKNAMES displayed! this is the only instance of enablefeatures and it breaks, or rather, DISABLES things! Ack! help! |
enablefeatures(allfeatures - 4);
Dunno if it is better to start with allfeatures and just minus off what you dont want, but this works. |
thanks
and i now recall something from a few years ago that instead ot a coma delimited list it was 1+2+4+8 etc. and they ascended by the powers of 2 0 2 4 8 16 32 64 128 256 512 1024 etc. if you take computer science in college you may have to memorize the powers of two as that is what is used to convert binary to decimal. for example you have the binary number 00101010 there are 8 places in that number, starting from the right most number you want the power of two from right to left and you gotta start from 0 before you get to 1 zeroith place : its a 0 so we don't need it first place : its a 1, 2^1 is 2 second place : 0 third : 1, so 2^3 is 8 fourth: 0 fifth: 1, 2^5 is 32 6th and 7th are 0 then you add up the powers of two to get the decimal number 32+8+2 = 42 see, 42 is the answer! ... or you can open windows calculator and in the advanced version convert binary to decimal etc. but its better to know how it works, if you have to convert in a power failure. heavan forbid the computer wont turn on and you have to decypher a secret message by hand. its kinda fun to know anyways. |
Quote:
Quote:
|
| All times are GMT +2. The time now is 04:26 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.