Tried doing:
PHP Code:
function onMouseDown(button){
if(button == "left")
triggerserver("gui", name, "block", temp.x, temp.y);
}
but it doesn't work when i do it that way. it only works if i keep it the way it is below. someone mind telling how i can fix that? any help appreciated.
PHP Code:
function onActionServerSide(){
if (params[0] == "block")
temp.p = putnpc2(params[1], params[2], "");
temp.p.join("personal_khortez_block");
}
//#CLIENTSIDE
function onKeyPressed(code, key){
if(key == "z"){
this.on = !this.on;
if(this.on){
settimer(0.05);
player.chat = "Blocks on!";
}
else {
player.chat = "Blocks off!";
}
}
}
function onTimeOut(){
temp.x = int(mousex);
temp.y = int(mousey);
if (this.on){
showimg(1, "cega_staffblock2-frozenlies0.png", temp.x, temp.y);
showtext(2, temp.x+2, temp.y+0.5, "Palatino Linotype", "i", player.nick);
changeimgcolors(1, 1, 1, 1, 0.5);
if(leftmousebutton){
triggerserver("gui", name, "block", temp.x, temp.y);
}
setTimer( 0.05 );
}
else{
hideimgs( 1 , 2);
}
}