Skip to content

Commit

Permalink
fix a bug related to spectating
Browse files Browse the repository at this point in the history
  • Loading branch information
Blumlaut committed Oct 7, 2019
1 parent bd53fea commit 8b7bbef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions admin_client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ Citizen.CreateThread( function()
end)

AddEventHandler('EasyAdmin:requestSpectate', function(playerId)
local playerId = GetPlayerFromServerId(playerId)
spectatePlayer(GetPlayerPed(playerId),playerId,GetPlayerName(playerId))
end)

Expand Down
2 changes: 1 addition & 1 deletion gui_c.lua
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ function GenerateMenu() -- this is a big ass function
local thisItem = NativeUI.CreateItem(GetLocalisedText("spectateplayer"), "")
thisPlayer:AddItem(thisItem)
thisItem.Activated = function(ParentMenu,SelectedItem)
TriggerServerEvent("EasyAdmin:requestSpectate",thePlayer)
TriggerServerEvent("EasyAdmin:requestSpectate",GetPlayerServerId(thePlayer))
end
end

Expand Down

0 comments on commit 8b7bbef

Please sign in to comment.