Author Topic: Gravity script  (Read 2144 times)

I keep getting buffer overrun error when i enable the script and start the game, is there somthing wrong?

Code: [Select]
package Gravity

{
ServercmdGravity(%client, gravity)
%Gravitymod(gravity);
}
activatePackage(gravity);

Ur doing it wrong.
I keep getting buffer overrun error when i enable the script and start the game, is there somthing wrong?

Code: [Select]
package Gravity
}
ServercmdGravity(%client, [b][u]%[/u][/b]gravity)[u][b]{[/b][/u]
%Gravitymod(gravity);
[u][b]};[/b][/u]
}
activatePackage(gravity);

still getting error  :panda:
Code: [Select]
package Gravity

{
function ServercmdGravity(%client, %gravity) {
%Gravitymod(gravity);
};
}
activatePackage(gravity);

That's because your doing it so wrong, it's past me to fix it.

Code: [Select]
package Gravity
{
   function ServercmdGravity(%client, %gravity)
   {
        %Gravitymod(gravity);
   }
};
activatePackage(Gravity);

Code: [Select]
package Gravity
{
   function ServercmdGravity(%client, %gravity)
   {
        Gravitymod(%gravity);
   }
};
activatePackage(Gravity);

The problem has now stopped, but now it still dosn't change the gravity to the player.  here is my code:
Code: [Select]
//by zmaster
package Gravity
{
   function ServercmdGravityhalf(%client)
   {
        %player.gravityMod(0.5);
   }
};
activatePackage(Gravity);

%player.gravityMod(0.5);

What does this do? Where's gravity handled?

No clue i'm a complete novice


Basically, if .GravityMod was a funtion on someone, then you'd need to do %client.player.GravityMod(0.5); or something.

this thread makes me lol  :cookieMonster:

Now i have this with no errors but still the gravity stays the same

Code: [Select]
//by zmaster
package Gravity
{
   function ServercmdGravityhalf(%client)
   {
        %client.player.gravitycoefficent = 0.5;
   }
};
activatePackage(Gravity);

The question is, how are you changing the gravity? You've successfully changed a variable to the player, but that variable didn't exist before, and there is no 'gravity' variable for players, so it wouldn't be that easy. You'd basically need to know some pretty advanced things to get it going, honestly.

Ur doing it wrong.
I keep getting buffer overrun error when i enable the script and start the game, is there somthing wrong?

Code: [Select]
package Gravity
}
ServercmdGravity(%client, [b][u]%[/u][/b]gravity)[u][b]{[/b][/u]
%Gravitymod(gravity);
[u][b]};[/b][/u]
}
activatePackage(gravity);

Code: [Select]
[quote][b][i][u]You can't use any BBC tags inside the code tag.[/u][/i][/b][/quote]