C# Исходник Запрос о получении данных об игроке сервера SAMP

Savok

Потрачен
Автор темы
178
292
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Всем привет!
Сегодня решил разобрать библиотеку SampSharp.
И понял что с ее помощью я могу стать ближе к SAMP и моим любимым языком C#.
И вот что у меня получилось:

Код:
using SAMPSharp.GameMode;
using SAMPSharp.GameMode.SAMP;
using SAMPSharp.GameMode.World;
using SAMPSharp.GameMode.Definitions;

public class InfoPlayer : BasePlayer
{
    public void GetPlayerInfo()
    {
        string name = this.Name;
        int score = this.Score;
        int ping = this.Ping;
        int money = this.Money;
        int health = this.Health;
        int armor = this.Armor;
        int wantedLevel = this.WantedLevel;
        int skin = this.Skin;
        int position = this.Position(x,y,z);
        float x = this.Position.X;
        float y = this.Position.Y;
        float z = this.Position.Z;
    }
}

Не бейте тапками, я забыл вывод информации :)
Code:
using SAMPSharp.GameMode;
using SAMPSharp.GameMode.SAMP;
using SAMPSharp.GameMode.World;
using SAMPSharp.GameMode.Definitions;

public class InfoPlayer : BasePlayer
{
    public void GetPlayerInfo()
    {
        Console.WriteLine("Имя: " + this.Name);
        Console.WriteLine("Очки: " + this.Score);
        Console.WriteLine("Пинг: " + this.Ping);
        Console.WriteLine("Деньги: " + this.Money);
        Console.WriteLine("Здоровье: " + this.Health);
        Console.WriteLine("Броня: " + this.Armor);
        Console.WriteLine("Уровень розыска: " + this.WantedLevel);
        Console.WriteLine("Скин: " + this.Skin);
        Console.WriteLine("Местоположение: " + this.Position);
    }
}

 
Последнее редактирование:
  • Нравится
Реакции: Digger Man

Savok

Потрачен
Автор темы
178
292
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
  • Нравится
Реакции: Savok