View Single Post
  #12  
Old 01-29-2008, 01:43 AM
Knightmare1 Knightmare1 is offline
Billy Allan
Knightmare1's Avatar
Join Date: Apr 2007
Posts: 804
Knightmare1 can only hope to improve
Quote:
Originally Posted by cbkbud View Post
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);
    
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()
{
  
setTimer0.05 );
}
function 
onTimeOut()
{
  
player.zoom clientr.zoom;
  
player.red clientr.red;
  
player.green clientr.green;
  
player.blue clientr.blue;
  
setTimer0.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 1client.zoom 4client.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
um well this makes everyone grow, but they cant see it.
__________________
I am the devil, I am here to do to devils work.
Reply With Quote