[Include] IEE (InteriorEnterExits)
#1

IEE 1.2
by Mike
Introduction

This simple include allows you to easily and quickly create pickups to teleport players to interiors.

The default pickup looks like this:



However, the pickup model can be changed within the CreateEnterExit function.

Here's a short video of the system in action. The code for the pickups featured in the video can be found below.

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

Changelog

1.2 (22nd of April 2012):
- No longer using y_hooks include
- Added 'OnPlayerEnterExitInterior' callback (OnPlayerEnterExitInterior(playerid, enterexitid, oldinterior, newinterior, Float:x, Float:y, Float:z))
- returning 0 in OnPlayerEnterExitInterior will disable the teleport.

1.1 (21st Jan 2012):
- Now using y_hooks to hook callbacks
- Fixed an issue with using your own pickups alongside this include
- 'world2' parameter in CreateEnterExit now set to -1 by default.
This will prevent the player's world being changed on teleport

1.0 (12th October 2011):
- Initial release

Usage

There are 4 functions in this include:

CreateEnterExit(ieeworld, Float:ieex, Float:ieey, Float:ieez, Float:ieex2, Float:ieey2, Float:ieez2, Float:ieea, ieeinterior, ieeworld2 = -1, ieemsg[] = "", ieemodel=19198 );
- ieeworld: The virtual world to create the pickup in. Use -1 for all worlds.
- ieex, ieey, ieez: The coordinates at which to CREATE the pickup
- ieex2, ieey2, ieez2: The coordinates to teleport players to when they enter the pickup
- ieea: The angle to set for the player when they enter the pickup
- ieeinterior: The interior to set when players enter the teleport
- ieeworld2: The virtual world to set when players enter the teleport. Set to -1 to prevent world being changed
- ieemsg: A message to display to players that enter the pickup (leaving the string empty ( "" ) will show no message, it is empty by default)
- ieemodel: The model to use for the pickup (default is 19198)
Returns: The ID of the 'slot' in which the pickup is in (NOT the actual pickup's ID)

Example as seen in video:

pawn Код:
CreateEnterExit(0, -1605.5649, 711.5371, 13.8672, 246.1845,110.3962, 1003.2257, 2.6308, 10, 0, "Welcome to the {0000FF}San Fierro Police Department{FFFFFF}.");
CreateEnterExit(0, 245.69, 108, 1003.2188, -1605.4934, 714.4520, 12.8833, 0.0, 0, 0, "Left the {0000FF}San Fierro Police Department{FFFFFF}.");
   
CreateEnterExit(0, 1038.1981, -1339.9258, 13.7353, 377.0789, -191.3619, 1000.6328, 0, 17, 0, "Welcome to {8b4513}Jim's Ring{FFFFFF}!");
CreateEnterExit(0, 377.0221, -193.3325,1000.6328, 1038.1012, -1337, 13.7266, 0, 0, 0, "Left {8b4513}Jim's Ring{FFFFFF}. Come again soon!");
DeleteEnterExit(iee_id);
- iee_id - The ID of the enter/exit pickup to delete (returned by CreateEnterExit)
Returns: 1 if the pickup was successfully deleted, 0 on failure

IsEnterExitCreated(iee_id);
- iee_id: The ID to check for exsitance
Returns: 1 if it exists, 0 if not

iee_close();
- No parameters. This function deletes all the pickups and resets the variables. It is not needed in a gamemode. Only use under OnFilterScriptExit (if you use this in a filterscript).
Returns: 1 - always.

Callback
1.2 brings a new callback, OnPlayerEnterExitInterior. This will be called before the teleport, which means you can return 0 in this callback to disable a teleport.

playerid, enterexitid, oldinterior, newinterior, Float:x, Float:y, Float:z
playerid - The ID of the player that entered an IEE
enterexitid - The ID of the enter/exit they entered
oldinterior - Self-explanatory
newinterior - Self-explanatory
x, y, z - The position they will be teleported to

Installation

• Download the .inc file below
• Place it in C:\Program Files\Rockstar Games\GTA San Andreas\pawno\include (or where ever your include folder is)
• Add " #include <iee> " at the top of your gamemode under "#include <a_samp>"
• If you require more than 100 pickups, change the value of MAX_IEE in the .inc file.

NOTE: I have not tested this in a filterscript and gamemode at the same time. Problems may arise. I suggest you only use this include in your gamemode. Not sure why you'd have it in a FS really.

Download

http://pastebin.com/UK2KVqzU
www.movieserv.net/files/iee.inc
http://www.mediafire.com/?i5xzczuoww17pqn

No mirrors please. If the links happen to go down PM me and I'll get another one up.

Thank you!

Please leave a comment below, maybe with a suggestion! Don't forget to report any bugs also please.

Thank you.
Reply


Messages In This Thread
IEE 1.2 (InteriorEnterExits) - Easily create yellow entrance markers with 1 function! [UPDATED] - by MP2 - 12.10.2011, 15:29
Re : IEE (InteriorEnterExits) - by TheBest6 - 12.10.2011, 15:42
Re: IEE (InteriorEnterExits) - by System64 - 12.10.2011, 15:42
Re: IEE (InteriorEnterExits) - by vincee - 01.01.2012, 00:57
Re: IEE (InteriorEnterExits) - by MP2 - 21.01.2012, 19:44
Re: IEE (InteriorEnterExits) - by Kaperstone - 21.01.2012, 19:47
Re: IEE (InteriorEnterExits) - by Danyal - 22.01.2012, 05:35
Re: IEE (InteriorEnterExits) - by Universal - 27.01.2012, 21:57
Re: IEE (InteriorEnterExits) - by Hardware - 28.01.2012, 01:06
Re: IEE (InteriorEnterExits) - by ReneG - 21.02.2012, 03:15
Re: IEE (InteriorEnterExits) - by MP2 - 21.02.2012, 04:26
Re: IEE (InteriorEnterExits) - by mature1990 - 24.02.2012, 04:46
Re: IEE (InteriorEnterExits) - by MP2 - 19.03.2012, 02:16
Respuesta: IEE (InteriorEnterExits) - by juansrc - 19.03.2012, 16:20
Re: Respuesta: IEE (InteriorEnterExits) - by MP2 - 25.03.2012, 04:09
Re: IEE (InteriorEnterExits) - by TheMightyEddy - 02.04.2012, 05:32
Re: IEE (InteriorEnterExits) - by MP2 - 02.04.2012, 05:35
Re: IEE (InteriorEnterExits) - by TheMightyEddy - 02.04.2012, 05:41
Re: IEE (InteriorEnterExits) - by MP2 - 02.04.2012, 06:55
Re: IEE (InteriorEnterExits) - by Spookie98 - 14.04.2012, 14:48
Re: IEE (InteriorEnterExits) - by MP2 - 14.04.2012, 15:38
Re: IEE (InteriorEnterExits) - by Spookie98 - 14.04.2012, 21:27
Re: IEE (InteriorEnterExits) - by MP2 - 14.04.2012, 22:28
Re: IEE (InteriorEnterExits) - by Jonny5 - 15.04.2012, 17:03
Re: IEE (InteriorEnterExits) - by 1337connor - 15.04.2012, 21:08
Re: IEE (InteriorEnterExits) - by MP2 - 15.04.2012, 21:09
Re: IEE (InteriorEnterExits) - by Toreno - 16.04.2012, 06:27
Re: IEE (InteriorEnterExits) - by MP2 - 17.04.2012, 02:15
Re: IEE (InteriorEnterExits) - by Derek_Westbrook - 17.04.2012, 04:45
Re: IEE (InteriorEnterExits) - by Save - 22.04.2012, 00:32
Re: IEE (InteriorEnterExits) - by MP2 - 22.04.2012, 01:42
Re: IEE (InteriorEnterExits) - by MP2 - 22.04.2012, 17:50
Re: IEE (InteriorEnterExits) - by Jonny5 - 22.04.2012, 18:25
Re: IEE (InteriorEnterExits) - by Spooky - 22.04.2012, 18:26
Re: IEE (InteriorEnterExits) - by MP2 - 04.03.2013, 19:42
Re: IEE (InteriorEnterExits) - by nor15 - 04.03.2013, 20:14
Re: IEE (InteriorEnterExits) - by MP2 - 04.03.2013, 20:55
Re: IEE (InteriorEnterExits) - by Yves - 04.03.2013, 21:02

Forum Jump:


Users browsing this thread: 3 Guest(s)