Jump to content

Et-win

Members
  • Posts

    1,390
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Et-win

  1. function checkToGo(gCheckPointNumber) local checkpointCount = 0 local gMap = exports.mapmanager:getRunningGamemodeMap() --Get the current running map local gRoot = getResourceRootElement(gMap) --Get the root where to check the checkpoints, the map-resource it is if (gRoot == false) or (gRoot == nil) then --Check or the root was found, otherwise check through the whole server gRoot = getRootElement() end local gCheckPoints = getElementsByType("checkpoint", gRoot) --Get the checkpoints in the root. if (gCheckPoints ~= false) and (gCheckPoints ~= nil) then --Check or any found for placeNumber, checkpointData in ipairs(gCheckPoints) do --Loop through them, for each checkpoint check or you already had it. checkpointCount = checkpointCount + 1 --For every checkpoint, + the count end end checkpointCount = checkpointCount - gCheckPointNumber --All checkpoints - Reached checkpoint = To Go outputChatBox(tostring(checkpointCount)..." checkpoints to go!", source) --Output it. end Out of my head, could be wrong/have typos.
  2. Ah, pictures. Finally can see how it looks like lol. Nice one!
  3. So... Then learn... tostring(getElementData(yourstuff))
  4. VentanaT = guiCreateWindow(462, 218, 522, 295, "CL Trabajos", false) guiWindowSetSizable(VentanaT, false) guiSetVisible(VentanaT, false) RenunciarB = guiCreateButton(10, 77, 114, 37, "Renunciar", false, VentanaT) guiSetProperty(RenunciarB, "NormalTextColour", "FFAAAAAA") DescansarB = guiCreateButton(10, 30, 114, 37, "Descansar", false, VentanaT) guiSetProperty(DescansarB, "NormalTextColour", "FFAAAAAA") OcupacionT = guiCreateLabel(142, 53, 63, 14, "Team:", false, VentanaT) CuentaT = guiCreateLabel(140, 33, 100, 15, "Nombre: ", false, VentanaT) Imagen = guiCreateStaticImage(336, 33, 176, 152, ":login_panel/logo.png", false, VentanaT) CerrarB = guiCreateButton(336, 244, 177, 41, "Cerrar Ventana", false, VentanaT) guiSetProperty(CerrarB, "NormalTextColour", "FFAAAAAA") Info = guiCreateLabel(10, 136, 157, 98, "Sistema de trabajos de CL\nAca Podras Renunciar\nA Tu Trabajo,\nO Descansar De Tu Trabajo", false, VentanaT) Cuenta = guiCreateLabel(187, 33, 200, 150, "" ..getPlayerName(localPlayer).. "", false, VentanaT) Ocupacion = guiCreateLabel(205, 53, 91, 15, "n/n", false, VentanaT) VentanaE = guiCreateWindow(519, 285, 224, 157, "CL Trabajos", false) guiWindowSetSizable(VentanaE, false) guiSetVisible(VentanaE, false) BotonSi = guiCreateButton(16, 102, 74, 45, "Si", false, VentanaE) guiSetProperty(BotonSi, "NormalTextColour", "FFAAAAAA") BotonNo = guiCreateButton(124, 102, 74, 45, "No", false, VentanaE) guiSetProperty(BotonNo, "NormalTextColour", "FFAAAAAA") Label = guiCreateLabel(26, 33, 163, 50, "Estas Seguro De Renunciar?", false, VentanaE) function openT(thePlayer) if (guiGetVisible (VentanaT) == false) then local gError = true local plrTeam = getPlayerTeam(getLocalPlayer()) if (plrTeam ~= false) and (plrTeam ~= nil) then local gTeamName = getTeamName(plrTeam) if (gTeamName ~= false) and (gTeamName ~= nil) then guiSetText(Ocupacion, gTeamName) gError = false end end if (gError == true) then guiSetText(Ocupacion, "N/A") end guiSetVisible(VentanaT, true) showCursor(true) elseif (guiGetVisible (VentanaT) == true) then guiSetVisible(VentanaT, false) showCursor(false) end end bindKey ("F4", "down", openT) function cerrarventanaT() guiSetVisible(VentanaT, false) showCursor(false) end addEventHandler("onClientGUIClick", CerrarB , cerrarventanaT, false) function AbrirE() guiSetVisible(VentanaT, false) guiSetVisible(VentanaE, true) showCursor(true) end addEventHandler("onClientGUIClick", RenunciarB , AbrirE, false) function BotonNo1() guiSetVisible(VentanaT, true) guiSetVisible(VentanaE, false) showCursor(true) end addEventHandler("onClientGUIClick", BotonNo , BotonNo1, false) function BotonSi1() guiSetVisible(VentanaT, false) guiSetVisible(VentanaE, false) triggerServerEvent("Sacarteam1", localPlayer) showCursor(false) end addEventHandler("onClientGUIClick", BotonSi , BotonSi1, false) You guys know that client-side 'bindKey' doesn't have a 'player' argument, right? EDIT: Edited my code.
  5. tostring() getElementData will return a number, use tostring on it.
  6. onResourceStart onPlayerSpawn/Wasted spawnPlayer math.random setPlayerSkin createVehicle warpPedIntoVehicle giveWeapon ^That if you want to script it by yourself. (Out of my head)
  7. That the maker makes a system that you can add/remove stuff from outsite while credits are always in screen if you join the server? :3
  8. I know, but he says "there is not point of adding ammo to the script". So, why does changing 'ammo' to '_' in the function matter? I would think it doesn't matter a thing, because '_' is a variable now too?
  9. Make those dxDrawText's the same size, and do exactly the same as what you do with that bars.
  10. http://www.lua.org/manual/5.1/manual.ht ... math.floor Or: http://www.lua.org/manual/5.1/manual.html#pdf-math.ceil
  11. your Heart is So Black Again: Ehum, no. EDIT: Ow, didn't see that you already had posted your grid list. Thought you meant to let us make the whole thing. So, what's the problem with it?
  12. I just wanted to ask, whenever you put ammo on 'ammo', 'ajfhjdfhjjhkgf' or '_', it's all the same?
  13. getTickCount() setTimer That can be used.
  14. How stupid that I didn't see that, lol.
  15. Why making 2 topics? Your script already has been fixed by me on your other one. viewtopic.php?f=108&t=78639 Learn to be patient.
  16. exports.scoreboard:addScoreboardColumn('Score') addEventHandler("onPlayerWasted", root, function(attacker,attackerweapon) if (getElementData(attacker, "Score") == false) or (getElementData(attacker, "Score") == nil) then setElementData(attacker, "Score", 1) setElementData(source, "Score", -1) else setElementData( attacker, "Score", getElementData(attacker,"Score")+1) setElementData( source, "Score", getElementData(source,"Score")-1) end end ) Forgot end
  17. exports.scoreboard:addScoreboardColumn('Score') addEventHandler("onPlayerWasted", root, function(attacker,attackerweapon) if (getElementData(attacker, "Score") == false) or (getElementData(attacker, "Score") == nil) then setElementData(attacker, "Score", 1) setElementData(source, "Score", -1) else setElementData( attacker, "Score", getElementData(attacker,"Score")+1) setElementData( source, "Score", getElementData(source,"Score")-1) end ) He forgot to check or the data even exists.
  18. Why don't you test it by yourself? Then you know or it is the right way to do it. (If it works) Put an 'outputChatBox' in to check or it's right.
  19. If clicked on a button, then use 'destroyElement'/'guiSetVisible' on them and make the other buttons show.
  20. Add events like 'onPlayerSpawn' (With setTimer) (If RACE) and 'onPlayerVehicleEnter' or however the events are called
  21. You are welcome. Now only you have the problem if you are playing RACE:DD that the last player is staying alive and has to press enter in order to change the map.
  22. Isn't it returning "infernus.txd" ? It only says fileName so I would think without the path name?
×
×
  • Create New...