SA-MP Forums Archive
[Include] [Inc+FS]BTTF: Time travelling system - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] [Inc+FS]BTTF: Time travelling system (/showthread.php?tid=318806)

Pages: 1 2


[Inc+FS]BTTF: Time travelling system - KingHual - 16.02.2012

Back to the future: Time travelling system by King_Hual


1. Introduction

This is an include, which sets a player's year. There is also a filterscript in "Back to the future" style. (If you haven't watched it, go watch it RIGHT now). There are alot of stuff that this can be used for. It's pretty simple, but I think it's worth the 2 hours that I spent on it. Of course, a feature is the multi-script support. All the year variables are the same in all scripts.


2. Functions

pawn Код:
SetPlayerYear(playerid, year); //Sets the given player's year to the specified one. Also returns the set year
GetPlayerYear(playerid); //Returns the player's current year
CreateTimeVehicle(vehicletype, Float:x, Float:y, Float:z, Float:rotation, color1, color2, respawn_delay); // Acts exactly the same as CreateVehicle, but assigns the vehicle to be a time vehicle. Also returns the created vehicle's ID
DestroyTimeVehicle(vehicleid); //Destroys a time vehicle
IsVehTimeVehicle(vehicleid); //Checks if the vehicle is a time vehicle and returns 1 if it is and 0 if it's not
MakeTimeVehicle(vehicleid); //Converts a regular vehicle into a time vehicle
MakeNormalVehicle(vehicleid); //Converts a time vehicle into a normal vehicle

3. Public Callbacks

pawn Код:
public OnPlayerYearChange(playerid, oldyear, newyear) //Gets called every time a player's year has been changed
public OnVehicleConverted(vehicleid, oldstate, newstate) //Gets called every time a vehicle has been changed from normal to time vehicle or vice versa
//IMPORTANT: The states for the callback above: VEHICLE_NORMAL for normal vehicle and VEHICLE_TIME for time vehicle. These should be used ONLY in the callback above

4. Include Installation

To install the include, simply put
Код:
#include <btf>
under
Код:
#include <a_samp>
. Then, use any of the functions above.


5. About the FilterScript

The filterscript has been fully scripted using my include. When a player is in a Time Vehicle, he can choose the year he wants to go to by pressing KEY_YES (Y by default) button for year increase or KEY_NO (N by default) button for year decrease. Next, he has to accelerate to 88 MPH or more, and press the KEY_CROUCH (Horn, H by default) button. When the player's car starts acting nuts, he has to keep the speed up for 7,5 seconds and NOT crash or take damage at all. Then, the year will be changed and you've time travelled! And when you press TAB, and click on a player's name, it will show his current year.


6. Back to the future FS Video

[ame]http://www.youtube.com/watch?v=m4P14kv6W4g[/ame]


7. Downloads

Include Pastebin: http://pastebin.com/RhqNZeKh

FilterScript Pastebin: http://pastebin.com/BvgpvYNn

Include+FilterScript (MediaFire): http://www.mediafire.com/?dsyixzj3m66f28v

PM me if you want to add mirrors!


8. Credits

-Looks like it's just me on this one


Re: [Inc+FS]BTTF: Time travelling system - Littlehelper - 16.02.2012

First!,
BTW, Looks Great, Gonna Test It Now!
Well Done!


Re: [Inc+FS]BTTF: Time travelling system - Niko_boy - 16.02.2012

This one is Differnt release after Long
Cool !!
EDIT:- can be used for bringing awesomeness!


Re: [Inc+FS]BTTF: Time travelling system - zgintasz - 16.02.2012

Very nice idea! Really nice job : ).


Respuesta: [Inc+FS]BTTF: Time travelling system - [Nikk] - 16.02.2012

Haha epci ! nice +rep


Re: [Inc+FS]BTTF: Time travelling system - KingHual - 16.02.2012

Thanks to everyone :P Report any bugs that you notice.


Re: [Inc+FS]BTTF: Time travelling system - Kontrol - 16.02.2012

haha you failed!
nice good idea btw


