Got it XD
PHP Code:
thiso.weapontabs = {"Weapons"};
this.image = "pa_mud-maceofthedead.png";
function onActionServerside(option) {
if (temp.option == "onAttack") {
player.doAttack("Sword", 6, 2, player.account);
}
if (temp.option == "Punch") {
player.doAttack("Punch", 3, 1, player.account);
}
}
//#CLIENTSIDE
function GraalControl.onKeyDown(code, key) {
if (key == "d" && this.equip == false && player.weapon == this.name) {
this.equip = true;
player.attr[2] = "pa_mace-ofthedead.png";
replaceani("pa_scythewalk","pa_macewalk");
replaceani("pa_scytheidle","pa_maceidle");
return;
}
if (key == "s" && this.equip == true && player.weapon == this.name) {
this.onTimeout();
return;
}
if (key == "d" && this.equip == true && player.weapon == this) {
player.attr[2] = "";
this.equip = false;
return;
}
if (key == "s" && this.equip == false && player.weapon == this) {
triggerserver("weapon", this.name, "onPunch");
setani("pa_punch", "");
freezeplayer(0.25);
triggerserver("weapon", this.name, "onPunch");
}
}
function onTimeOut() {
if (player.weapon != this) {
return;
}
setani("pa_maceattack", "");
freezeplayer(0.25);
triggerserver("weapon", this.name, "onAttack");
}