Originally Posted by
Astyr
Ahh John, I didn't think it was tough, I try picturing the scripts in my head first then applying them, I got stuck.I tried to PM you on forum but your inbox is full, is there any way I can contact you if I have help? I don't want to spam threads.
I can usually do simple things, I know commands and functions and arrays and things.
Do you have a recommended thing I should try to build my skills with
This is the simplest drag script I can create in under a minute:
PHP Code:
function onActionServerside(cmd, dat) {
if (cmd == "drag") {
findplayer(dat[0]).x = dat[1];
findplayer(dat[0]).y = dat[2];
}
}
//#CLIENTSIDE
function onCreated() {
this.dplayer = "";
}
function onPlayerChats() {
if (player.chat == "/drag") setTimer(0.05);
if (player.chat == "/dragoff") setTimer(0);
}
function onMouseDown() {
for (pl : players) {
if (pl.x in |mousex - 1, mousex + 1| && pl.y in |mousey - 1, mousey + 2|) this.dplayer = pl.account;
}
}
function onTimeOut() {
triggerserver("weapon", this.name, "drag", {this.dplayer, mousex, mousey});
setTimer(0.05);
}