[REL 5] Teleport Engine 3.0 [1 line = 1 teleport, 40+ function] -
GameStar. - 18.08.2011
:: Teleport Engine ::
I'm sorry, I do not speak English. This system began to develop at the end of 2009, then stopped. Not long ago I was again, and I have developed.
Features- 3D text embedding
- Object loader for custom objects
- Enable/Disable "in-vehicle-teleport" / Enable/Disable "on-foot-teleport" / Enable/Disable "in-vehicle-driver-teleport" / Enable/Disable "rcon-only-teleport"
- Global teleports
etc.
It's simple:
pawn Code:
CreateTeleport("SF","/sf",-1495.9395,-141.1882,15.0702,315.0674);
Presentation:
How to save teleport in-game? (sscanf2 plugin by ****** is required to use this command!)
pawn Code:
CMD:saveteleport(playerid, params[])
{
#if !defined MAX_TELEPORT_NAMELEN
#define MAX_TELEPORT_NAMELEN 32
#endif
#if !defined MAX_TELEPORT_CMDLEN
#define MAX_TELEPORT_CMDLEN 32
#endif
new name[MAX_TELEPORT_NAMELEN],command[MAX_TELEPORT_CMDLEN];
if(sscanf(params, "s[32]s[32]", name, command))
return SendClientMessage(playerid,0xFFFFFFFF, "Use: /saveteleport [name][command]");
new File:savedteleports = fopen("savedteleports.txt", io_write);
if(savedteleports)
{
new Float:x, Float:y, Float:z, Float:angle;
if(IsPlayerInAnyVehicle(playerid))
{
new vehicleid = GetPlayerVehicleID(playerid);
GetVehiclePos(vehicleid,x,y,z);
GetVehicleZAngle(vehicleid,angle);
} else {
GetPlayerPos(playerid,x,y,z);
GetPlayerFacingAngle(playerid,angle);
}
new formatstring[256];
format(formatstring, 256, "CreateTeleport(\"%s\", \"%s\", %.3f, %.3f, %.3f, %.3f);\r\n",
name, command, x, y, z, angle);
fwrite(savedteleports, formatstring);
fclose(savedteleports);
SendClientMessage(playerid,0xFFFFFFFF, "Teleport saved to savedteleports.txt (in your scriptfiles folder).");
}
return 1;
}
Format 3Dtext:
Tags:
{NAME} - Name of teleport
{COMMAND} - Command of teleport
{PRICE} - Price of teleport
{NEWLINE} - New line
{RRGGBB}(samp) - Color of text
Function: Teleport_Set3DTextFormat
Example:
pawn Code:
public OnFilterScriptInit()
{
new teleportid = CreateTeleport("LS","/ls",1933.2625,-2407.8191,14.2618,183.6625);
Teleport_Set3DTextFormat(teleportid, "{0522FF}Name: {FFFFFF}{NAME}{NEWLINE}{0522FF}Command: {FFFFFF}{COMMAND}{NEWLINE}{0522FF}Price: {FFFFFF}{PRICE}");
return 1;
}
(I added this as default format)
Result:
Object loader:
pawn Code:
CreateTeleport("LV","/lv",1655.7760,1594.6162,10.6581,90.4822, .objectloader = true);
pawn Code:
public OnPlayerStartingObjectLoad(playerid, time)
{
new Float:x, Float:y, Float:z;
if(IsPlayerInAnyVehicle(playerid))
{
new vehicleid = GetPlayerVehicleID(playerid);
GetVehiclePos(vehicleid,x,y,z);
SetVehiclePos(vehicleid,x,y,z + 2.8);
} else {
GetPlayerPos(playerid,x,y,z);
SetPlayerPos(playerid,x,y,z + 2.8);
}
GameTextForPlayer(playerid, "~r~Objects loading~w~...", 2000, 1);
return 1;
}
Result:
Callbacks:
- OnPlayerCallingTeleport
- OnPlayerFailedTeleport
- OnPlayerTeleport
- OnPlayerStartingObjectLoad
- OnPlayerEndingObjectLoad
Functions:
- CreateTeleport as Teleport_New
- DestroyTeleport as Teleport_Remove
- CountTeleports as Teleport_CountAll
- GetLittleTeleportID as Teleport_LittleID
- GetHighestTeleportID as Teleport_HighestID
- IsActiveTeleport as Teleport_IsActive
- IsValidTeleport as Teleport_IsValid
- IsTeleportIsValid3D as Teleport_IsValid3Dtext
- ToggleTeleport3D as Teleport_Toggle3Dtext
- TeleportIsUse3D as Teleport_IsUsing3Dtext
- SetTeleport3DColor as Teleport_SetText3Dcolor
- GetTeleport3DColor as Teleport_GetText3Dcolor
- SetTeleport3DDrawDistance as Teleport_Set3DtextDrawDistance
- GetTeleport3DDrawDistance as Teleport_Get3DtextDeawDistance
- ToggleTeleportDriverMode as Teleport_ToggleDriverMode
- IsTeleportDriverMode as Teleport_IsUsingDriverMode
- ToggleTeleportAdminOnly as Teleport_ToggleAdminOnly
- IsTeleportAdminOnly as Teleport_IsAdminOnly
- SetTeleportLoaderTime as Teleport_SetLoaderTime
- GetTeleportLoaderTime as Teleport_GetLoaderTime
- ToggleTeleportOnFoot as Teleport_ToggleFoot
- IsTeleportOnFoot as Teleport_IsUsingFoot
- ToggleTeleportVehicle as Teleport_ToggleVehicle
- IsTeleportVehicle as Teleport_IsUsingVehicle
- ToggleTeleportObjectLoader as Teleport_ToggleObjectLoader
- IsTeleportObjectLoader as Teleport_IsUsingObjectLoader
- SetTeleportPrice as Teleport_SetPrice
- GetTeleportPrice as Teleport_GetPrice
- SetTeleportPos as Teleport_SetPos
- GetTeleportPos as Teleport_GetPos
- SetTeleportInterior as Teleport_SetInterior
- GetTeleportInterior as Teleport_GetInterior
- SetTeleportVirtualWorld as Teleport_SetVirtualWorld
- GetTeleportVirtualWorld as Teleport_GetVirtualWorld
- SetTeleportName as Teleport_SetName
- GetTeleportName as Teleport_GetName
- SetTeleportCommand as Teleport_SetCommand
- GetTeleportCommand as Teleport_GetCommand
- DestroyAllTeleport as Teleport_RemoveAll
Download:
REL 3 (PACK)
http://solidfiles.com/d/c3d0b/
And
REL 5 (INC, added 3dtext format):
http://solidfiles.com/d/abb0f/
Thanks to:
- Incognito - GVar
- ZeeX - ZCMD
- Betamaster - Colour
- Westie - strreplace function
- ******
PS: if someone can speak English, you really prepare a good description!
Re: [REL 3] Teleport Engine (3.0) (1 line = 1 teleport) -
Rock_Ro - 18.08.2011
Awesome.
If you can make a better description will be MORE Awesome
Re: [REL 3] Teleport Engine (3.0) (1 line = 1 teleport) -
ft941 - 18.08.2011
Very useful for the beginner and for who do not want to waste time... I downloaded it and is really well done, and very complete. Nice script man!
Re: [REL 3] Teleport Engine (3.0) (1 line = 1 teleport) -
FireCat - 18.08.2011
Very usefull!!
10/10
Re: [REL 3] Teleport Engine (3.0) (1 line = 1 teleport) -
Gh0sT_ - 18.08.2011
Nice, but
GetLittleTeleportID as Teleport_LittleID
useless, I think? because it will be 1 always, I think?
Re: [REL 3] Teleport Engine (3.0) (1 line = 1 teleport) -
GameStar. - 18.08.2011
It is not always.
Example:
pawn Code:
public OnFilterScriptInit()
{
new tele1 = CreateTeleport("SF","/sf",-1495.9395,-141.1882,15.0702,315.0674);
new tele2 = CreateTeleport("SF2","/sf2",-1495.9395,-141.1882,15.0702,315.0674);
CreateTeleport("SF3","/sf3",-1495.9395,-141.1882,15.0702,315.0674);
DestroyTeleport(tele1);
DestroyTeleport(tele2);
printf("Little ID: %i",GetLittleTeleportID());
return 1;
}
But it really does not make much sense.
Re: [REL 3] Teleport Engine (3.0) (1 line = 1 teleport) -
Kaperstone - 19.08.2011
awasome
will use!
thanks!
Re: [REL 3] Teleport Engine (3.0) (1 line = 1 teleport) -
SpiderWalk - 19.08.2011
Very usefull!!
11/10
Re: [REL 3] Teleport Engine (3.0) (1 line = 1 teleport) -
doreto - 19.08.2011
amasome 10/10
Re: [REL 3] Teleport Engine (3.0) (1 line = 1 teleport) -
GameStar. - 19.08.2011
Thanks. Added /saveteleport command.
Re: [REL 3] Teleport Engine (3.0) (1 line = 1 teleport) -
GameStar. - 23.08.2011
Update:
Format 3Dtext:
Tags:
{NAME} - Name of teleport
{COMMAND} - Command of teleport
{PRICE} - Price of teleport
{NEWLINE} - New line
{RRGGBB}(samp) - Color of text
Function: Teleport_Set3DTextFormat
Example:
pawn Код:
public OnFilterScriptInit()
{
new teleportid = CreateTeleport("LS","/ls",1933.2625,-2407.8191,14.2618,183.6625);
Teleport_Set3DTextFormat(teleportid, "{0522FF}Name: {FFFFFF}{NAME}{NEWLINE}{0522FF}Command: {FFFFFF}{COMMAND}{NEWLINE}{0522FF}Price: {FFFFFF}{PRICE}");
return 1;
}
(I added this as default format)
Result:
Re: [REL 3] Teleport Engine (3.0) (1 line = 1 teleport) -
Pinguinn - 23.08.2011
Nice script
Re: [REL 3] Teleport Engine (3.0) (1 line = 1 teleport) -
NeyMar96 - 27.08.2011
How to create teleport?
Re: [REL 3] Teleport Engine (3.0) (1 line = 1 teleport) -
System64 - 27.08.2011
good job man, a lot of functions
+1
Re: [REL 3] Teleport Engine (3.0) (1 line = 1 teleport) -
NeyMar96 - 27.08.2011
Quote:
Originally Posted by NeyMar96
How to create teleport?
|
?