Quote:
|
Originally Posted by Gambet
PHP Code:
if (created)
setshape 1,32,32;
if (actionheal) {
setstring clientr.hp,#s(clientr.hpmax);
set client.updateheart;
}
//#CLIENTSIDE
if ( created )
timeout=0.05;
if ( timeout ) {
if ( playerx in |startx, endx| && playery in |starty,endy| ) {
unset client.disable;
enableweapons;
} else {
set client.disable;
disableweapons;
if ( strtofloat( #s(clientr.hp) ) < strtofloat( #s(clientr.hpmax) ) ) {
triggeraction x+0.5,y+0.5,heal,;
}
}
timeout=0.05;
}
|
So you are triggering to the server to heal the player every 0.05 seconds. THATS WHERE MALS LAG COMES FROM :O
Now i wonder where eras comes from.. hmm
Here, just made this in a second - should work:
PHP Code:
function onPlayerTouchsMe() {
playersc = 0;
for (i=0; i<players.size(); i++) {
with (players[i]) {
if (player.x in |20, 30| && player.y in |20, 30|) { // You may want to change the position checks
playersc++;
}
}
}
if (playersc >= 2) {
player.chat = "There is currently two players in the spar!";
} else {
player.chat = "Sure, come on in";
}
}
Maybe something like that?