16.02.2012, 16:58
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
3. Public Callbacks
4. Include Installation
To install the include, simply put
under
. 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
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>
Код:
#include <a_samp>
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