WhoAmI Posted February 27, 2014 Posted February 27, 2014 Hi guys. addEventHandler("onResourceStart", resourceRoot, function () local query = dbQuery(handler, "SELECT * FROM pacholki") if (query) then local data, rows = dbPoll(query, -1) if (rows > 0) then for k,v in ipairs(data) do local id = v["id"] local x = v["x"] local y = v["y"] local z = v["z"] outputChatBox(v) local pacholek = createObject(1459, x, y, z) setElementData(pacholek, getResourceName(resource)..":id", id) setElementData(pacholek, getResourceName(resource)..":pacholek", true) end end end end ) Well, I did this, but only creates one of 3 elements. Yea, in database are 3 rows, it spawns only 1. Solutions?
WhoAmI Posted February 27, 2014 Author Posted February 27, 2014 Oh, I don't know how It was done, but It repaired by itself. Oo
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