public static void GiveJobSalary(Player player, eJobs job) { new PlayerInfo(player).GiveMoney(player.GetData <double>(EntityData.PLAYER_JOB_SALARY), jobsInfo[(int)job][0]); Utils.UtilityFuncs.SendPlayerNotify(player, 0, $"+{player.GetData<double>(EntityData.PLAYER_JOB_SALARY)}$"); player.SetData <double>(EntityData.PLAYER_JOB_SALARY, 0.0); }
public static void ShowJobDialog(Player player, eJobs job) { if (player.GetData <eJobs>(EntityData.PLAYER_JOB) == job) { NAPI.ClientEvent.TriggerClientEvent(player, "createWorkDialog", jobsInfo[(int)job][0], "Вы уверенны, что хотите завершить работу?"); } else if (player.GetData <eJobs>(EntityData.PLAYER_JOB) == 0) { player.SetData <eJobs>(EntityData.PLAYER_TEMPJOB, job); NAPI.ClientEvent.TriggerClientEvent(player, "createWorkDialog", jobsInfo[(int)job][0], jobsInfo[(int)job][1]); } else { player.SendChatMessage("Вы уже работаете на другой работе!"); } }