Post by Spawner on Dec 31, 2014 23:13:37 GMT
Reduce your CPU By BITS & Macro
This thread is My first post here as a Tutoriale so hope you understand what i'm trying to show you !
let's start
Macro
[English] :
The macro is a important thing and its a useful in the same time let me give a example
This code Increase your KB file like 24 or 30 i can't Give you an exact value .
[Darija] :
macro howa haja mohima o fi nafss lwa9t makatsta3malch bezaf bighad nadar 3la ach ta dir n3tiw example :
Had l code ghi zido fi script ta3k o ghadi in9oss lik l size d file ghi chwiya walakin rah useful
Bitsum
[English] :
Bitsum or bits first of all we all now that she can take only 1 or 0 like boolean like ( code binary 'base 2' ) and also
Equation :
So lets make a quick equation :
Operator that i use is '^'
The equation can write like this : 10101010 ^ 00101010 = 11010100
10101010 = Byte number 1
00101010= Byte number 2 whit 8 digits ( '8 bytes ' )
you see it hard but i study it ( this year )
what i have done is
If you see in a code :
How can i change the Bits to a 1 num :
I'm gonna take a simple num and short
So
in the Script will be
Lets say aValue its = 4 so
so
so what i mean is << the minimum shift left
and >> maximum shift right
The Simple Script in bitsnum :
SO THIS FUNCTION IS INCREASE YOUR CPU ALSO ('BITS') . ADD IT IN YOUR SCRIPT IF YOU UNDESTANT A SHIT !
Dsl madertch darija fi 2 ( ' BITSUM ' ) pck fiha bezaf maytchra7 Hope u like it sorry for bad english .
This thread is My first post here as a Tutoriale so hope you understand what i'm trying to show you !
let's start
Macro
[English] :
The macro is a important thing and its a useful in the same time let me give a example
#pragma dynamic 32768 // this is a macro
This code Increase your KB file like 24 or 30 i can't Give you an exact value .
[Darija] :
macro howa haja mohima o fi nafss lwa9t makatsta3malch bezaf bighad nadar 3la ach ta dir n3tiw example :
#pragma dynamic 32768 // Hada macro ( Preproce...)
Had l code ghi zido fi script ta3k o ghadi in9oss lik l size d file ghi chwiya walakin rah useful
Bitsum
[English] :
Bitsum or bits first of all we all now that she can take only 1 or 0 like boolean like ( code binary 'base 2' ) and also
1 byte = 8 bits
Equation :
So lets make a quick equation :
10101010
+00101010
________
11010100
Operator that i use is '^'
The equation can write like this : 10101010 ^ 00101010 = 11010100
10101010 = Byte number 1
00101010= Byte number 2 whit 8 digits ( '8 bytes ' )
you see it hard but i study it ( this year )
what i have done is
Retenue ( I7tifad )
0+0 = 0 | 0
0+1 = 0 | 0
1+0 = 0 | 0
1+1 = 0 | 1
If you see in a code :
~1 = 0
~0 = 1
How can i change the Bits to a 1 num :
I'm gonna take a simple num and short
"10010001 << 1 = 10010001"
Alors aValue = { 10010001 = 1x(2^0)+ 0x(2^1) + 0x(2^2) + 0x(2^3) + 0x(2^4) + 1x(2^5) + 1x(2^8) }
So
in the Script will be
Lets say aValue its = 4 so
( 1 << aValue )
so
( 1 << 4 )
so what i mean is << the minimum shift left
and >> maximum shift right
The Simple Script in bitsnum :
IN BITS
new g_Bitsalive;
if (g_Bitsalive & (1<<id)){
//
}
IN NORMAL
new g_Alive[id]
if (g_Alive[id]){
//your job here
}
SO THIS FUNCTION IS INCREASE YOUR CPU ALSO ('BITS') . ADD IT IN YOUR SCRIPT IF YOU UNDESTANT A SHIT !
Dsl madertch darija fi 2 ( ' BITSUM ' ) pck fiha bezaf maytchra7 Hope u like it sorry for bad english .