Quote:
Originally Posted by coreys
What I'd do is have a clientr flag like
clientr.colors = {r,g,b,a};
And then a script like this:
PHP Code:
//#CLIENTSIDE function onCreated() { onTimeOut(); } function onTimeOut() { //I forget if it should be players[] or allplayers[] for (pl: players) { pl.red = pl.clientr.colors[0]; pl.blue = pl.clientr.colors[1]; pl.green = pl.clientr.colors[2]; pl.alpha = pl.clientr.colors[2]; } setTimer(.5); } function onPlayerEnters() { onTimeOut(); }
Using that has worked for me in the past, but I guess a gani would work as well, assuming he used player.attr[]'s for the rgb.
|
Lag mania. Much easier to do this.
Quote:
Originally Posted by Knightmare1
well, i have been working on gani scripting (working as in trying to find out what the heck a gani script is!) and i was wondering, could i just do
PHP Code:
//#CLIENTSIDE function onPlayerChats() { if (player.chat == "/grow") { client.zoom=1; sleep(1); client.zoom=2; sleep(1); client.zoom=3; sleep(1); client.zoom=4; } }
to make the person grow really tall?
|
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.
Also, thought I'd mention this, the reason you don't need //#CLIENTSIDE in a gani script is because GANI scripts are always clientside. (No, you may not use //SERVERSIDE; (yes people still does this x.x) next time I see someone do this I will break their face.)
Too much ****ing code! I better get reputation for this! lol j/k