You're mixing GS1 and GS2, which is a very bad thing.
Here's your weapon. Basically just doing the same thing, but with some GS2 corrections/styling.
PHP Code:
function onActionServerSide(cmd) {
switch (cmd) {
case "removeWeapon": {
player.removeWeapon("-System/Ctfblue"); // Is this seriously the name of the weapon?
break;
}
}
}
//#CLIENTSIDE
function onPlayerChats() {
if (player.chat == "drop flag") {
replaceani("walk", "walk");
replaceani("idle", "idle");
setani("idle", null);
triggerserver("gui", name, "removeWeapon");
}
}
And assuming the flag needs to move, best thing to do would be to create a DB NPC for the flag, then add something like this in the "removeWeapon" case in your weapon
PHP Code:
BlueFlag.trigger("dropFlag", player);
then in the DB NPC do something like this
PHP Code:
function onCreated() {
this.setshape(1,32,32);
this.blueowner = 2;
this.dir = 1;
this.setcharani("sch_ctfblueidle",null);
}
function onActionDropFlag(pl) {
if (pl.client.blueowner == 1) {
this.blueowner = 2;
this.dir = 1;
pl.client.blueowner = 2;
this.show();
}
}