I just tried using a timeout, it works fine offline meaning it's an online problem.. here's the new code:
PHP Code:
if (playerchats&&startswith(crush,#c)) {
tokenize #c;
if (strtofloat(#s(clientr.#t(1)))>0) {
playerx=x;
playery=y+5;
playerdir=0;
timeout=1;
} else {
insertstring client.messages,0,You don't have any #t(1) gems.;
}
}
if (timeout) {
setcharani idle,;
freezeplayer 1;
setcharani ek_mine,;
setstring clientr.#t(1)dust,#v(strtofloat(#s(clientr.#t(1)dust))+1);
setstring clientr.#t(1),#v(strtofloat(#s(clientr.#t(1)))-1);
setplayerprop #c,#s(clientr.#t(1));
if (strtofloat(#s(clientr.#t(1)))<=0) {
setcharani idle,;
message Your crushing is completed;
}
else {
timeout=1;
}
}