[Include] [INC] Advanced Teleports! V. 1.0
#1

[size=21px]Advanced Teleports - Include by [MFC]Sylar - Version 1.00![/size]
Hi! this is my first Include.

It's about advanced Teleports. Why am I relasing this? because this forum helped me a lot, when i needed help I almost always got it. And also downloaded scripts, maps, etc. Thank you a lot!

_________________________________________________
Theese are the functions:
pawn Code:
native SetOnFootPos(playerid, Float:x, Float:y, Float:z, Float:a, interior);
native SetCarPos(playerid, Float:Vx, Float:Vy, Float:Vz, Float:Va, Float:Px, Float:Py, Float:Pz, Float:Pa, interior);
native SetXCarPos(playerid, Float:Vx, Float:Vy, Float:Vz, Float:Va, Float:Px, Float:Py, Float:Pz, Float:Pa, interior, VehicleModel);
native SetSkinPlayerCarPos(playerid, Float:Vx, Float:Vy, Float:Vz, Float:Va, Float:Px, Float:Py, Float:Pz, Float:Pa, interior, PSkin);
native SetOnFootSkinPos(playerid, Float:x, Float:y, Float:z, Float:a, interior, PSkin);
native SetCarIdPos(playerid, Float:Vx, Float:Vy, Float:Vz, Float:Va, interior, Vid);
native SetHealthPos(playerid, Float:Px, Float:Py, Float:Pz, Float:Pa, interior, toggle:TeleportCar, Float:Health);
native SetArmourPos(playerid, Float:Px, Float:Py, Float:Pz, Float:Pa, interior, toggle:TeleportCar, Float:Armour);
native SetMoneyPos(playerid, Float:Px, Float:Py, Float:Pz, Float:Pa, interior, toggle:TeleportCar, money);
// native SetTeamPlayerPos(playerid, Float:Px, Float:Py, Float:Pz, Float:Pa, interior, toggle:TeleportCar, const Team[]); // Not working ATM
native SetScorePos(playerid, Float:Px, Float:Py, Float:Pz, Float:Pa, interior, toggle:TeleportCar, playerscore);
_________________________________________________

Changelog;
Quote:

Ver. 0.1 ---> Ver. 1.00

Added: SetCarIdPos
Added: SetHealthPos
Added: SetArmourPos
Added: SetMoneyPos
Added: SetTeamPlayerPos
Added: SetScorePos
Deleted: SetNrgPos
_________________________________________________
*Please Note the following: All funcions come with the TogglePlayerControllable if you are using a Menu.
_________________________________________________
pawn Code:
SetOnFootPos(playerid, Float:x, Float:y, Float:z, Float:a, interior);
This function is like SetPlayerPos, but with an Interior function, and the Player Angle (Pa). An Example:

pawn Code:
SetOnFootPos(playerid, 2014.254, 1024.2521, 321.45255, 210.0, 0);
_________________________________________________

pawn Code:
SetCarPos(playerid, Float:Vx, Float:Vy, Float:Vz, Float:Va, Float:Px, Float:Py, Float:Pz, Float:Pa, interior);
This is a basic function, V = Vehicle, P = Player. You set all three coords, the angle for each State. And obviously the Interior. If you are in a Vehicle you'll be teleported to de Vehicle Location, else you'll be teleported to the Player Location.

pawn Code:
SetCarPos(playerid, 531.0353, 3421.0355, 321.3503, 214.0, 2014.254, 1024.2521, 321.45255, 0)
_________________________________________________

pawn Code:
SetXCarPos(playerid, Float:Vx, Float:Vy, Float:Vz, Float:Va, Float:Px, Float:Py, Float:Pz, Float:Pa, interior, Vmodel);
The same as the SetCarPos. But it will only teleport you to the Vehicle Location if you are on a Specific Vehicle Model (Vmodel). Else you'll be teleported on foot to the Player normal Location.

pawn Code:
SetXCarPos(playerid, 531.0353, 3421.0355, 321.3503, 214.0, 2014.254, 1024.2521, 321.45255, 0, 288)
_________________________________________________

pawn Code:
SetSkinPlayerCarPos(playerid, Float:Vx, Float:Vy, Float:Vz, Float:Va, Float:Px, Float:Py, Float:Pz, Float:Pa, interior, PSkin);
This function would be the same as the "SetCarPos" or "SetXCarPos" The difference here would be, you need a Specific Skin for the teleport, if you don't have that skin you will not be teleported to ANY of that locations! You will also recive an error Message if you haven't that Skin. No Examples Needed.

_________________________________________________

pawn Code:
SetOnFootSkinPos(playerid, Float:x, Float:y, Float:z, Float:a, interior, PSkin);
The same as Above, but only the Player will get teleported, not the car . You will also recive an error Message if you haven't that Skin. No Examples Needed.

_________________________________________________

pawn Code:
SetCarIdPos(playerid, Float:Vx, Float:Vy, Float:Vz, Float:Va, interior, Vid);
This is like "SetXCarPos" but the difference is that if you aren't in the specified auto you'll get an Error message (telling you in wich vehicle you need to be) and you Wont teleport.

_________________________________________________

pawn Code:
SetHealthPos(playerid, Float:Px, Float:Py, Float:Pz, Float:Pa, interior, toggle:TeleportCar, Float:Health);
Here you need to have certain Health to teleport. Here i changed the whole include a bit, now you have a "Toggle" that will (or not) teleport the car. If it is true, and you have enough Health you will teleport with a Car (if you are in one), else you wont, or if it's toggled false your vehicle wont teleport.

