mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-26 14:00:17 +00:00
only on server
This commit is contained in:
parent
b8e93dce69
commit
97bd52728d
1 changed files with 17 additions and 12 deletions
|
@ -125,20 +125,25 @@ namespace SanAndreasUnity.UI {
|
|||
// display additional options
|
||||
|
||||
if (playerExists) {
|
||||
itemRect = GUIUtils.GetNextRectInARowPerc (rect, ref i, buttonSpacing, widthPercsButtons);
|
||||
if (GUI.Button (itemRect, "Switch")) {
|
||||
Ped.Instance.PlayerModel.Load (def.Id);
|
||||
|
||||
if (NetUtils.IsServer)
|
||||
{
|
||||
itemRect = GUIUtils.GetNextRectInARowPerc (rect, ref i, buttonSpacing, widthPercsButtons);
|
||||
if (GUI.Button (itemRect, "Switch")) {
|
||||
Ped.Instance.PlayerModel.Load (def.Id);
|
||||
}
|
||||
|
||||
itemRect = GUIUtils.GetNextRectInARowPerc (rect, ref i, buttonSpacing, widthPercsButtons);
|
||||
if (GUI.Button (itemRect, "Spawn")) {
|
||||
Ped.SpawnPed (def.Id, Ped.Instance.transform);
|
||||
}
|
||||
|
||||
itemRect = GUIUtils.GetNextRectInARowPerc (rect, ref i, buttonSpacing, widthPercsButtons);
|
||||
if (GUI.Button (itemRect, "Spawn stalker")) {
|
||||
Ped.SpawnPedStalker (def.Id, Ped.Instance.transform, Ped.Instance);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
itemRect = GUIUtils.GetNextRectInARowPerc (rect, ref i, buttonSpacing, widthPercsButtons);
|
||||
if (GUI.Button (itemRect, "Spawn")) {
|
||||
Ped.SpawnPed (def.Id);
|
||||
}
|
||||
|
||||
itemRect = GUIUtils.GetNextRectInARowPerc (rect, ref i, buttonSpacing, widthPercsButtons);
|
||||
if (GUI.Button (itemRect, "Spawn stalker")) {
|
||||
Ped.SpawnPedStalker (def.Id);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue