Quote:
Originally Posted by ApothiX
You cannot call clientside functions from the serverside. Try something more along the lines of this:
PHP Code:
bla bla a lot of **** here..
|
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];
}