Jump to content

Zcraks

Members
  • Posts

    47
  • Joined

  • Last visited

Everything posted by Zcraks

  1. Who knows event for camera, spraycan, fire extinguisher ? "onPlayerWeaponFire" dont working.
  2. marker = createMarker ( 2371.64, -1126.66, 1050.88 - 1, "cylinder", 0.7) marker:setInterior(8) marker:setDimension(1) addEventHandler("onMarkerHit", marker, function( player ) if player:getType() == "player" and dim == 1 then outputDebugString("TEST") end end) Server side
  3. addEventHandler ("onPlayerVehicleEnter", getRootElement(), function (theVehicle, seat, jacked) if theVehicle and seat == 0 then theVehicle:setData("lastPos", theVehicle:getPosition()) end end) setTimer(function() for k, veh in ipairs(getElementsByType("vehicle")) do if veh then local pos = veh:getPosition() local vec = veh:getData("lastPos") if pos and vec and distance then --[[ Error => ]] local value = getDistanceBetweenPoints3D(vec:getX(), vec:getY(), vec:getZ(), pos:getX(), pos:getY(), pos:getZ()) if value then ------------- end end end end end, 2000, 0) attempt to index local "vec" ( a user data value )
  4. Error stack overflow addEventHandler("onPlayerSpawn", getRootElement(), function() setTimer(function() end, 10000, 0) end)
  5. who knows how to fix the problem ? https://ibb.co/LJKBPxv
  6. Hi, is it possible to start voice chat through export?
  7. local function backspacePress ( button, press ) if button == 'backspace' and press then if value ~= 'none' then editBox[value] = utf8.sub(editBox[value], 1,utf8.len(editBox[value])-1) end end end addEventHandler("onClientKey", root, backspacePress ) How do I create a condition where if a player presses the "backspace" button, the characters are deleted until the player releases the button ?
  8. I dont use the GUI. What to do then?
  9. When starting the login panel, I can use different binds. How can they be turned off for a while?
  10. Dont working dxCreateFont quality. local font = dxCreateFontClient("font.otf", 100, false, "cleartype_natural" )
  11. Zcraks

    Custom radar

    Hi, who knows to how a create custom circle radar ?
  12. Hi, who knows how to create a character clothes system ? Don't CJ system.
  13. x1, y1 = getScreenFromWorldPosition(v[1]+0.5, v[2], v[3]+1) x2, y2 = getScreenFromWorldPosition(v[1]+0.5, v[2], v[3]) ... getDistanceBetweenPointAndSegment2D(clickedX, clickedY, x1, y1, x2, y2) attempt to call global "getDistanceBetweenPointAndSegment2D" (a nil value)
  14. Hi, how create a click for dxDrawMaterialLine3D ?
  15. How add signs "A-a, ..., Z-z", "0-9",".", "_" , "@" for white list ? And check if login_edit then do not add "@" ?
  16. How to check for signs and prohibit pressing the spacebar in guiCreateEdit ?
  17. Zcraks

    table problem

    local button = {} function menu button[1] = ... button[2] = ... function click () if source == button ??????? and source ~= guiWind then if source == button[1] then ... How to check for all buttons?
  18. Zcraks

    onPickupHit

    for k,i in pairs(pickups) do local pickup[k] = createPickup( i[1], i[2], i[3], i[4], i[5], 0) end function onPickupH (thePlayer) for k,v in pairs(pickups) do if source == pickup[k] then local num = k spawnPlayer(thePlayer,num[v][7],num[v][8],num[v][9],-40,getElementModel(thePlayer), v[10],0) end end end addEventHandler("onPickupHit", root, onPickupH) server.Lua:2 unexpected symbol near '['
  19. -- [register] local passwordHash = passwordHash(password,"bcrypt",{}) if (passwordHash) then ... -- [login] outputDebugString(password) -- true outputDebugString(passwordHash) -- true if (passwordVerify(password, passwordHash)) then ... else outputDebugString("Account not found") end -- Why is the password still does not match ?
  20. Zcraks

    Mysql

    Why id = nil ? dbQuery(function(query) local result = dbPoll(query, -1) if result then setElementData(ThePlayer, "id", id) end end, MysqlLink, "SELECT id FROM account WHERE 'login'=?", login)
  21. How to make customization by type CJ ?
  22. Zcraks

    Working limit

    while playersInJobs["Job"] == 10 do while playersInTurn["Job"] == 0 do if playersInTurn["Job"][1] and isElement ( playersInTurn["Job"][1] ) then outputChatBox ( "Go to the job" , playersInTurn["Job"][1] ) one = (playersInTurn["lawn"][1]) timer = setTimer(function (one) table.remove(playersInTurn["lawn"], one) outputChatBox("Time is out", one) end, 20000, 1) break end end end How to make it work?
  23. Zcraks

    Working limit

    if #playersInJobs["job-name"] <= 9 and #playersInTurn["job-name"] ~= nil then for k,i in ipairs(playersInTurn["job-name"]) do player = getPlayerFromNick (playersInTurn["job-name"][i]) if player ~= false then outputChatBox ("Go to job !", player) end end end How to make sure that when a place becomes available, it notifies the first player in the queue ?
  24. Zcraks

    Working limit

    for k, i in ipairs(playersInJobs["job-name"]) do while playersInJobs["job-name"][i] do if i == element then table.remove(playersInJobs["job-name"], i) end end end Why not removed from the table?
×
×
  • Create New...