24 lines
607 B
Plaintext
24 lines
607 B
Plaintext
|
#include "nui_i_main"
|
||
|
|
||
|
void main()
|
||
|
{
|
||
|
int nEvent = GetCurrentlyRunningEvent();
|
||
|
|
||
|
if (nEvent == EVENT_SCRIPT_MODULE_ON_MODULE_LOAD)
|
||
|
{
|
||
|
SetEventScript(GetModule(), EVENT_SCRIPT_MODULE_ON_NUI_EVENT, "mod_events");
|
||
|
SetEventScript(GetModule(), EVENT_SCRIPT_MODULE_ON_PLAYER_TARGET, "mod_events");
|
||
|
|
||
|
NUI_Initialize();
|
||
|
NUI_HandleEvents();
|
||
|
}
|
||
|
else if (nEvent == EVENT_SCRIPT_MODULE_ON_NUI_EVENT)
|
||
|
{
|
||
|
NUI_HandleEvents();
|
||
|
}
|
||
|
else if (nEvent == EVENT_SCRIPT_MODULE_ON_PLAYER_TARGET)
|
||
|
{
|
||
|
NUI_HandleEvents(GetLastPlayerToSelectTarget());
|
||
|
}
|
||
|
}
|