Still doesnt trigger, Imma go post my script again, I modifyed a bit before.
I might should try easier stuff



NPC(Name: BlueFlag)
PHP Code:
function onActionDropFlag() {
echo ("Flag got dropped"); //never comes :(
this.blueowner = 2;
this.dir = 1;
this.level = ctf.gmap;
this.x = 94.5;
this.y = 26;
this.blockagain();
this.show();
}
function onActionMoveFlag() {
if (player.guild == "Red Team") {
player.addWeapon("-BlueFlag");
this.blueowner = 1;
this.hide();
}
}
function onCreated() {
this.setshape(1,32,32);
this.blueowner = 2;
this.dir = 1;
this.setcharani("sch_ctfblueidle",null);
this.blockagain();
this.show();
}
//#CLIENTSIDE
function onPlayerTouchsme() {
triggeraction(this.x, this.y, "moveFlag", player.account);
}
Weapon(Name: -BlueFlag)
PHP Code:
function onActionServerSide(cmd) {
switch (cmd) {
case "removeWeapon": {
temp.pl = findplayerbycommunityname(params[1]);
pl.removeWeapon("-BlueFlag");
break;
}
}
}
//#CLIENTSIDE
function onCreated() {
replaceani("walk", "sch_ctfbwalk");
replaceani("idle", "sch_ctfbidle");
showtext 0,player.x+1.5,player.y-1.5,arial,bc,Blue Flag!;
changeimgzoom 0,0.9;
client.bflag = "got";
settimer(.05);
}
function onPlayerChats() {
if (player.chat == "drop flag") {
triggerserver("npc", "BlueFlag", "DropFlag");
replaceani("walk", "walk");
replaceani("idle", "idle");
setani("idle", null);
triggerserver("gui", name, "removeWeapon", player.account);
}
}
function onTimeout() {
if (client.bflag == "got") {
showtext 0,player.x+1.5,player.y-1.5,arial,bc,Blue Flag!;
changeimgzoom 0,0.9;
settimer(.05);
}
}