Jump to content

itHyperoX

Members
  • Posts

    522
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by itHyperoX

  1. Nice one thanks. Another question , is there any function, or something to check that is the object is still visible ? I mean when i change the Z pos (to down - ) of the object, i want to stop to the object go under the world
  2. You are the best mate, one more question. How can i decrease / increase with 0.1 the Z player position after the player scrolling ?
  3. Hi, there is an object which is attached to a player cache['objectAttach'][client] = createObject(id, myX, myY, myZ) attachElements(cache['objectAttach'][client], client, 0, 0, 0) My question is, how can i change the Z cord if it's attached ? i was trying like local x, y, z = getElementPosition(client) newZ = z - 0.05 setElementPosition(cache['objectAttach'][client], x, y, newZ) but i don't think that i can change the attached object pos; any help thanks
  4. Ya man, already did that but forgot to mention that, thx anyway
  5. Hi, i'm creating a server side object, but i want to disable the object collision just for the local player. How is this possible ? http://prntscr.com/o6553f[/img]
  6. What you can do is: when purchasing a vip, insert it into your mysql (dbExec), then make a timer that check every minute the whole table. If that found something, then you can do the rest
  7. A long time ago i was suffering with this issue too. I figured it out, and since that, i'm using this. This will put the dx on the center of the screen always. local screenSize = {guiGetScreenSize()} local panelW, panelH = 300, 150 --// panelW = panel Widht | panelH = panelHeight local panelX, panelY = screenSize[1]/2-panelW/2, screenSize[2]/2-panelH/2 --// use addEventHandler('onClientRender', root, function() dxDrawRectangle(panelX, panelY, panelW, panelH, tocolor(0, 0, 0, 200) ) --// if you want to make a button of course smaller, you can do like this dxDrawRectangle(panelX, panelY, panelW, panelH - 125, tocolor(0, 0, 0, 200) ) end)
  8. Másik megoldás, getElementsByType('ped) - létrehozol pedeket (createPed), adsz nekik pl egy math.random(0, 9999) elementData értéket (setElementData(ped, 'teszt', math.random(0, 9999), majd úgy ténylegesen is látod, hogy jó e.
  9. itHyperoX

    Warp player to

    loop getElementsByType setElementPosition addCommandHandler
  10. itHyperoX

    loop question

    function getDistanceBetweenElements(arg1, arg2) local element1 = Vector3(getElementPosition( arg1 )) local element2 = Vector3(getElementPosition( arg2 )) local distance = getDistanceBetweenPoints3D( element1,element2 ) return distance end
  11. local List = { [520] = true, --hydra [432] = true, --rhino } function checkVehicles(theVehicle) local vehicleModel = getElementModel(theVehicle) if List[vehicleModel] then setVehicleGunsEnabled(theVehicle, false ) end end addEventHandler("onClientPlayerVehicleEnter",getRootElement(),checkVehicles)
  12. Try this -- [ Zone ] local DefZoneToNew = { ["YourNewZoneName"] = "OldZoneName", } function getPlayerZone(element) local x, y, z = getElementPosition(element) local location = getZoneName(x, y, z) if DefZoneToNew[location] then return DefZoneToNew[location] else return location end end -- [ City ] local DefCityToNew = { ["YourNewCityName"] = "OldCityName", } function getPlayerCity(element) local x, y, z = getElementPosition(element) local location = getZoneName(x, y, z, true) if DefCityToNew[location] then return DefCityToNew[location] else return location end end addEventHandler("onClientRender", root, function() dxDrawText(getPlayerZone(localPlayer).." City: "..getPlayerCity(localPlayer), x,y, 20, 80, 1, "default") end)
  13. you using guiSetInputEnabled? If not, it should work as default.
  14. Hi! I'm trying to calculate the position for a scrolling bar. I tried so many way, but i just failed. After wasted 2 hours for nothing, can anybody help me please ? If needed, i'll post the code. I have a bg and i want the scrolling bar working with that. local screenSize = {guiGetScreenSize()} local panelW, panelH = 500, 300 local panelX, panelY = screenSize[1]/2-panelW/2, screenSize[2]/2-panelH/2 maxDraw = 5 --currentRow is when scrolling. Thats + 1 or -1 dxDrawRectangle(panelX - 40, panelY, 10, panelH, tocolor(0, 0, 0, 220)) -- BG dxDrawRectangle(panelX - 40, panelY + currentRow * maxDraw / #weaponTable, 10, 40, tocolor(0, 200, 0, 190))
  15. using elementDatas in render = getting the same data every second 60 times
  16. itHyperoX

    About ban...

    Maybe you can, but the best solution for this, make your own ban system
  17. If you can post the half of the code, maybe we can help you better.
  18. The problem can be the script calling an elementData, can be getElementData(localPlaye, "PlayerLoggedin") , or something else, and u don't set it to a player before calling it.
×
×
  • Create New...