/* IEE 1.2 by Mike (MP2) ### Changelog ### 1.2: - 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: - 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: - Initial release */ // The 3 lines here will allow you to type "CreateEnterExit(" into pawno and a message will apear with the parameters in - useful as there's quite a few parameters /* native CreateEnterExit(ieeworld, Float:ieex, Float:ieey, Float:ieez, Float:ieex2, Float:ieey2, Float:ieez2, Float:ieea, ieeinterior, ieeworld2, ieemsg[] = "", ieemodel=19198); native DeleteEnterExit(iee_id); native IsEnterExitCreated(iee_id); */ forward OnPlayerEnterExitInterior(playerid, enterexitid, oldinterior, newinterior, Float:x, Float:y, Float:z); #define IEE_COLOR 0xFFFFFFFF // Color for messages #define PICKUP_HEIGHT_ADDITION 0.4 // Perfect height for using /save to get coordinates #define MAX_IEE 500 // Maximum number of interior enter/exits enum iee_enum { iee_created, // Stored whether a pickup 'slot' is used iee_pickupid, // The ID of the pickup Float:iee_x, // Coordinate of teleport Float:iee_y, // Coordinate of teleport Float:iee_z, // Coordinate of teleport Float:iee_a, // Angle of teleport iee_int, // Interior of teleport iee_world, // World of teleport iee_msg[128] // A message to display to players when they enter the pickup }; new iee_data[MAX_IEE][iee_enum]; public OnPlayerPickUpPickup(playerid, pickupid) { for(new i=0; i MAX_IEE-1) return 0; if(iee_data[iee_id][iee_created] == 0) return 0; DestroyPickup(iee_data[iee_id][iee_pickupid]); iee_data[iee_id][iee_created] = 0; return 1; } /* IsEnterExitCreated iee_id - The ID of the enter/exit to check for existance RETURNS: This function returns 1 if the enter/exit exists or 0 if not */ stock IsEnterExitCreated(iee_id) { if(iee_id > MAX_IEE-1) return 0; if(iee_data[iee_id][iee_created] == 0) return 0; return 1; } // Internal stock iee_close() // Destroys all interior enter/exits - place " iee_close(); " under your OnGameModeExit callback. { for(new i=0; i