Forum > Serverside Modding
[QUESTION] Calculating playerBytes
(1/3) > >>
Смердокрыл:
Hey! How can I calculate the needed value of playerBytes in order to change a character in navicat, and not in the client?
Rangorn:
[deleted]
Смердокрыл:
--- Quote from: "Rangorn" ---Hey.
This is how i do in PHP :
--- Code: --- $b = $row['playerBytes']; // PlayerBytes in Character table $b2 = $row['playerBytes2']; // PlayerBytes in Character table
// Set Character Features $ha = ($b>>16)%256; // Hairs $hc = ($b>>24)%256; // Hairs color $fa = ($b>>8)%256; // Face $sk = $b%256; // Skin $fh = $b2%256; // Facial / Others
--- End code ---
--- End quote ---
Ehm... You overestimate me.
Смердокрыл:
Basically, my knowledge of PHP is not even enough for Hello world. Could you explain the mathematical way of calculating it?
Also, if its possible to do this via vb.net, I'll be happy to know
Rochet2:
in most programming languages and elsewhere (C, C++, java, lua, SQL, ... whatever else) you would use almost exact same code. I myself wouldnt bother with the maths. instead just look up what %, << and >> operators do. % is modulo (3%2 = 1) and the rest are bit shifting operators. Everything else is just a bunch of variables.
Navigation
[0] Message Index
[#] Next page
|