Jump to content

nasserdfdd

Members
  • Posts

    191
  • Joined

  • Last visited

Everything posted by nasserdfdd

  1. hi everyone i'm having this issue if any one can help pls function() local check = exports.sql:exec("SELECT * FROM sys" ) local check2 = exports.sql:query("SELECT * FROM pos" ) if #check ~= #AreaPosition then for i=1,#AreaPosition do exports.sql:query("INSERT INTO sys (asd, id1, id2, alloy, alloy2, spawn) VALUES(?,?,?,?,?,?)", "asd["..tostring(i).."]", "", "", 0, 0, "NO") end end if #check2 ~= #AreaPosition then for i=1,#AreaPosition do exports.sql:query("INSERT INTO pos (asd,X,Y,Z,SizeX,SizeY) VALUES(?,?,?,?,?,?)", "asd["..tostring(i).."]", AreaPosition[i]["aPosX"], AreaPosition[i]["aPosY"], AreaPosition[i]["aSizeX"], AreaPosition[i]["aSizeY"]) end end end error attempt to get length of local 'check' a boolean value thanks in advance
  2. Hi all, im using coleditor but i want palyers to be able to buy the col and own it script client -- -- -- -- -- -- -- -- -- -- --- -- Collision Editor by MuLTi. -- -- -- -- -- -- -- -- -- -- -- --- local Guivar = 0 local gMe = getLocalPlayer() local gCol local gColx, gColy, gColz, gColw, gColh, gCold, rot --[[ function move_o_rotate_2() if(isInColEdit() == false) then return end local x, y, z = getElementPosition(gCol) gColx, gColy, gColz, gColw, gColh, gCold, rot = x, y, z, gColw, gColh, gCold, rot-0.25 setCameraMatrix(x+2+gColw, y+7+gColw, z+2+(gColh/2), x+(gColw/2), y+(gColw/2), z) destroyElement(gCol) gCol = createColCuboid(gColx, gColy, gColz, gColw, gColh, gCold) setElementRotation(gCol, rot, rot, rot) end function move_o_rotate_1() if(isInColEdit() == false) then return end local x, y, z = getElementPosition(gCol) gColx, gColy, gColz, gColw, gColh, gCold, rot = x, y, z, gColw, gColh, gCold, rot+0.25 setCameraMatrix(x+2+gColw, y+7+gColw, z+2+(gColh/2), x+(gColw/2), y+(gColw/2), z) destroyElement(gCol) gCol = createColCuboid(gColx, gColy, gColz, gColw, gColh, gCold) setElementRotation(gCol, rot, rot, rot) end --]] function move_o_depth_raus() if(isInColEdit() == false) then return end local x, y, z = getElementPosition(gCol) if(gColh < 0.1) then return end gColx, gColy, gColz, gColw, gColh, gCold = x, y, z, gColw, gColh-0.25, gCold setCameraMatrix(x+2+gColw, y+7+gColw, z+2+(gColh/2), x+(gColw/2), y+(gColw/2), z) destroyElement(gCol) gCol = createColCuboid(gColx, gColy, gColz, gColw, gColh, gCold) end function move_o_depth_rein() if(isInColEdit() == false) then return end local x, y, z = getElementPosition(gCol) gColx, gColy, gColz, gColw, gColh, gCold = x, y, z, gColw, gColh+0.25, gCold setCameraMatrix(x+2+gColw, y+7+gColw, z+2+(gColh/2), x+(gColw/2), y+(gColw/2), z) destroyElement(gCol) gCol = createColCuboid(gColx, gColy, gColz, gColw, gColh, gCold) end function move_o_tiefe() if(isInColEdit() == false) then return end local x, y, z = getElementPosition(gCol) gColx, gColy, gColz, gColw, gColh, gCold = x, y, z, gColw, gColh, gCold-0.25 setCameraMatrix(x+2+gColw, y+7+gColw, z+2+(gColh/2), x+(gColw/2), y+(gColw/2), z) destroyElement(gCol) gCol = createColCuboid(gColx, gColy, gColz, gColw, gColh, gCold) end function move_o_hohe() if(isInColEdit() == false) then return end local x, y, z = getElementPosition(gCol) gColx, gColy, gColz, gColw, gColh, gCold = x, y, z, gColw, gColh, gCold+0.25 setCameraMatrix(x+2+gColw, y+7+gColw, z+2+(gColh/2), x+(gColw/2), y+(gColw/2), z) destroyElement(gCol) gCol = createColCuboid(gColx, gColy, gColz, gColw, gColh, gCold) end function move_o_zup() if(isInColEdit() == false) then return end local x, y, z = getElementPosition(gCol) gColx, gColy, gColz, gColw, gColh, gCold = x, y, z+0.25, gColw, gColh, gCold setCameraMatrix(x+2+gColw, y+7+gColw, z+2+(gColh/2), x+(gColw/2), y+(gColw/2), z) destroyElement(gCol) gCol = createColCuboid(gColx, gColy, gColz, gColw, gColh, gCold) end function move_o_zero() if(isInColEdit() == false) then return end local x, y, z = getElementPosition(gCol) gColx, gColy, gColz, gColw, gColh, gCold = x, y, z-0.25, gColw, gColh, gCold setCameraMatrix(x+2+gColw, y+7+gColw, z+2+(gColh/2), x+(gColw/2), y+(gColw/2), z) destroyElement(gCol) gCol = createColCuboid(gColx, gColy, gColz, gColw, gColh, gCold) end function move_o_right() if(isInColEdit() == false) then return end local x, y, z = getElementPosition(gCol) if(gColw < 0.1) then return end gColx, gColy, gColz, gColw, gColh, gCold = x, y, z, gColw-0.25, gColh, gCold setCameraMatrix(x+2+gColw, y+7+gColw, z+2+(gColh/2), x+(gColw/2), y+(gColw/2), z) destroyElement(gCol) gCol = createColCuboid(gColx, gColy, gColz, gColw, gColh, gCold) end function move_o_front() if(isInColEdit() == false) then return end local x, y, z = getElementPosition(gCol) gColx, gColy, gColz, gColw, gColh, gCold = x-0.25, y-0.5, z, gColw, gColh, gCold setCameraMatrix(x+2+gColw, y+7+gColw, z+2+(gColh/2), x+(gColw/2), y+(gColw/2), z) destroyElement(gCol) gCol = createColCuboid(gColx, gColy, gColz, gColw, gColh, gCold) end function move_o_back() if(isInColEdit() == false) then return end local x, y, z = getElementPosition(gCol) gColx, gColy, gColz, gColw, gColh, gCold = x+0.25, y+0.5, z, gColw, gColh, gCold setCameraMatrix(x+2+gColw, y+7+gColw, z+2+(gColh/2), x+(gColw/2), y+(gColw/2), z) destroyElement(gCol) gCol = createColCuboid(gColx, gColy, gColz, gColw, gColh, gCold) end function move_o_xright() if(isInColEdit() == false) then return end local x, y, z = getElementPosition(gCol) gColx, gColy, gColz, gColw, gColh, gCold = x+0.25, y-0.25, z, gColw, gColh, gCold setCameraMatrix(x+2+gColw, y+7+gColw, z+2+(gColh/2), x+(gColw/2), y+(gColw/2), z) destroyElement(gCol) gCol = createColCuboid(gColx, gColy, gColz, gColw, gColh, gCold) end function move_o_xleft() if(isInColEdit() == false) then return end local x, y, z = getElementPosition(gCol) gColx, gColy, gColz, gColw, gColh, gCold = x-0.25, y+0.25, z, gColw, gColh, gCold setCameraMatrix(x+2+gColw, y+7+gColw, z+2+(gColh/2), x+(gColw/2), y+(gColw/2), z) destroyElement(gCol) gCol = createColCuboid(gColx, gColy, gColz, gColw, gColh, gCold) end function move_o_left() if(isInColEdit() == false) then return end local x, y, z = getElementPosition(gCol) gColx, gColy, gColz, gColw, gColh, gCold = x, y, z, gColw+0.25, gColh, gCold setCameraMatrix(x+2+gColw, y+7+gColw, z+2+(gColh/2), x+(gColw/2), y+(gColw/2), z) destroyElement(gCol) gCol = createColCuboid(gColx, gColy, gColz, gColw, gColh, gCold) end function o_fertig_func() if(isInColEdit() == false) then return end setElementAlpha(gMe, 255) setCameraTarget(gMe) unbindBinds() destroyElement(gCol) gCol = nil setElementData(gMe, "coledit", false) outputChatBox("Informations: ", 200, 200, 200, false) outputChatBox("coordinates: "..gColx..", "..gColy..", "..gColz, 255, 255, 255) outputChatBox("Lenght: "..gColw..", depth: "..gColh..", height: "..gCold, 255, 255, 255) triggerServerEvent("onCollisionSpeichere", gMe, gColx, gColy, gColz, gColw, gColh, gCold) outputChatBox("Collision has been saved into collisions.txt!", 255, 255, 255) setElementFrozen(gMe, false) gColx, gColy, gColz, gColw, gColh, gCold, rot = nil, nil, nil, nil, nil, nil, nil end function o_abbrechen_func() if(isInColEdit() == false) then return end gColx, gColy, gColz, gColw, gColh, gCold = nil, nil, nil, nil, nil, nil setElementAlpha(gMe, 255) setCameraTarget(gMe) unbindBinds() destroyElement(gCol) gCol = nil setElementData(gMe, "coledit", false) outputChatBox("You canceled the operation.", 0, 200, 0, false) setElementFrozen(gMe, false) end function unbindBinds(id2) unbindKey("arrow_l", "down", move_o_left) unbindKey("arrow_r", "down", move_o_right) unbindKey("arrow_u", "down", move_o_depth_raus) unbindKey("arrow_d", "down", move_o_depth_rein) unbindKey("pgup", "down", move_o_zero) unbindKey("pgdn", "down", move_o_zup) unbindKey("num_add", "down", move_o_hohe) unbindKey("num_sub", "down", move_o_tiefe) --unbindKey("mouse_wheel_up", "down", move_o_rotate_1) --unbindKey("mouse_wheel_down", "down", move_o_rotate_2) unbindKey("num_2", "down", move_o_back) unbindKey("num_6", "down", move_o_xleft) unbindKey("num_4", "down", move_o_xright) unbindKey("num_8", "down", move_o_front) unbindKey("enter", "down", o_fertig_func) unbindKey("space", "down", o_abbrechen_func) end function setToBinds(id2) bindKey("arrow_l", "down", move_o_left) bindKey("arrow_r", "down", move_o_right) bindKey("arrow_u", "down", move_o_depth_raus) bindKey("arrow_d", "down", move_o_depth_rein) bindKey("pgup", "down", move_o_zero) bindKey("pgdn", "down", move_o_zup) bindKey("num_add", "down", move_o_hohe) bindKey("num_sub", "down", move_o_tiefe) bindKey("num_2", "down", move_o_back) bindKey("num_6", "down", move_o_xleft) bindKey("num_4", "down", move_o_xright) bindKey("num_8", "down", move_o_front) bindKey("enter", "down", o_fertig_func) bindKey("space", "down", o_abbrechen_func) --bindKey("mouse_wheel_up", "down", move_o_rotate_1) --bindKey("mouse_wheel_down", "down", move_o_rotate_2) end function setToCollisionEdit(id) local x, y, z = getElementPosition(gMe) setDevelopmentMode(true) outputChatBox("Use /showcol to see the collision shape!.", 0, 255, 0, false) outputChatBox("Use the arrow keys, to move the Collision!, Use 'Page up and Page down' to move it up or down.", 0, 255, 0, false) outputChatBox("Use 'Num 2, Num 4, Num6, Num8' to move the Collision !.", 0, 255, 0, false) outputChatBox("If you are finnished, press 'Enter' to save the Collision. Space to cancel.", 0, 255, 0, false) setToBinds(id) setElementFrozen(gMe, true) setElementAlpha(gMe, 0) move_o_zero() if(id == 1) then if(gCol) then destroyElement(gCol) end gCol = createColCuboid(x, y, z, 2, 2, 2) gColx, gColy, gColz, gColw, gColh, gCold, rot = x, y, z, 2, 2, 2, 0 else end end function createColMenue() if(Guivar == 1) then return end Guivar = 1 showCursor(true) local sWidth, sHeight = guiGetScreenSize() local Width,Height = 246,115 local X = (sWidth/2) - (Width/2) local Y = (sHeight/2) - (Height/2) local COLFenster = {} local COLKnopf = {} COLFenster[1] = guiCreateWindow(X, Y, Width, Height, "Collision Editor(by [XP]MuLTi)",false) COLKnopf[1] = guiCreateButton(12,80,80,28,"Close",false,COLFenster[1]) COLKnopf[2] = guiCreateButton(12,30,109,45,"Col Cuboid",false,COLFenster[1]) COLKnopf[3] = guiCreateButton(125,30,109,45,"Col Sphere",false,COLFenster[1]) COLKnopf[4] = guiCreateButton(97,80,140,26,"Cancel edit",false,COLFenster[1]) if(isInColEdit() ~= true) then guiSetEnabled(COLKnopf[4], false) end local function quitFenster(rofl) guiSetVisible(COLFenster[1], false) Guivar = 0 showCursor(false) if(rofl) then o_abbrechen_func() end end addEventHandler("onClientGUIClick", COLKnopf[4], function() quitFenster(1) end, false) -- Quitten addEventHandler("onClientGUIClick", COLKnopf[1], quitFenster, false) -- Schliessen addEventHandler("onClientGUIClick", COLKnopf[2], -- Col Cuboid function() if(isInColEdit() == true) then outputChatBox("You are already in a edit!", 255, 0, 0, false) return end if(isPedInVehicle(gMe) == true) then outputChatBox("You are in a Car.", 255, 0, 0, false) return end setToCollisionEdit(1) setElementData(gMe, "coledit", true) quitFenster() end, false) end addCommandHandler("editcol", createColMenue) function isInColEdit() if(getElementData(gMe, "coledit") == true) then return true else return false end return false; end server -- -- -- -- -- -- -- -- -- -- --- -- Collision Editor bei MuLTi. -- -- -- -- -- -- -- -- -- -- -- --- addEvent("onCollisionSpeichere", true) addEventHandler("onCollisionSpeichere", getRootElement(), function(x, y, z, w, h, d) local newfile if not(fileExists("collisions.txt")) then newfile = fileCreate("collisions.txt") end local file = fileOpen("collisions.txt") local text = fileRead(file, 99999) --fileDelete(file) -- Dont Use newfile = fileCreate("collisions.txt") local time = getRealTime() local day = time.monthday local month = time.month+1 local year = time.year+1900 local hour = time.hour local minute = time.minute fileWrite(newfile, text.."\n\n-- -- -- -- -- "..day.."."..month.."."..year.." at "..hour..":"..minute..", Creator: "..getPlayerName(source).."\nmyCollision = createColCuboid("..x..", "..y..", "..z..", "..w..", "..h..", "..d..")") fileFlush(newfile) fileClose(newfile) end) BTW:it is not my script and i got it from community Thank you, Nasser mansour
  3. Told u i am using coleditor + i just need a script which makes player can build on the col
  4. so i'm using coleditor but i want a script that allow the player to build on his collision so pls help me ty any ways
  5. try this meta "Damien Ostler" type="script" name="Login" description="Spawnscreen menu." />
  6. how u want the script to work if client and server side are emty or u deleted it so i don steal it ? cuz when i checked them i saw they are empty
  7. how u want the script to work if client and server side are emty or u deleted it so i don steal it ? cuz when i checked them i saw they are empty
  8. can u upload the 1 png and meta so i check btw try to unzip the folder
  9. edit: check if ur image png or jpg
  10. try this "background.png" download="true"/>
  11. leaked sripts from saeg pls close this topic
  12. hi alll I want script that give account admin right when resource start so pls help me i need example
  13. go to NGsql and make it SQLite not MySQL and restart both of them then u are done
  14. hi all so this script does not cancel wanted lvl why function test ( source,killer ) local level = getPlayerWantedLevel ( killer ) if getTeamName(getPlayerTeam(killer)) == "Criminal" then if getTeamName(getPlayerTeam(source)) == "Criminal" then setPlayerWantedLevel ( killer, level) end end end addEventHandler ( "onPlayerWasted", getRootElement (), test )
  15. it Is the interiors.zip of community
  16. hi all so I have prob I don't think it is from the script cuz the script is interiors of mtasa when I start it it give me millon warnings some of them http://imgur.com/RxrV2Wu but I don't care for warning but the prob is that I can't enter or leave the interior I tried other interior did not work idk why?
  17. hi all I need this script urgently pls help me I want lv doesnot get any wanted level
  18. hi all so is there resource or some one made or some one give me example how to the cylinder I mean like in cit there is modified cylinder and interiors with black dots and yello cylinder
  19. hi all so this is a line of my code i get this error test/test_c.lua:94:bad argument @guiGridListGetSelectedItem' [Expected gui-element at argument 1, gotnil] code local row, col = guiGridListGetSelectedItem(jobList)
  20. Your Skype please shimmyops
  21. i have host i purchased but i closed my server so i dont need ad me on skype shimmyops it is 66 slot
×
×
  • Create New...