pawn Code:
SetHealthPos(playerid, 325.3212, 321.242, 102.254, 90.0, 0, true, 100.0);
_________________________________________________

pawn Code:
SetArmourPos(playerid, Float:Px, Float:Py, Float:Pz, Float:Pa, interior, toggle:TeleportCar, Float:Armour);
Same as above, but using Armour.

_________________________________________________

pawn Code:
SetMoneyPos(playerid, Float:Px, Float:Py, Float:Pz, Float:Pa, interior, toggle:TeleportCar, money);
Here you need to pay money for teleporting. If you don't have money you'll recive an error message telling you how much you need, else you will teleport and you will loose your money.

_________________________________________________

pawn Code:
SetTeamPlayerPos(playerid, Float:Px, Float:Py, Float:Pz, Float:Pa, interior, toggle:TeleportCar, const Team[]);
Not working ATM! -> Normal teleport, but you need to be in a certain Team to teleport.

_________________________________________________

pawn Code:
SetScorePos(playerid, Float:Px, Float:Py, Float:Pz, Float:Pa, interior, toggle:TeleportCar, playerscore);
You need to have certain Score to teleport! Note: You won't loose your score!

_________________________________________________
_________________________________________________

[size=18px]Getting Started!:[/size]
First of All, download this:

In your script:
_________________________________________________

At the first of your Script/GM you need to have this (Under "#include <a_samp>")

pawn Code:
#include <MFC-Teleports> // Advanced Teleports by [MFC]Sylar
_________________________________________________

Two examples to know how to use this Cmd's: (in different contexts)
In a Menu:
pawn Code:
case 0: //================ Area 51 - Army Skin Only!
    {
    SetSkinPlayerCarPos(playerid, 308.2827,1989.2064,17.6406, 0.0, 308.2827,1989.2064,17.6406, 0.0, 0, 287);
    }
_________________________________________________

With a command:
pawn Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/Area51", cmdtext, true) == 0)
    {
    SetSkinPlayerCarPos(playerid, 308.2827,1989.2064,17.6406, 0.0, 308.2827,1989.2064,17.6406, 0.0, 0, 287);
    }
return 0;
}
_________________________________________________
_________________________________________________

[size=16px]Also you can add in your script:[/size]
At the top:
pawn Code:
#define A SetOnFootPos
#define B SetCarPos

// etc. You can add shortly abreviations for the functions if you want.
Note: Don't use as define things like "A". You will obvioulsy get +26 errors. Set it like SetPP, or whatever, or use it as it is

Example:
pawn Code:
#include <TeleInclude_By_[MFC]Sylar> // Advanced Teleports by [MFC]Sylar
#define SOFP SetOnFootPos

public OnPlayerSpawn(playerid)
{
SOFP(playerid, 10.0, 10.0, 10.0, 10.0, 0);
}
TESTED!

_________________________________________________
_________________________________________________

[size=18px]In the future Versions:[/size]
pawn Code:
SetAdminPos ( For RCON admin teleports)
SetCheckpointPos ( You will need to be in X checkpoint to teleport)
SetIsInAreaPos ( Same as above, but not a checkpoint, an area)
SetDeathmatchPos(playerid, x, y, z, a, wep_1, bullets, wep_2, bullets, wep_3, bullets, wep_4, bullets, interior); //A Teleport that gives you up to 4 (or more) weapons. Used For deathmatch
_________________________________________________
_________________________________________________

[size=16px]Notes:[/size]
1) Sorry for my bad English
2) Any suggestion for Functions will be really apreciated!
3) If you find any bugs please tell me
4) You don't have to give me credits; but don't relase it, or resell it, without my permission.
5) I added my ideas above, so add yours too
6) Click Here if you wanna know the ID's of anything you want (interiors, cars, skins, etc.)

_________________________________________________
_________________________________________________

Hope you all like it, is my first include

Special Thanks to: Weirdospot (Helped with the CarId func.)

See ya!!!!

_________________________________________________

[MFC]Sylar

Reply


Messages In This Thread
[INC] Advanced Teleports! V. 1.0 - by MarcoNecroX - 12.05.2009, 22:51
Re: [INC] Advanced Teleports! - by *ToM* - 12.05.2009, 22:58
Re: [INC] Advanced Teleports! - by Weirdosport - 13.05.2009, 11:16
Re: [INC] Advanced Teleports! - by hk_shade - 13.05.2009, 13:43
Re: [INC] Advanced Teleports! - by MarcoNecroX - 13.05.2009, 18:21
Re: [INC] Advanced Teleports! - by BeckzyBoi - 13.05.2009, 19:23
Re: [INC] Advanced Teleports! - by James_Alex - 13.05.2009, 20:35
Re: [INC] Advanced Teleports! - by Weirdosport - 13.05.2009, 21:32
Re: [INC] Advanced Teleports! - by MarcoNecroX - 13.05.2009, 21:34
Re: [INC] Advanced Teleports! - by Weirdosport - 13.05.2009, 21:41
Re: [INC] Advanced Teleports! - by MarcoNecroX - 14.05.2009, 04:36
Re: [INC] Advanced Teleports! V. 1.0 - by MarcoNecroX - 15.05.2009, 04:02

Forum Jump:


Users browsing this thread: 1 Guest(s)