Re: [Inc+FS]BTTF: Time travelling system - Ronaldo_raul™ - 16.02.2012

Cool, great job.

Suggestion: Make some lighting or a explosion at the time of time changing(I have seen the movie , All parts :P )

That would be more realistic. +rep


Re: [Inc+FS]BTTF: Time travelling system - KingHual - 16.02.2012

Quote:
Originally Posted by Ronaldo_raul™
Посмотреть сообщение
Cool, great job.

Suggestion: Make some lighting or a explosion at the time of time changing(I have seen the movie , All parts :P )

That would be more realistic. +rep
I thought about that one. Didn't have time tho, I'll probably update it anyway.


Re: [Inc+FS]BTTF: Time travelling system - kiss - 16.02.2012

when i read the title, i was like a "Wtf is this"
then i open it and i was like "Oh yeah, nice job"


Re: [Inc+FS]BTTF: Time travelling system - KingHual - 16.02.2012

Quote:
Originally Posted by kiss
Посмотреть сообщение
when i read the title, i was like a "Wtf is this"
then i open it and i was like "Oh yeah, nice job"
You probably thought I was taking drugs when you saw the title lmao


Re: [Inc+FS]BTTF: Time travelling system - Ronaldo_raul™ - 16.02.2012

Quote:
Originally Posted by king_hual
Посмотреть сообщение
I thought about that one. Didn't have time tho, I'll probably update it anyway.
I would love to see that update


Re: [Inc+FS]BTTF: Time travelling system - MP2 - 16.02.2012

That's an awesome idea - but apart from being awesome, what practical use does it have?


Re: [Inc+FS]BTTF: Time travelling system - KingHual - 16.02.2012

Quote:
Originally Posted by MP2
Посмотреть сообщение
That's an awesome idea - but apart from being awesome, what practical use does it have?
It has the use of being an awesome idea. Nah, well, for example, you could make a time-travelling RP server. Player would have to build a machine for their car and travel within a range of years. Prices will be higher with every year, so if it's 1950 a soda would cost 10$, if it's 1980, a soda would cost 20$. Also, you could travel from the future to the past and sell better cars for bigger prices, because, they haven't been created yet There are alot of uses tbh. Mainly businesses. You could buy something for half the price in the '20s and sell it for full price in the '50s or something like that. Of course, you'll need to repair the time machine, and if your vehicle dies, your time machine dies with it, so u'll have to build a new one (With cash and parts). I've thought of this. I actually thought of making a gamemode exactly like that, called Back to the future, but I can't be bothered with such long scripts...


Re: [Inc+FS]BTTF: Time travelling system - iZN - 17.02.2012

Such an awesome script! Loved the film BTTF <3


Re: [Inc+FS]BTTF: Time travelling system - Lorenc_ - 17.02.2012

Very nice job! Very very unique, haha!

May I add, you should set the player into a height z height and have his velocity go very fast then just teleport him to his destination, would look even more nice (if you understand the concept)


Re: [Inc+FS]BTTF: Time travelling system - Kaperstone - 17.02.2012

nice & unqiue.
btw,y are you crashing the car than fix it?deosn't it better to attach objects to the car insteand of it?


Re: [Inc+FS]BTTF: Time travelling system - Ronaldo_raul™ - 17.02.2012

Quote:
Originally Posted by Lorenc_
Посмотреть сообщение
Very nice job! Very very unique, haha!

May I add, you should set the player into a height z height and have his velocity go very fast then just teleport him to his destination, would look even more nice (if you understand the concept)
Your magician ? How you know what exactly i was thinking :P


Re: [Inc+FS]BTTF: Time travelling system - niyaz - 17.02.2012

Best Include + FS Ever!


Re: [Inc+FS]BTTF: Time travelling system - KingHual - 17.02.2012

Quote:
Originally Posted by Lorenc_
Посмотреть сообщение
Very nice job! Very very unique, haha!

May I add, you should set the player into a height z height and have his velocity go very fast then just teleport him to his destination, would look even more nice (if you understand the concept)
Great suggestion tbh, will probably add it on the next update.