Jump to content

[Help] How to use exports properly?


Recommended Posts

Hi Community :)

i wrote this script for setting a specif player wanted level:

function setWanted (source,cmd,wanted) 
	local account = getPlayerAccount(source)
	if not account or isGuestAccount(account) then return end
	local accountName = getAccountName(account)
	if not isObjectInACLGroup("user."..accountName,aclGetGroup("Admin")) then return end
	exports["PoliceDatabase"]:setPlayerWanted(client,wanted)
 outputChatBox(..account.."Wanted Set To:"..wanted) 
end 
addCommandHandler ( "setwanted", setWanted ) 

and the Exported function:

function setPlayerWanted(player, amount)

and  get this error:[2017-07-02 16:02:47] ERROR: Cmd\SetWanted\s_SetWanted.lua:7: attempt to concatenate global 'wanted' (a nil value)

 

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