Author Topic: Nothing happens when exec. Add-on  (Read 982 times)

Well, not much to say, really. I haven't even attempted scripting in 4 months.

So, I decided to do the most simple thing I could think of, a script that bounces yourself.

When I execute it in the console, I get no syntax error, but nothing happens.
My script is just a shot in the dark, so could anyone tell me what's wrong with it?

Code: [Select]
function Servercmdbounce(%client)
{
%Client.Player.AddVelocity(0, 0, 25);
}

I first tried it with the / command, but It didn't work.

I executed it by typing in the console-

Code: [Select]
exec("add-ons/Script_Test/test.cs");

is serverCmd case sensitive?

is serverCmd case sensitive?

I tried doing it the way you did, but it still won't work.

Although a new thing came up, it said the function AddVelocity doesn't exist.

I tried doing it the way you did, but it still won't work.

Although a new thing came up, it said the function AddVelocity doesn't exist.
that's odd.

Code: [Select]
function Servercmdbounce(%client)
{
%Client.Player.AddVelocity("0 0 25");
}

Code: [Select]
function Servercmdbounce(%client)
{
%Client.Player.AddVelocity("0 0 25");
}
e

AddVelocity arguments always confused me.  :cookieMonster:


Code: [Select]
function serverCmdBounce(%cl) {
    if(isObject(%pl = %cl.player))
        %pl.addVelocity("0 0 25");
}