Jump to content

knightscript

Members
  • Content Count

    127
  • Joined

  • Last visited

Community Reputation

2 Neutral

About knightscript

  • Rank
    Poot-butt
  • Birthday 17/11/1999

Details

  • Gang
    1337
  • Location
    New Hampshire
  • Occupation
    Web Programmer for living
  • Interests
    Gaming, Developing stuff, Gaming

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Thanks, made it work local spawn = exports["NTTC_Tables"]:getRandomLoot("Los Santos") local spawn = exports["NTTC_Tables"]:getRandomLoot("Los Santos") LV = {} LS = {} SF = {} Other = {} function displayLoadedRes ( res ) i = 1 for k,v in pairs(spawntables()) do local zone = getZoneName( v[1],v[2],v[3], true ) if (zone == "Los Santos") then LS[i] = tostring(v[1]..","..v[2]..","..v[3]) i = i+1 end end end addEventHandler ( "onResourceStart", getRootElement(getThisResource( )), displayLoadedRes ) function getRandomLoot(location) --local x,y,z = number[1
  2. I tried to, wasnt able, was just able to send a string, the table I was trying to send was for example: table = [] table['x'] = x table['y'] = y table['z'] = z return table['x'],table['y'],table['z']
  3. Yes, yes, just figured out that it seems I cant send a table through an export, I tried this: outputServerLog("X = "..exports["NTTC_Tables"]:getRandomLoot("Los Santos")) and on my function function getRandomLoot(location) local number = table.random(locations_for_items_and_spawns) --outputServerLog( number[1]..","..number[2]..","..number[3] ) return "x,y,z" end result:
  4. Hello, I am trying to export a function called "getRandomLoot", which is in a resource name NTTC_Tables, I am trying to export this function to be able to use it on another resource, the function: function getRandomLoot(location) local number = table.random(locations_for_items_and_spawns) --outputServerLog( number[1]..","..number[2]..","..number[3] ) local x,y,z = number[1], number[2], number[3] local position = getZoneName ( x, y, z, true ) table = [] table['x'] = x table['y'] = y table['z'] = z return table end <meta> <script src="async.lua" type="shared" /> <
  5. Thank you so much for explaining this, i will try this and update my comment with the result, one more question not exactly related, is there a way to set a weapons alpha (a gun that i give with giveGun)? thank you
  6. Thanks, I do understand, what I dont understand is how can I fade out and fade in an image? i cant manage to understand how onclientrender could work
  7. Hello, I am trying to make a script that swaps the image on screen for a new one from a table I really am lost and dont have idea what to do next, local screenW, screenH = guiGetScreenSize() local randomize2 = math.random ( #Imagens ) local alpha = 255 local current_image = "" function ImageRender(image,alpha) if getElementData (getLocalPlayer( ),"logedin") == false or getElementData (getLocalPlayer( ),"logedin") == nil then current_image = guiCreateStaticImage(0, 0, screenWidth, screenHeight, tostring(Imagens[image]), false) guiMoveToBack( current_image ) guiSetAlpha(current_imag
  8. well you just have to adapt the code I gave you just use getDistanceBetweenPoints3D and i dont know what you use to know if its a criminal that is trying to revive
  9. Forgive me, I wasnt at home, I will work on an example and I will send it to you, i will use 1920x1080 and make calculations there, theoretically if I do it relative it should work on any res, i will update my comment when its ready.
  10. You could use onClientClick to get the position in the screen in combination with GuiGetScreenSize (to calculate the relative screen position)
  11. You could create a PNG image thats bigger than the original one with transparency, have an onclick for it
  12. Thanks, fixed it, it seems one of the image files were missing, i still dont get why for some users it worked fine and for others it didnt,
  13. I mean, there was no need to humilliate him, you could of told him more or less what functions to use, here, tested it, CLIENT: function math.round(number) local _, decimals = math.modf(number) if decimals < 0.5 then return math.floor(number) end return math.ceil(number) end local revive_percentage = 0 local timer = 0 function add_percentage_per_second() if (revive_percentage < 100) then revive_percentage = revive_percentage + 1.25 if (revive_percentage >= 100) then setPedAnimation(getLocalPlayer()) removeEventHandler("onClientRender"
  14. This is because DayZ gamemode has a protection, you should look for a timer in your gamemode that does something like this local skin = getElementData(player,"skin") if (skin ~= getElementModel(player) then setElementModel(player,skin) end if you find this, check the element data, and just add setElementData(player,"DATANAME",YOURSKINID) example, if your DayZ protection dataname is "DayZSkin", and the skin you set is 150 setElementData(player,"DayZSkin",150) FULL CODE With dataname "DayZSkin": newskin = createMarker ( 1856.0751, 851.0827, 9.408, "cylinder",
  15. But can this affect only a couple users and not all of them?
×
×
  • Create New...