Jump to content

[help] license


K4stic

Recommended Posts

error's at line 6,7,8,16

says: Bad argument @ 'getElementData' [Expected element at argument 1,got boolean]

  
lp = getLocalPlayer() 
function guibuylisence ( hitElement, lp) 
    if ( getElementType ( hitElement ) == "player" ) and ( hitElement == localPlayer ) then 
        if ( not guiGetVisible ( licensecenter ) ) then 
            local test = getElementData(lp,"Driving-Test") 
            local license = getElementData(lp,"Driving-Test") 
            local expiry = getElementData(lp,"Driving-Expire") 
        if test == "Completed" then 
            guiSetVisible ( licensecenter, true ) 
            showCursor ( true ) 
            guiGridListSetItemText(Licenselist,0,2,"Yes",false, false) 
            guiGridListSetItemText(Licenselist,0,3,expiry,false, false) 
            else 
            guiSetVisible(licensecenter,true) 
            getElementData(lp,"Driving-Test","No") 
            showCursor( true ) 
         end 
      end 
   end 
end 
addEventHandler ( "onClientMarkerHit", marker0, guibuylisence ) 

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