I'm trying to make some functions I need to set some anis and such from a class, seeing as triggerclient or server hasn't been working for me classwise (thought Novo says it is possible).
Weapon
PHP Code:
public function aniSet(acct, condition, ani, newani, aniparams) {
temp.attr = 0;
temp.img = 0;
plyr = findPlayer(acct);
this.ani = ani;
this.oldani = ani;
this.newani = newani;
switch (condition) {
case "set":
with (plyr) {
triggerclient(this.name, "set", thiso.ani, aniparams);
}
break;
case "replace":
if (aniparams == NULL) {
with (plyr) {
triggerclient(this.name, "replace", thiso.oldani, thiso.newani);
}
}
break;
}
}
//#CLIENTSIDE
function onActionClientside(condition, aniinfo1, aniinfo2) {
player.chat = params;
switch (condition) {
case "set":
setani(params[1], params[2]);
break;
case "replace":
player.replaceani(params[1], params[2]);
break;
}
}
Test Weapon
PHP Code:
function onCreated() {
systemAniSet.aniSet("Chandler", "replace", "idle", "mal_new_idle", NULL);
}
Seems replaceani is not working wherever I try it.