Quote:
|
Originally Posted by contiga
From you, I'd expect something 20 times better.. fool.. you are creating lag for him!
What you should do is reserve a few player.attr[ index]'s for stats, so that you can load them clientside.
Example:
--------
Every player has this in a clientside script:
PHP Code:
//#CLIENTSIDE
function statUpdate() {
temp.statarray = { client.stat1, client.stat2};
for ( i = 0; i < temp.statarray.size(); i ++)
player.attr[ 10 + i] = temp.statarray[ i];
}
The fact I did player.attr[ 10 + i] is because 1 - 5 could be reserved for custom bodies (in case you'd get those later).
A clientside script for loading:
PHP Code:
//#CLIENTSIDE
function loadStats( plr) {
temp.statarray2 = new[ 2];
for ( i = 0; i < 2; i ++)
temp.statarray2[ i] = findPlayer( plr).attr[ 10 + i];
}
|
It's pointless to waste player.attr[] variables on something like this. There is little to no lag in a simple request for them. I'm pretty sure requesting player.attr[] variables from other players generates the same (if not more) lag, as they are sent to everyone all the time, instead of just being requested.
Also, don't call my script 'a lot of **** here..' until you fix your half-assed lame formatting.