Lag mania. Much easier to do this.
No. You need the onPlayerChats to be in a weapon script.
I would have 4 different ganis;
zoom1.gani
zoom2.gani
zoom3.gani
zoom4.gani
and then something like this in each one
PHP Code:
SCRIPT
player.zoom = #; // Replace # with 1, 2, 3, or 4
SCRIPTEND
and then in the weapon something like
PHP Code:
//#CLIENTSIDE
function onPlayerChats()
{
if ( player.chat == "/grow" )
{
player.attr[7] = "zoom1.gani";
sleep( 1 );
player.attr[7] = "zoom2.gani";
}
}
and repeat that.
Of course, I would recommend having a player affects gani, and then a timeout in it, and then a player variable clientr.zoom. Something like this in the gani script.
PHP Code:
SCRIPT
function onCreated()
{
setTimer( 0.05 );
}
function onTimeOut()
{
player.zoom = clientr.zoom;
player.red = clientr.red;
player.green = clientr.green;
player.blue = clientr.blue;
setTimer( 0.05 );
}
SCRIPTEND
and then in a weapon
PHP Code:
//#CLIENTSIDE
function onCreated()
{
player.attr[7] = "player_effects.gani";
}
function onPlayerChats()
{
if ( player.chat == "/grow" )
{
for ( client.zoom = 1; client.zoom < 4; client.zoom += .1 )
{
sleep( .05 );
}
}
}
So that you get a more gradual zoom, and it is easier anyway. Note that I used client.zoom in that script, and clientr.zoom in the player effects, so make it client.zoom in both if you want. Sorry, I realized halfway through I needed to use client. vars.
Too much ****ing code! I better get reputation for this! lol j/k