Simply install to your project:
sampctl package install CnRXoMoX/X_Enex
Include in your code and begin using the library:
#include <X_Enex>
Usage
public OnGamemodeInit()
{
Enex_Create(207.6328, -61.6965, 1.9766, 179.7099, 286.1490, -40.6444, 1001.5156, 358.6616, 1, 1); // Ammunation near Blueberry
}
Usage
new id;
id = Enex_Create();
Enex_SetIcon(id, 28); // For more icon ids visit the Wiki
Usage
new id;
id = Enex_Create();
Enex_SetName(id, "Ammunation");
Get player's interior's name if the Interior have Enex_SetName
Usage
new id;
id = Enex_Create();
Enex_EnableFreeze(id, true); // Do not add if you don't want Freeze
Usage
new id;
id = Enex_Create();
Enex_Disable(id, true) // If you want to Disable the Enex if someone enters player will not be teleported means closed
public OnPlayerEnterEnEx(playerid, enexid)
{
SendClientMessage(playerid, -1, "You're entering an EnEx!");
return 1;
}
public OnPlayerExitEnEx(playerid, enexid)
{
SendClientMessage(playerid, -1, "You're exiting an EnEx!");
return 1;
}
public OnPlayerEnteredEnEx(playerid, enexid)
{
SendClientMessage(playerid, -1, "You've successfuly entered an EnEx!);
return 1;
}
To test, simply run the package:
sampctl package run