X_Enex
Installation
Simply install to your project:
sampctl package install CnRXoMoX/X_Enex
Include in your code and begin using the library:
#include <X_Enex>
Usage
Enex_Create(entX, entY, entZ, entAng, exiX, exiY, exiZ, exiAng, worldid, interior)
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
}
Enex_SetIcon(id, iconid)
Usage
new id;
id = Enex_Create();
Enex_SetIcon(id, 28); // For more icon ids visit the Wiki
Enex_SetName(id, const name[])
Usage
new id;
id = Enex_Create();
Enex_SetName(id, "Ammunation");
Enex_PlayerIn(playerid)
Get player's interior's name if the Interior have Enex_SetName
Enex_EnableFreeze(id, bool:status)
Usage
new id;
id = Enex_Create();
Enex_EnableFreeze(id, true); // Do not add if you don't want Freeze
Enex_Disable(id, bool:status)
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
Callbacks
OnPlayerEnterEnEx(playerid, enexid)
public OnPlayerEnterEnEx(playerid, enexid)
{
SendClientMessage(playerid, -1, "You're entering an EnEx!");
return 1;
}
OnPlayerExitEnEx(palyerid, enexid)
public OnPlayerExitEnEx(playerid, enexid)
{
SendClientMessage(playerid, -1, "You're exiting an EnEx!");
return 1;
}
OnPlayerEnteredEnEx(playerid, enexid)
public OnPlayerEnteredEnEx(playerid, enexid)
{
SendClientMessage(playerid, -1, "You've successfuly entered an EnEx!);
return 1;
}
Testing
To test, simply run the package:
sampctl package run