Yea, a question about trigger again ...
That is the weapon, its used to add/remove the flag(Ctf-flag) to the player
PHP Code:
//Weapon
function onActionserverside() {
switch (params[0]) {
case "remove":
player.removeWeapon("-System/Ctfblue");
sleep 1;
}
}
//#CLIENTSIDE
function onPlayerChats() {
if (player.chat == "Drop Flag") {
replaceani walk,walk;
replaceani idle,idle;
setani("idle",null);
triggerserver("gui", this.name, "remove");
}
}
The weapon works pretty well, but I also got a class, wich is totally NOT working.
This is the class, and here the trigger doesnt work, someone can tell me why and/or give me an example to make it working?
I am totally
PHP Code:
//Class
function onCreated() {
this.setshape(1,32,32);
this.blueowner = 2;
this.dir = 1;
this.setcharani("sch_ctfblueidle",null);
this.blockagain();
}
function onActionReturn() {
if (client.blueowner == "1") {
this.blueowner = 2;
this.dir = 1;
client.blueowner = 2;
this.show();
}
}
//#CLIENTSIDE
function onPlayerChats() {
if (player.chat == "Drop Flag")
{ triggeraction(this.x, this.y, "Return", null);
}
}
Note: I wont look on forums until Thursday, so dont wonder if I dont answer, but I would be happy to see some suggestions if I come back