Client.lua:
---I want to use with this button:
button = guiCreateButton(0.05, 0.25, 0.87, 0.15, "Sleuth", true, bJobbkatt)
addEventHandler("onClientGUIClick", gomb, Sleuth, false)
///////////////////////////////////////////////////////////////////////////////////
function sleuth ()
local theTeam = getPlayerTeam(getLocalPlayer())
local factionType = getElementData(theTeam, "type")
if (factionType==2) or exports.global:isRpSeged(getLocalPlayer()) then
triggerServerEvent("onNyomoz", getLocalPlayer(), getPlayerName(killer), gyilkos)
else
outputChatBox("(( Only Police! ))", 255,0,0)
end
hide()
end
Server.lua:
function sleuth ()
exports.global:sendLocalMeAction(jatekos, "..........")
outputChatBox(..getPlayerName(killer).., jatekos, 255, 0, 0)
end
addEventHandler ( "onSleuth", root, sleuth )