WelCome

Members
  • Content count

    24
  • Joined

  • Last visited

Community Reputation

0 Neutral

About WelCome

  • Rank
    Civilian
  1. [HELP] Trigger

    :facepalm: client addEventHandler("onClientPlayerWeaponFire",getLocalPlayer(),function(weapon, ammo, ammoInClip,endX,endY,endZ,hitElement) triggerServerEvent("daj_cos",localPlayer,endZ,hitElement) end) server addEvent("daj_cos",true) addEventHandler("daj_cos",root,function(endZ,hitElement) local x,y,z = getElementPosition(hitElement) if getDistanceBetweenPoints3D(_,_,z,_,_,endZ)<1.0 then killPed(hitElement) end end) db : Bad argument getDistanceBetweenPoints3D [ Expected vector3 at argument 1, got nil]
  2. [HELP] Trigger

    I don't know how to do it
  3. [HELP] Trigger

    Hello i want create a new hitbox-system but i have little problem with headshot -client function returining(endZ) return triggerServerEvent("daj_cos",localPlayer,endZ) end addEventHandler("onClientPlayerWeaponFire",getLocalPlayer(),function(weapon, ammo, ammoInClip,endX,endY,endZ,hitElement) if not getElementType(hitElement)=="player" then return end if returining(endZ)<0.3 then outputChatBox("true") end end) -server addEvent("daj_cos",true) addEventHandler("daj_cos",root,function(endZ) for i,v in pairs(getElementsByType("player")) do local x,y,z = getElementPosition(v) local distance = getDistanceBetweenPoints3D(_,_,z,_,_,endZ) return distance end end)
  4. Trigger + Database

    Ty for tips but this still not work
  5. Trigger + Database

    Pls Help me
  6. Trigger + Database

    Hello, I'm doing a base-system but I have a problem because when triggering from c-side to s-cide it crashes "Error" but the name and password are good Server addEvent("Base-System_",true) addEventHandler("Base-System_",root,function(text1,text2) if not text1 and text2 then return end local konto = dbQuery (connect, "SELECT * FROM `Bazy` WHERE `nazwa`=?",text1) local results = dbPoll(konto,-1) if (#results == 0) then outputChatBox("Error",source) else for i,v in ipairs(results) do if text2 == v.haslo then setElementData(source,v.dim) outputChatBox("Error",source) setElementPosition(source,-42.57263, -343.16113, -49) end end end end) c-side addEventHandler("onClientGUIClick",GUIEditor.button[5],function() if source==GUIEditor.button[5] then local text1 = guiGetText(GUIEditor.edit[1]) local text2 = guiGetText(GUIEditor.edit[2]) if text1 and text2 then triggerServerEvent("Base-System_",localPlayer,text1,test2) end end end)
  7. Xml

    Sry for spam, i repair this
  8. Xml

    Hi today i want create a base system but i have problem addCommandHandler("base_open",function(plr,command,name,pass) if name and pass then local find = xmlFindChild(xmlFile,name,0) for _,v in ipairs ( xmlNodeGetChildren ( xmlFile )) do local password = xmlNodeGetAttribute(v,"Password") end if find then outputChatBox("TesT",plr,255,0,0) end end end) and I want to get the value of the "password" variable and check if it is equal to the pass pass
  9. Table

    I want math.random "a" or "b" and create a marker with positions of "a" or "b"
  10. Table

    i want draw the cords of 'a' or 'b'
  11. Table

    Hi, today i wanted create "random marker position" but i have problem table ={ ['A'] = { {-805.34595, 743.04645, 54.34844}, {-809.69177, 764.23022, 54.34844}, }, ['B'] = { {-838.24719, 731.62659, 54.34844}, {-834.38562, 762.48022, 54.34844}, }, } addCommandHandler("commander",function() for i,v in pairs(table) do local ran = math.random(1,#v) local marker =createMarker(v[ran][1],v[ran][2],v[ran][3],"ring",3,255,0,0,255) createBlipAttachedTo(marker,18) end end) sometimes marker create on wrong position and i dont know why bad = https://imgur.com/a/xhPNXw7 good = https://imgur.com/a/uiSy3Fq
  12. getElementsByType

    i did that, but didnt work
  13. getElementsByType

    Hi guys, i want create blip to object but i have little problem for i,v in pairs(getElementsByType("object")) do if v==1340 then local x,y,z = getElementPosition(v) createBlip(x,y,z,math.random(5,10)) end end
  14. [HELP] Table

    Ty work
  15. [HELP] Table

    Hi today i wanted to create anty-relog system but i got error what's wrong with this code? local coltable = {} addEventHandler("onPlayerWeaponFire",root,function() local x, y, z = getElementPosition(source) coltable[source] = createColSphere(x,y,z,100) for _,v in pairs(getElementsWithinColShape(coltable[source],"player")) do outputChatBox("TesT",v) end end) setTimer(function(plr) destroyElement(coltable[source]) end,3000,0) db3 : destroyElement(coltable[source])