private void OnResourceStart(string resourceName) { if (GetCurrentResourceName() != resourceName) { return; } RegisterCommand("JobInfo", new Action <int, List <object>, string>(JobInfo), false); RegisterCommand("JobExist", new Action <int, List <object>, string>(JobExist), false); RegisterCommand("SaveMe", new Action <int, List <object>, string>(SaveMe), false); RegisterCommand("SaveAll", new Action <int, List <object>, string>(SaveAll), false); RegisterCommand("AddWeapon", new Action <int, List <object>, string>(AddWeapon), false); RegisterCommand("DelWeapon", new Action <int, List <object>, string>(DelWeapon), false); RegisterCommand("GiveWeaponAmmo", new Action <int, List <object>, string>(GiveWeaponAmmo), false); RegisterCommand("WeaponInfo", new Action <int, List <object>, string>(WeaponInfo), false); RegisterCommand("LoadoutInfo", new Action <int, List <object>, string>(LoadoutInfo), false); RegisterCommand("SetWeaponTint", new Action <int, List <object>, string>(SetWeaponTint), false); RegisterCommand("GetAccounts", new Action <int, List <object>, string>(GetAccounts), false); RegisterCommand("UseItem", new Action <int, List <object>, string>(UseItem), false); RegisterCommand("GetPosition", new Action <int, List <object>, string>(GetPosition), false); ESX.RegisterUsableItem("testItem", new Action <int>((int source) => { Debug.WriteLine(ESX.GetPlayerFromId(source).GetName() + " used 'testItem'"); })); ESX.RegisterUsableItem("testItem2", new Action <int>((source) => { Debug.WriteLine(ESX.GetPlayerFromId(source).GetName() + " used 'testItem2'"); })); ESX.RegisterServerCallback("esx_testScript:testCallBack", new Action <int, CallbackDelegate, dynamic>(TestCallback)); }