Added /car command (information about current vehicle)
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
using GTANetworkAPI;
|
using GTANetworkAPI;
|
||||||
using reallife_gamemode.Model;
|
using reallife_gamemode.Model;
|
||||||
|
using reallife_gamemode.Server.Entities;
|
||||||
using reallife_gamemode.Server.Extensions;
|
using reallife_gamemode.Server.Extensions;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -57,5 +58,23 @@ namespace reallife_gamemode.Server.Commands
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Command("car", "~m~Benutzung: ~s~/car")]
|
||||||
|
public void CmdUserCar(Client player)
|
||||||
|
{
|
||||||
|
if (!player.IsLoggedIn()) return;
|
||||||
|
if (!player.IsInVehicle) return;
|
||||||
|
|
||||||
|
Vehicle pVeh = player.Vehicle;
|
||||||
|
|
||||||
|
if(pVeh.GetServerVehicle() is ServerVehicle veh)
|
||||||
|
{
|
||||||
|
player.SendChatMessage("~m~" + ((VehicleHash)pVeh.Model) + " | " + veh.ToString() + " | Farbe 1: " + pVeh.PrimaryColor + " | Farbe 2: " + pVeh.SecondaryColor);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
player.SendChatMessage("~m~" + ((VehicleHash)pVeh.Model) + " | Farbe 1: " + pVeh.PrimaryColor + " | Farbe 2: " + pVeh.SecondaryColor);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user