Script :
//#CLIENTSIDE
function onWeaponFired() {
if (this.on == false) {
this.on = true;
client.gani_idle = "light-old_rifle-idle";
onTimeout();
}
else{
this.on = false;
showsword(1);
player.chat = "Gun Deactivated!";
client.gani_idle = "idle";
client.gani_walk = "walk";
}
}
function onTimeout()
{
if (this.on == true)
{
hidesword(1);
player.chat = "Gun Activated!";
client.gani_idle = "light-old_rifle-idle";
client.gani_walk = "light-old_rifle-walk";
}
}
function onKeyPressed( code, key )
{
if ( key == "s" )
{
hidesword(1);
setani("light-old_rifle-fire", "");
freezeplayer(0.1);
setshootparams("Rifle", player.account);
shoot(player.x, player.y, 0, player.dir,0 ,0 , "utopia_bullet", "0.5");
}
}
function onPlayerChats(){
if (player.chat == "Reload"){
{
client.gani_idle = "light-old_rifle-reload";
sleep(0.25);
client.gani_idle = "light-old_rifle-idle";
}
}
}