I need help with putting a gani into this drag script made by tig. Thanks tig. All credit to him.
WEAPON/MouseC
PHP Code:
//Scripted by Tig
function onStartDrag(control) {
triggerclient("gui", name, "startDrag", control.account);
}
//#CLIENTSIDE
function onCreated() {
}
function onActionClientside(command, acct) {
switch (command) {
case "startDrag":
onTimeout();
break;
}
}
function onTimeout() {
temp.speed = 0.5;
temp.c = findplayer(client.controller)/
then the drag script.
PHP Code:
// NPC made by Tig
function onActionServerside(command, acct) {
switch (command) {
case "StartDrag":
with (findplayer(acct)) {
player.addWeapon("MouseC");
client.controller = playero.account;
findWeapon("MouseC").trigger("StartDrag", playero);
}
player.attr[20] = acct;
break;
}
}
//#CLIENTSIDE
function onCreated() {
this.catchEvent(GraalControl, "onMouseDragged", "onMouseDragged");
}
function onMouseDown() {
for (temp.p: players) {
if (mousex in |temp.p.x - 1, temp.p.x + 3| && mousey in |temp.p.y, temp.p.y + 2|) {
this.trigger("StartDrag", temp.p);
break;
}
}
}
function onStartDrag(pl) {
triggerserver("gui", name, "startDrag", pl.account);
}
function onMouseUp() {
player.attr[28] = player.attr[20] = "";
}
function onMouseDragged(obj, mod, mx, my) {
player.attr[28] = "\"" @ mousex SPC mousey @ "\"";
}
i want to put a GANI in there so when i start dragging, it plays the gani on the layer being dragged and stops it when he is dropped. All i know is i think it goes in the start drag script but i dont know where. Please help and thanks in advance.
-McChucken