Jump to content

Bad Argument


Best-Killer

Recommended Posts

Bad Argument @ 'getTeamName' [Expected Team at argument 1 , got boolean

function onPedClick(button, state, absX, absY, wx, wy, wz, element) 
    if (element and getElementType(element) == "ped" and state=="down") then 
    if getTeamName(getPlayerTeam(player)) ~= "Criminals" then outputChatBox("Drug Delivery: You must be criminal.",255,0,0) return end 
        local x, y, z = getElementPosition(localPlayer) 
        if (element == ped) then 
            if getDistanceBetweenPoints3D(x, y, z, wx, wy, wz)<=3 then 
                guiSetVisible(GUIEditor.window[1], true) 
                showCursor (true) 
           end 
        end 
    end 
end 
addEventHandler("onClientClick", root, onPedClick) 
  

Link to comment
function onPedClick(button, state, absX, absY, wx, wy, wz, element) 
    if (element and getElementType(element) == "ped" and state=="down") then 
    if getTeamName(getPlayerTeam(getLocalPlayer())) ~= "Criminals" then outputChatBox("Drug Delivery: You must be criminal.",255,0,0) return end 
        local x, y, z = getElementPosition(localPlayer) 
        if (element == ped) then 
            if getDistanceBetweenPoints3D(x, y, z, wx, wy, wz)<=3 then 
                guiSetVisible(GUIEditor.window[1], true) 
                showCursor (true) 
           end 
        end 
    end 
end 
addEventHandler("onClientClick", root, onPedClick) 
  

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...