private void API_onClientEventTrigger(GrandTheftMultiplayer.Server.Elements.Client sender, string eventName, params object[] arguments)
 {
     if (eventName == "onKeyDown")
     {
         if (!IsPlayerLoggedIn(sender) && DeathManager.IsOnComaPlayer(sender) && IsArrested(sender) && IsOnProgress(sender))
         {
             return;
         }
         // Menu Admin "F1"
         if ((int)arguments[0] == 0)
         {
             Admin.AdminMenu.AdminCommand(sender);
         }
         // Menu Telephone "O"
         else if ((int)arguments[0] == 1)
         {
             Menu.MenuTelephone.OpenMenuTelephone(sender);
         }
         // Menu Joueur "Y"
         else if ((int)arguments[0] == 2)
         {
             Menu.MainInventory.OpenInventory(sender);
         }
         // Change Voice Range "W"
         else if ((int)arguments[0] == 3)
         {
             //GtaLifeTs.ChangeVoiceSystem(sender);
         }
         // UnLock & Delock "U"
         else if ((int)arguments[0] == 4)
         {
             Vehicles.Vehicle.LockUnlockVehOwner(sender);
         }
         // Vehicle Menu "I"
         else if ((int)arguments[0] == 5)
         {
             Menu.MenuVehicle.OpenMenuVehicle(sender);
         }
         // Interaction Key "E"
         else if ((int)arguments[0] == 6)
         {
             if (API.getEntitySyncedData(sender, "InProgress") == false)
             {
                 if (API.hasEntityData(sender, "OnFarmZone") && API.getEntityData(sender, "OnFarmZone") != null)
                 {
                     Farm.InitFarm.StartFarming(sender);
                 }
                 else
                 {
                     GetInteraction(sender);
                 }
             }
         }
         else if ((int)arguments[0] == 7)
         {
             Jobs.Fourriere.TowVehicle(sender);
         }
     }
 }
示例#2
0
 private void API_onClientEventTrigger(GrandTheftMultiplayer.Server.Elements.Client sender, string eventName, params object[] arguments)
 {
     if (eventName == "return_kamyon_selector")
     {
         int _Id = Convert.ToInt32(arguments[0].ToString().Split(')')[0].Replace("(", String.Empty).Trim());
         CompleteYukAl(sender, _Id);
     }
 }
示例#3
0
 private void API_onPlayerDeath(GrandTheftMultiplayer.Server.Elements.Client player, GrandTheftMultiplayer.Shared.NetHandle entityKiller, int weapon)
 {
     API.setEntityData(player, "Hunger", GetPlayerHunger(player) + 5);
     API.setEntityData(player, "Thirsty", GetPlayerThirsty(player) + 5);
     Clients.ClientManager.UpdateHungerAndThirsty(player, GetPlayerHunger(player), GetPlayerThirsty(player));
 }