mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2025-02-24 19:27:16 +00:00
utilities window makes requests
This commit is contained in:
parent
25d5ec17dd
commit
8f4f319d12
1 changed files with 29 additions and 0 deletions
|
@ -37,6 +37,8 @@ namespace SanAndreasUnity.UI {
|
|||
|
||||
if (Utilities.NetUtils.IsServer)
|
||||
DisplayServerGui();
|
||||
else if (Net.PlayerRequests.Local != null)
|
||||
DisplayClientOnlyGui();
|
||||
|
||||
}
|
||||
|
||||
|
@ -81,6 +83,33 @@ namespace SanAndreasUnity.UI {
|
|||
|
||||
}
|
||||
|
||||
void DisplayClientOnlyGui()
|
||||
{
|
||||
|
||||
var pr = Net.PlayerRequests.Local;
|
||||
|
||||
if (GUILayout.Button("Request to spawn vehicle"))
|
||||
{
|
||||
pr.RequestVehicleSpawn();
|
||||
}
|
||||
|
||||
if (GUILayout.Button("Request to change ped model"))
|
||||
{
|
||||
pr.RequestPedModelChange();
|
||||
}
|
||||
|
||||
if (GUILayout.Button("Request suicide"))
|
||||
{
|
||||
pr.RequestSuicide();
|
||||
}
|
||||
|
||||
if (GUILayout.Button("Request to destroy all vehicles"))
|
||||
{
|
||||
pr.RequestToDestroyAllVehicles();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue