Jump to content

Saml1er

Retired Staff
  • Posts

    1,058
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Saml1er

  1. function toggleGGun(player) local acc = getPlayerAccount ( player ) if not isGuestAccount ( acc ) then return end local accName = getAccountName ( acc ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) local on = not exports.gravity_gun:isGravityGunEnabled(player) exports.gravity_gun:togglePlayerGravityGun(player,on) outputChatBox("gravity gun "..(on and "on" or "off"),player) end addCommandHandler("ggun",toggleGGun)
  2. addEventHandler("onPlayerLogin", root, function() triggerClientEvent(source,"createGUI", source) -- due to first argument, this will trigger for 1 player and 3rd argument is for specifying source of the évent end ) local function startRendering () dxDrawText(...) end addEvent("createGUI",true) addEventHandler("createGUI", root, function() addEventHandler("onClientRender", root, startRendering ) end ) EDIT: I changed the event name to "createGUI". I have no idea how I missed this
  3. Yeah, I actually forgot about this function engineApplyShaderToWorldTexture This function has an argument where you can apply a shader to a specific element.
  4. local txt = "SomETexT" txt = txt:upper outputChatBox (txt) --> sometext
  5. It's because in that resource the script is running for a specific player. For example, local function j (o) if o and getPlayerName(o) == "Jey" then return "Hey, Jey!" else return "You are not Jey" end end local txt = j(localPlayer) outputChatBox(txt) --> this will run on every client PC but it will output "Hey, Jey" for player whose name is Jey. so basically that model is loaded for specific players and shaders? 0.0
  6. It's because you used ipairs which is used for ordering ( integers ) If you loop with pairs then it will work. EDIT: local a = { ["a"] = "foo" } for i, v in pairs (a) do print (a.i) --> "foo" a.i = nil print (a.i) --> nil end local a = { ["a"] = "foo" } for i, v in ipairs (a) do print (a.i) --> doesn't print anything cause ipairs is for integers key end
  7. This will work. Have you tested it? for i,v in ipairs(dxElements.statisticsgrid.player) do dxElements.statisticsgrid.player.i = nil end You can also use bons method.
  8. Which one is line thirteen?
  9. there still wont be any other color, but just one,the nametag color which freeroam sets by default and it will also look like this #00FF00Mi#0000FFke -- an example No it won't. Test the code and you'll see. EDIT: I made a typo, copy again. dxDrawText( getElementData(v,"pnick"), x, y, x, y, tocolor(rr, gg, bb), scale + ( 15 - dist ) * 0.02, myFont ,"left","top",false,false,true)
  10. Also check this out: viewtopic.php?f=148&t=38203
  11. This line: if team == getTeamFromName ( "Violet Killers MC" ) then
  12. Lol then simply don't remove hex codes in your nametag script. dxDrawText( getElementData(v,"pnick"), x, y, x, y, tocolor(rr, gg, bb), scale + ( 15 - dist ) * 0.02, myFont ,false,false,false,true)
  13. It will be better for you to google it. I'm on phone so I can't write lua code so I copied a code from aibo's post and made some changes. -- server: addEvent("IneedMaps", true) addEventHandler("IneedMaps", getRootElement(), function (player) local mapTable = {} for i, map in ipairs(exports.mapmanager:getMapsCompatibleWithGamemode(getResourceFromName("race"))) do table.insert(mapTable, getResourceInfo(map, "name")) -- this will add map to list by MAP NAME --table.insert(mapTable, getResourceName(map)) -- this will add map by its RESOURCE NAME end triggerClientEvent(player, "mapListUpdate", getRootElement(), mapTable) end) -- client: setTimer(function()triggerServerEvent ("IneedMaps",localPlayer) end,2000,1) local list = guiCreateGridList ( 0.80, 0.10, 0.15, 0.60, true) local column = guiGridListAddColumn( list, "Player", 0.85 ) addEvent("mapListUpdate", true) addEventHandler("mapListUpdate", getRootElement(), function(maps) guiGridListClear(list) for i, map in ipairs(maps) do local row = guiGridListAddRow(list) guiGridListSetItemText(list, row, column, map, false, false) end end)
  14. Always read wiki before you use a function in your script. Wiki says Also wiki's note: Solution: function Hello(source) outputChatBox("Hello World!", source, 255,100,10, true); end addCommandHandler("yo",Hello) So the command is /yo
  15. You made my day, tell some more jokes.
  16. http://www.buymixtapes.com/members/mixt ... 0Money.mp3
  17. Nobody is stopping him from learning. It's all about testing, the more he tests, the more he gets the hang of it.
  18. Because it is a video + you can only play direct links.
  19. local sx,sy = guiGetScreenSize(); start = getTickCount() addEventHandler("onClientRender",root, function ( ) local now = getTickCount() local elapsedTime = now - start local endTime = start + 6000 local duration = endTime - start progress = elapsedTime / duration local i1,i2,_ = interpolateBetween ( 0, sy*(-500/768), 0, 0, sy*(130/768), 0, progress, "OutBounce") dxDrawImage ( (sx*(800/1024)) -((sx/2)-(i1/2)), ((sy/2)-(i2/2))-i2/2, sx*(400/1024),sy*(400/768), "test.png",0,0,0, tocolor(255, 255, 255, 255), false) end )
  20. Have fun using leaked sigmar's script.
×
×
  • Create New...