示例#1
0
 public static Vector3 GetLastPosition(this GTANetworkAPI.Client player)
 {
     if (player.Account() == null)
     {
         return(null);
     }
     return(player.Account().LastPosition);
 }
示例#2
0
 public static bool Save(this GTANetworkAPI.Client player)
 {
     if (player.Account() == null)
     {
         return(false);
     }
     return(player.Account().Save());
 }
示例#3
0
 public static Account GetExtension(this GTANetworkAPI.Client player)
 {
     if (!player.HasData("extension"))
     {
         return(null);
     }
     return(player.GetData("extension"));
 }
示例#4
0
        public static CItem GiveItem(this GTANetworkAPI.Client player, uint item, byte?x = null, byte?y = null)
        {
            if (player.Account() == null)
            {
                return(null);
            }

            return(player.Account().Inventory.GiveItem(item, x, y));
        }
示例#5
0
        public static bool GiveItem(this GTANetworkAPI.Client player, CItem item, byte?x = null, byte?y = null)
        {
            if (player.Account() == null)
            {
                return(false);
            }

            return(player.Account().Inventory.GiveItem(item, x, y));
        }
示例#6
0
        public static CItem GetItemBySlot(this GTANetworkAPI.Client player, byte x, byte y)
        {
            if (player.Account() == null)
            {
                return(null);
            }

            return(player.Account().Inventory.GetItemBySlot(x, y));
        }
示例#7
0
        public static int GetFreeSlots(this GTANetworkAPI.Client player)
        {
            if (player.Account() == null)
            {
                return(0);
            }

            return(player.Account().Inventory.FreeSlots);
        }
示例#8
0
        public static void CleanUp(this GTANetworkAPI.Client player)
        {
            //Globals.Systems.publicVehicles.ClearPlayerPublicVehicle(player);
            Globals.Managers.admin.StopDuty(player);

            if (player.Account() == null)
            {
                return;
            }

            player.Account().CleanUp();
        }
示例#9
0
 public void PlayerEnterpoint(GTANetworkAPI.ColShape colShape, GTANetworkAPI.Client client)
 {
     //Matrun Collision Enter
     foreach (MatRun m in materialRuns)
     {
         Vector3 dropp = new Vector3(m.dposX, m.dposY, m.dposZ);
         if (Con.IsPlayerInRangeOf(client, dropp, 3))
         {
             int matpackage = client.GetData("MATPACKAGE");
             if (matpackage < 1)
             {
                 return;
             }
             int Pmats = Getplayerstat(client, "MATERIALS");
             client.SendChatMessage("~r~You have received 250 materials.");
             Setplayerstat(client, "MATERIALS", Pmats + 250);
             client.SetData("MATPACKAGE", 0);
             client.TriggerEvent("deletewaypoint");
             return;
         }
     }
     //Matrun Collision Enter end
 }
示例#10
0
 public static bool IsOnDuty(this GTANetworkAPI.Client player)
 {
     return(Globals.Managers.admin.IsOnDuty(player));
 }
示例#11
0
 public static void TriggerClient(this GTANetworkAPI.Client player, CRPCManager.ERPCs rpc, params object[] args)
 {
     NAPI.ClientEvent.TriggerClientEvent(player, rpc.ToString(), args);
 }
示例#12
0
 public static void SendChatMessage(this GTANetworkAPI.Client player, string message, params object[] format)
 {
     player.SendChatMessage(string.Format(message, format));
 }
示例#13
0
 public static Account Account(this GTANetworkAPI.Client player)
 {
     return(player.GetExtension());
 }
示例#14
0
 public static bool IsLoggedIn(this GTANetworkAPI.Client player)
 {
     return(player.Account() != null);
 }
示例#15
0
 public static void SetAccount(this GTANetworkAPI.Client player, Account playerAccount)
 {
     player.SetData("extension", playerAccount);
 }