Jump to content

Sleuth problem


centike534

Recommended Posts

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 ) 

Link to comment

1. The button got the name button, but you use the addEventHandler on gomb ... what is gomb?

2. You use the function Sleuth, but the function is called sleuth (case-sensitiv)

3. You use the function before it's created.

4. You use killer, but where do you get him?!

5. You use gyilkos, but where do you get him?!

6. You don't even use killername and gyilkos in Server.lua

7. You use jatekos, what is that?

8. You use killer, what is that here?

You didnt use the killer of Client.lua

Link to comment

How do i get the killer name?

I edited:

function nyomoz () 
    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("(( Csak rendőr! ))", 255,0,0) 
    end 
    hide() 
end 

function nyomoz () 
    exports.global:sendLocalMeAction(jatekos, "..........") 
        outputChatBox(..getPlayerName(killer).., jatekos, 255, 0, 0) 
end 
addEventHandler ( "onNyomoz", root, nyomoz ) 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...