There's no reason to use a clientr variable here since it looks like you're not doing any validating:
PHP Code:
//#CLIENTSIDE
function onWeaponFired() {
say2("For change humor say #b /humor <your humor>");
}
function onPlayerChats(){
if (player.chat.starts("/humor ")){
player.client.humor = player.chat.substring(7);
player.chat = "Humor changed!";
}
}