fluxhya Posted May 7, 2018 Share Posted May 7, 2018 Hy i have a little problem: there is error : WARNING: shop-system/s_generalshop_system.lua:1047: Bad argument @ 'triggerEvent' [Expected element at argument 2, got nil] This is code : function delNearbyGeneralshops(thePlayer, commandName) if (exports.integration:isPlayerTrialAdmin(thePlayer)) then local posX, posY, posZ = getElementPosition(thePlayer) outputChatBox("Deleting Nearby Shop NPC(s):", thePlayer, 255, 126, 0) local count = 0 local dimension = getElementDimension(thePlayer) for k, thePed in ipairs(getElementsByType("ped", resourceRoot)) do local pedType = getElementData(thePed, "ped:type") if (pedType) then if (pedType=="shop") then local x, y = getElementPosition(thePed) local distance = getDistanceBetweenPoints2D(posX, posY, x, y) local cdimension = getElementDimension(thePed) if (distance<=10) and (dimension==cdimension) then local dbid = getElementData(thePed, "dbid") local shoptype = getElementData(thePed, "shoptype") if deleteGeneralShop(thePlayer, "delshop" , dbid) then --outputChatBox(" Deleted Shop with ID #" .. dbid .. " and type "..shoptype..".", thePlayer, 255, 126, 0) count = count + 1 end end end end end if (count==0) then outputChatBox(" Deleted None.", thePlayer, 255, 126, 0) else outputChatBox(" Deleted "..count.." None.", thePlayer, 255, 126, 0) end end end addCommandHandler("delnearbyshops", delNearbyGeneralshops, false, false) addCommandHandler("delnearbynpcs", delNearbyGeneralshops, false, false) Link to comment
fluxhya Posted May 7, 2018 Author Share Posted May 7, 2018 2 minutes ago, NeverUnbeatable said: I don't see a line with error. WARNING: shop-system/s_generalshop_system.lua:1047: Bad argument @ 'triggerEvent' [Expected element at argument 2, got nil] Link to comment
Dimos7 Posted May 7, 2018 Share Posted May 7, 2018 We not give help to leaked scripts also there not triggerEvent int that code Link to comment
fluxhya Posted May 7, 2018 Author Share Posted May 7, 2018 31 minutes ago, Dimos7 said: We not give help to leaked scripts also there not triggerEvent int that code I buy that script from my friend, and ye... Okay 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