Added Job Quit to Interaction -> JOB
This commit is contained in:
@@ -464,6 +464,23 @@ export default function (globalData: IGlobalData) {
|
||||
wageItem.SetRightLabel("$" + jobdata.wage.toString())
|
||||
}
|
||||
jobMenu.AddItem(wageItem);
|
||||
|
||||
if (jobdata.isActive) {
|
||||
var quitJobItem = new UIMenuItem("Job Beenden", "Beendet den Job und bringt dich zurück zur Base")
|
||||
jobMenu.AddItem(quitJobItem);
|
||||
quitJobItem.HighlightedBackColor = new Color(213, 0, 0);
|
||||
quitJobItem.BackColor = new Color(229, 57, 53);
|
||||
|
||||
jobMenu.ItemSelect.on((item, index) => {
|
||||
if (item == quitJobItem) {
|
||||
mp.events.callRemote("CLIENT:Job_StopJob");
|
||||
jobMenu.Close(true);
|
||||
mp.gui.chat.activate(true);
|
||||
globalData.InMenu = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
jobMenu.Visible = false;
|
||||
mp.gui.chat.show(false);
|
||||
return jobMenu;
|
||||
|
||||
Reference in New Issue
Block a user