[FilterScript] Trampoline
#1

[*****TRAMPOLINE*****]

Ok so this is the first thing I'm releasing here, this was one of my first scripts.

I'm not sure what you'd use this for but have fun with it, might be fun to see on a roleplay server or something.

Usage
1. Use "/trampoline" to spawn a trampoline infront of you.
2. Get on and have fun!

Pictures:

(Might add a short video if demand is high)










DOWNLOAD/INSTALL
To install simply paste both the AMX and PWN into your "filterscripts" folder inside your SA-MP server directory. Update your filsterscripts line in your server.cfg to include this filterscript on server start-up (or load it manually with the RCON command while in your server).

Trampoline should work for all players now, fixed (thanks to Hiddos)

Pastebin
AMX
PWN

Note: I will upload it to other places too, just let me know where you want it (as long as I don't have to pay for it or make stupid accounts to upload).

Feel free to post any suggestions for improvements.

- VonKnox
Reply
#2

LOL AWESOME!
Reply
#3

LOL Nice i guess
Reply
#4

Nice but timer make a small lag..You can make when player press SHIFT to jump(shortcut to that function ).
And it work just for a player.And,to call a function with parameters with a timer,you need to use SetTimerEx ( SetTimerEx("Bounce",750,true,"i",playerid); ).Will look something like this: http://pastebin.com/WKk37PXv
Reply
#5

Quote:
Originally Posted by Rokzlive
Посмотреть сообщение
LOL AWESOME!
- Enough Said.
Reply
#6

Quote:
Originally Posted by Steven82
Посмотреть сообщение
LOL Nice i guess
Quote:
Originally Posted by Rokzlive
Посмотреть сообщение
LOL AWESOME!
Thanks.


Quote:
Originally Posted by Gavibro
Посмотреть сообщение
Nice but timer make a small lag..You can make when player press SHIFT to jump(shortcut to that function ).
And it work just for a player.And,to call a function with parameters with a timer,you need to use SetTimerEx ( SetTimerEx("Bounce",750,true,"i",playerid); ).Will look something like this: http://pastebin.com/WKk37PXv
Does this script work fine or is the lag created by the timer the only problem? I'm not sure what you mean with the SetTimerEx function and personally I prefer it so it automatically makes you jump, however I can release different versions using OnPlayerKeyStateChange if people prefer that...
Reply
#7

This is so cool! Nice release.
Reply
#8

Great idea mate, it's really cool.
Reply
#9

At the time of scripting this you really wanted a trampoline, rofl.
AWESOME! good job.
Reply
#10

Quote:
Originally Posted by Porsche911
Посмотреть сообщение
At the time of scripting this you really wanted a trampoline, rofl.
AWESOME! good job.
Ahah as I said this was one of my first scripts - It didn't take very long to make, really.


Thanks for all the positive feedback, feel free to post any suggestions on what I can do to make it better in the future - if there is even anything..
Reply
#11

video please?
Reply
#12

This would be a good demonstration of a trompoline for your mum to know what a trampoline actually is for your christmas present.
Reply
#13

Nice, however this code isn't going to work:

pawn Код:
public OnFilterScriptInit()
{
  SetTimer("Bounce", 750, true);
  return 1;
}

forward Bounce(playerid);
public Bounce(playerid)
{
        new Float:x, Float:y, Float:z;
        GetObjectPos(trampoline, x, y, z);
        if(IsPlayerInRangeOfPoint(playerid, 2.25, x, y, z+2.0))
        {
        SetPlayerVelocity(playerid, 0.0, 0.0, 0.5);
        }
}
playerid will always be '0' as no values are entered. This of course worked during testing as you were ID 0, but for others this will not work.

You need to use a loop:

pawn Код:
forward Bounce();
public Bounce()
{
    new Float:x, Float:y, Float:z;
    GetObjectPos(trampoline, x, y, z);
    for(new i; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerInRangeOfPoint(i, 2.25, x, y, z+2.0))
        {
          SetPlayerVelocity(i, 0.0, 0.0, 0.5);
        }
    }
}
Reply
#14

Quote:
Originally Posted by Hiddos
Посмотреть сообщение
Nice, however this code isn't going to work:

pawn Код:
public OnFilterScriptInit()
{
  SetTimer("Bounce", 750, true);
  return 1;
}

forward Bounce(playerid);
public Bounce(playerid)
{
        new Float:x, Float:y, Float:z;
        GetObjectPos(trampoline, x, y, z);
        if(IsPlayerInRangeOfPoint(playerid, 2.25, x, y, z+2.0))
        {
        SetPlayerVelocity(playerid, 0.0, 0.0, 0.5);
        }
}
playerid will always be '0' as no values are entered. This of course worked during testing as you were ID 0, but for others this will not work.

You need to use a loop:

pawn Код:
forward Bounce();
public Bounce()
{
    new Float:x, Float:y, Float:z;
    GetObjectPos(trampoline, x, y, z);
    for(new i; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerInRangeOfPoint(i, 2.25, x, y, z+2.0))
        {
          SetPlayerVelocity(i, 0.0, 0.0, 0.5);
        }
    }
}
Thanks I will fix this and re-upload it ASAP.

EDIT: Re-uploaded it all, it's fixed now. Thanks Hiddos.
Reply
#15

haha that's funny
Reply
#16

haha nice job
Reply
#17

Excellent ! ! !
Reply
#18

Awesome :P
Reply
#19

LOL, nice xD
Reply
#20

Lol xD I'm trying it now Good Job

EDIT:I think you should add a command to remove the trampoline
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)