Jump to content

WelCome

Members
  • Posts

    33
  • Joined

  • Last visited

Everything posted by WelCome

  1. I'm sorry for spam, I fixed it
  2. Hello i have a problem with 'CallRemote', i want to get text on other server but my code doesn't work function finishedCallback( responseData, errno ) responseData = tostring(responseData) if responseData == "ERROR" then outputDebugString( "callRemote: ERROR #" .. errno ) elseif responseData ~= "hello sailor" then outputDebugString( "callRemote: Unexpected reply: " .. responseData ) end end callRemote ( "mtasa://XXX.XXX.XX.XXX:XXXXX",getResourceFromName('runcode'),'httpRun',finishedCallback,"outputChatBox('Text',root)" ) DB3: https://imgur.com/a/TGjiojl
  3. @JeViCo What?? Wiki: No errors
  4. Hello, I have a problem, when I move the cursor, the object becomes invisible gate = Object(1337,712.61853, 659.00409, 9.94867) addEventHandler('onClientRender',root,function() if not isCursorShowing() then return end local _,_,wx,wy,wz = getCursorPosition() gate:setPosition(wx,wy,wz) end)
  5. Its rly easy to block it.. https://wiki.multitheftauto.com/wiki/OnPlayerCommand
  6. :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]
  7. I don't know how to do it
  8. 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)
  9. Ty for tips but this still not work
  10. 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)
  11. WelCome

    Xml

    Sry for spam, i repair this
  12. WelCome

    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
  13. WelCome

    Table

    I want math.random "a" or "b" and create a marker with positions of "a" or "b"
  14. WelCome

    Table

    i want draw the cords of 'a' or 'b'
  15. WelCome

    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
  16. i did that, but didnt work
  17. 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
  18. WelCome

    [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])
  19. Hello, how to stop smoothMoveCamera ?
×
×
  • Create New...