PDA

View Full Version : [Include] [INC] Teleport | 1 line | File & 3D support | 40+ functions | Update: 2010.03.17


[HUN]Gamestar
17/03/2010, 04:58 PM
Teleport Manager

Description
This is simple teleport manager, version 0.9

Developing:

- New command system
- Admin system

Use

To use it add:

#include <teleport.h>

How to create teleport? Simple...

Teleport_New("Farm","/farm",-1049.7108,-1307.3292,128.2483,1.0493);

or

Teleport_LoadFormFile("teleports.txt");

( to teleports.txt:
Farm|/farm|-1049.7108|-1307.3292|128.2483|1.0493|0|0|0|1|100|149|237|255| 40.0|0|4|1|1|0|0|
)

Functions

Command: /teleports

Callbacks
forward OnPlayerTeleport(playerid,teleportid);
If player teleported

forward OnPlayerCallingTeleport(playerid,teleportid);
If player calling teleport, to fail use return 0/false

forward OnPlayerFailedTeleport(playerid,teleportid);
If teleporting failed

forward OnPlayerStartingObjectLoad(playerid);
Object load start

forward OnPlayerEndingObjectLoad(playerid);
Object load end

Create, Remove etc...
native Teleport_New(name[], cmd[], Float:x,Float:y,Float:z,Float:angle,interior=0,wor ldid=0,prize=0, bool:text3d = true,text3dcolor = TELEPORT_3D_DEFAULT_COLOR, Float:text3ddrawd = TELEPORT_3D_DEFAULT_DRAWD,bool:objectloader = false, objectltime = 2500, bool:foot = true, bool:vehicle = true,bool:drivermode = true, bool:adminonly = false);
native Teleport_Remove(teleportid);
native Teleport_CountAll();
native Teleport_LittleID();
native Teleport_HighestID();
native Teleport_IsActive( teleportid );
native Teleport_IsValid( teleportid );

3D Text
native Teleport_IsValid3Dtext(teleportid);
native Teleport_Toggle3Dtext(teleportid,toggle);
native Teleport_IsUsing3Dtext(teleportid);
native Teleport_SetText3Dcolor(teleportid, color);
native Teleport_GetText3Dcolor(teleportid);
native Teleport_Set3DtextDrawDistance(teleportid, Float:distance);
native Teleport_Get3DtextDeawDistance(teleportid, &Float:dis);

File
native Teleport_LoadFormFile(handle[]);
native Teleport_SaveToFile(...);
native Teleport_SaveToFileEx(teleportid,file[]);

Other
native Teleport_ToggleDriverMode(teleportid, toggle); (anti passenger's teleport in vehicle)
native Teleport_IsUsingDriverMode(teleportid);
native Teleport_ToggleAdminOnly( teleportid,toggle ); (for RCON admins)
native Teleport_IsAdminOnly( teleportid );
native Teleport_SetLoaderTime( teleportid,time_second );
native Teleport_GetLoaderTime( teleportid );
native Teleport_ToggleFoot( teleportid,toggle );
native Teleport_IsUsingFoot( teleportid );
native Teleport_ToggleVehicle( teleportid,toggle );
native Teleport_IsUsingVehicle( teleportid );
native Teleport_ToggleObjectLoader(teleportid,toggle);
native Teleport_IsUsingObjectLoader(teleportid);
native Teleport_SetPrize(teleportid,prize);
native Teleport_GetPrize(teleportid);
native Teleport_SetPos(teleportid,Float:x,Float:y,Float:z ,Float:angle);
native Teleport_GetPos(teleportid,&Float:x,&Float:y,&Float:z,&Float:angle);
native Teleport_SetInterior(teleportid,interiorid);
native Teleport_GetInterior(teleportid);
native Teleport_SetVirtualWorld(teleportid,worldid);
native Teleport_GetVirtualWorld(teleportid);
native Teleport_SetName(teleportid,name[]);
native Teleport_GetName(teleportid,name[],len);
native Teleport_SetCommand(teleportid,cmd[]);
native Teleport_GetCommand(teleportid,cmd[],len);
native Teleport_GetIDByCommand(command[]);

Download

English
http://solidfiles.com/info_imgs/eEWF.jpg (http://solidfiles.com/d/eEWF)

Hungarian
http://solidfiles.com/info_imgs/GA0F.jpg (http://solidfiles.com/d/GA0F)

Enjoy!

Sorry for my bad English...

§Adas§
17/03/2010, 05:01 PM
Wow, looks awesome!

Fre$hKidd
17/03/2010, 05:05 PM
Insane :D

Kurence
17/03/2010, 05:10 PM
lol, teleport.h? what is this c++? :lol:

[HUN]Gamestar
17/03/2010, 05:11 PM
Thanks.


lol, teleport.h? what is this c++? :lol:


No, simple include.

#include <teleport.h>

Kurence
17/03/2010, 05:13 PM
but all other includes are .inc... no, never mind :P

Scream[SM]
17/03/2010, 05:21 PM
Kurence: The callback-library (include) can be written in .h filetype :D
And, I'm write my inc's .h too
Gamestar, nice work anyway ;)

sorry for my bad english

[HUN]Gamestar
17/03/2010, 05:35 PM
Yes, thanks.

Kurence
17/03/2010, 05:43 PM
But Seif is making it in .inc form too :D and my object editor is saving files in .kurence format :mrgreen:

§Adas§
17/03/2010, 06:51 PM
omg :D

Haji
17/03/2010, 10:41 PM
nice.

Poderoso Chef„o
18/03/2010, 09:45 AM
nice script!
thanks!!!

[HUN]Gamestar
18/03/2010, 02:06 PM
Thanks. :)

Hiitch
18/03/2010, 02:34 PM
Nice work, it actually cleans up my code a little bit.

[HUN]Gamestar
21/03/2010, 06:05 PM
UPDATED! REDOWNLOAD!


Thanks

Brian_Furios
24/03/2010, 03:41 PM
awesome script... i'd like this for my DM GM

Snoooopy
24/03/2010, 04:39 PM
Nice

[Hun]SnicKerS
26/03/2010, 12:21 PM
Nice Work

[HUN]Gamestar
10/06/2010, 08:22 PM
Thanks