I would take the entire GUI Creation and move it into it's own function, versus having it in onCreated(), so that if you ever update the weapon, everyone who has it won't have it pop open on them!
Also, instead of using the two textEditCtrls, you could simply replace that with the text of your TextList, so you don't need to type in the name of the weapon, just select it from the list and hit add/remove.
Lastly I would say to add braces in your top set of lines, for your :
PHP Code:
function onActionServerSide()
{
if (params[0] == "addweaponwep")
{
addweapon(params[1]); //Add the weapon.
}
else if (params[0] == "takeweaponwep")
{
removeweapon(params[1]); //Take the weapon.
}
}
It's really a personal preference, but I think it's easier to read/update in the future
for others. Perhaps even come up with more unique/descriptive names for your ctrls
so down the road you can just look at it and see what they correspond to!