Jump to content

undefined

Members
  • Posts

    500
  • Joined

  • Last visited

Everything posted by undefined

  1. How can i split dx elements(image,rectangle,line,text...)?
  2. Look at line 20. You forgot put ] local markername = markername[ math.random( #markername ) ]
  3. What are these? ○accuracy ○weapon_range ○target_range Solved...
  4. You don't understand me. I'm asking what happened of splayer.
  5. what is the type of splayer? string, userdata[player-account]...?
  6. @Wassim I already solved this problem. But thank you nevertheless. Code Removed OK. I understand now . Now, return is not work. Look at the line 11 It must say; [ [ true, true, true, true, false, 255, 190, true, true ] ] But it say; [ [ { "hudOption": false } ] ] Where is the problem? Edit: return dbPoll(dbQuery(connectDB, "SELECT hudOption FROM hud_option WHERE account_name=?", tostring(account_name)), -1)[1].hudOption-- Line 63 outputChatBox said: [ false ]
  7. You can use https://wiki.multitheftauto.com/wiki/CreateExplosion for original tank shoot.
  8. Any errors in the debugscript? Client-side
  9. Sometimes this error can give. addEvent("getGroups",true) addEvent("getGroups",true) addEventHandler("getGroups",root, function() objects = {} for i,object in ipairs(aclGroupListObjects(aclGetGroup(allowedGroup))) do -- get all groups local account_name = string.gsub(object, "user.", "") table.insert(objects,account_name) end for i,v in ipairs(objects) do -- get all groups in table triggerClientEvent(source,"addGroups",source,v) end end)
  10. Try it: addEvent("getGroups",true) addEventHandler("getGroups",root, function() objects = {} for i,object in ipairs(aclGroupListObjects(aclGetGroup(allowedGroup))) do -- get all groups table.insert(objects,string.gsub(object, "user.","")) end for i,v in ipairs(objects) do -- get all groups in table triggerClientEvent(source,"addGroups",source,v) end end)
  11. function onSwatFire(key, keyState, vehicleFireType) local vehicle = getPedOccupiedVehicle(localPlayer) local vehModel = getElementModel(vehicle) if vehModel == 601 then if vehicleFireType == "primary" or vehicleFireType == "secondary" then -- your choice local _,_,_,shootX, shootY, shootZ = getCameraMatrix() local ped = createPed(0, shootX, shootY, shootZ) local x,y,z = getElementPosition(vehicle) createProjectile(vehicle--[[vehicle or localPlayer - Your choice]],19,x,y,z+1,200,ped) if isElement(ped) then destroyElement(ped) end end end end bindKey("vehicle_fire", "down", onSwatFire, "primary") bindKey("vehicle_secondary_fire", "down", onSwatFire, "secondary") Try it. (I do not test.)
  12. undefined

    I Need Help

    If you speak non-English, topic can be closed. Can you move this topic to viewforum.php?f=118 or can you come to Skype?
  13. I'm new on SQLite. I can't see my mistake Please show me my mistake
  14. undefined

    I Need Help

    HirsizSystem = {} function HirsizGorevOn1() HirsizSystem[source] = {} HirsizSystem[source].marker = createMarker(-75.900001525879, -1113.0999755859, 0.10499999672174, 'cylinder', 2, 76, 224, 30, 255,source) HirsizSystem[source].blip = createBlip (-75.900001525879, -1113.0999755859, 0.10499999672174, 53, 2, 255, 0, 0, 255, 0, 10000,source) HirsizSystem[source].car = createVehicle (482, 1605, -1465.900390625, 13.800000190735, 0, 0, 0) warpPedIntoVehicle(source, HirsizSystem[source].car) addEventHandler("onMarkerHit", HirsizSystem[source].marker, HirsizGorevFinish) addEventHandler("onVehicleExit", getRootElement(), HirsizGorevCancel) addEventHandler("onPlayerQuit", getRootElement(), HirsizGorevCancel) addEventHandler("onVehicleExplode", HirsizSystem[source].car, HirsizGorevCancel) end addEvent("HirsizGorevOn1", true) addEventHandler("HirsizGorevOn1", getRootElement(), HirsizGorevOn1) function HirsizGorevFinish(hitElement) if HirsizSystem[hitElement] then local player = getVehicleOccupant(HirsizSystem[hitElement].car, 0) givePlayerMoney(player, 5000) triggerClientEvent(player,"GorevBitis1",getRootElement()) if isElement(HirsizSystem[hitElement].marker) then destroyElement(HirsizSystem[hitElement].marker) end if isElement(HirsizSystem[hitElement].blip) then destroyElement(HirsizSystem[hitElement].blip) end if isElement(HirsizSystem[hitElement].car) then removeEventHandler("onVehicleExplode", HirsizSystem[hitElement].car, HirsizGorevCancel) destroyElement(HirsizSystem[hitElement].car) end HirsizSystem[hitElement] = nil removeEventHandler("onVehicleExit", getRootElement(), HirsizGorevCancel) removeEventHandler("onPlayerQuit", getRootElement(), HirsizGorevCancel) end end Try it. What do you mean?
  15. Yes, I tried it. It's not give error or warning. And it's not work. The result table is empyt. Here is my new all code: Code Removed
  16. local query = dbQuery(connectDB, "SELECT hudColor FROM hud_option WHERE account_name=?", tostring(account_name)) local result = dbPoll(query, -1) if result then return result end Where? I can't see. Can you show me?
  17. local query = dbQuery(connectDB, "SELECT hudColor FROM hud_option WHERE account_name=?", tostring(account_name))[1].hudColor -- Line 42 local result = dbPoll(query, -1) if result then return fromJSON(query) end I'm make this but it's not work! ERROR: mas\DB\hud_option.lua:42: attempt to index a userdata value
  18. What is this? I read this on wiki but I don't understand.
  19. Here is my new code: Code Removed And Error: ERROR: mas\DB\hud_option.lua:43: attempt to index a userdata value
×
×
  • Create New...