sawser Posted December 5, 2017 Share Posted December 5, 2017 السلام عليكم الفنكشن function issueTicket(thePlayer, theCommand, theVehicle, amount, ...) local logged = getElementData(thePlayer, "loggedin") if (logged==1) then local issuerID = getElementData(thePlayer, "account:character:id") local team = getPlayerTeam(thePlayer) if (getTeamName(team) == "Los Sa326 Enterprises")(getTeamName(team) == "Los Santos Police Department") or (getTeamName(team) == "San Andreas State Police") then if not (theVehicle) or not (amount) or not (tonumber(theVehicle)) or not (tonumber(amount)) or not (...) then outputChatBox("SYNTAX: /" ..theCommand.. " [vehID] [amount] [reason]", thePlayer, 255, 194, 14) else local reason = table.concat( { ... }, " " ) mysql:query_free("INSERT INTO `pd_tickets` (`reason`, `vehid`, `amount`, `issuer`, `time`) VALUES ('".. mysql:escape_string(reason) .."', "..mysql:escape_string(theVehicle)..", "..mysql:escape_string(amount)..", "..mysql:escape_string(issuerID)..", NOW() - interval 1 hour)") outputChatBox(" >>> Ticket successfully issued.", thePlayer, 0, 255, 0) local teamMembers = getPlayersInTeam(team) local charname = getPlayerName(thePlayer):gsub("_", " ") local factionID = getElementData(thePlayer, "faction") local factionRank = getElementData(thePlayer, "factionrank") local factionRanks = getElementData(team, "ranks") local factionRankTitle = factionRanks[factionRank] for key, value in ipairs(teamMembers) do outputChatBox("" .. factionRankTitle .. " " .. charname .." has issued a vehicle ticket to VIN " ..tonumber(theVehicle).. " with the amount $" ..tonumber(amount).." for the reason: " ..reason.. ".", value, 0, 102, 255) end end end end end addCommandHandler("ticketveh", issueTicket) المشكله [2017-12-05 11:37:03] ERROR: ticket-system/s_vehticket.lua:98: attempt to call a boolean value الحل ؟ Link to comment
iMr.WiFi..! Posted December 5, 2017 Share Posted December 5, 2017 2 hours ago, sawser said: السلام عليكم الفنكشن function issueTicket(thePlayer, theCommand, theVehicle, amount, ...) local logged = getElementData(thePlayer, "loggedin") if (logged==1) then local issuerID = getElementData(thePlayer, "account:character:id") local team = getPlayerTeam(thePlayer) if (getTeamName(team) == "Los Sa326 Enterprises")(getTeamName(team) == "Los Santos Police Department") or (getTeamName(team) == "San Andreas State Police") then if not (theVehicle) or not (amount) or not (tonumber(theVehicle)) or not (tonumber(amount)) or not (...) then outputChatBox("SYNTAX: /" ..theCommand.. " [vehID] [amount] [reason]", thePlayer, 255, 194, 14) else local reason = table.concat( { ... }, " " ) mysql:query_free("INSERT INTO `pd_tickets` (`reason`, `vehid`, `amount`, `issuer`, `time`) VALUES ('".. mysql:escape_string(reason) .."', "..mysql:escape_string(theVehicle)..", "..mysql:escape_string(amount)..", "..mysql:escape_string(issuerID)..", NOW() - interval 1 hour)") outputChatBox(" >>> Ticket successfully issued.", thePlayer, 0, 255, 0) local teamMembers = getPlayersInTeam(team) local charname = getPlayerName(thePlayer):gsub("_", " ") local factionID = getElementData(thePlayer, "faction") local factionRank = getElementData(thePlayer, "factionrank") local factionRanks = getElementData(team, "ranks") local factionRankTitle = factionRanks[factionRank] for key, value in ipairs(teamMembers) do outputChatBox("" .. factionRankTitle .. " " .. charname .." has issued a vehicle ticket to VIN " ..tonumber(theVehicle).. " with the amount $" ..tonumber(amount).." for the reason: " ..reason.. ".", value, 0, 102, 255) end end end end end addCommandHandler("ticketveh", issueTicket) المشكله [2017-12-05 11:37:03] ERROR: ticket-system/s_vehticket.lua:98: attempt to call a boolean value الحل ؟ إتمنى توضح إي سطر هو المشكلة ,, Link to comment
sawser Posted December 5, 2017 Author Share Posted December 5, 2017 2 hours ago, iMr.WiFi..! said: إتمنى توضح إي سطر هو المشكلة ,, تم حل المشكله شكرا كان السطر 7 نسيان اكتب or Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now