Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. You put "objects" instead of "object" in some of the tags. Next time you can use this website to look for syntax errors: http://www.w3schools.com/xml/xml_validator.asp
  2. getPlayersOnline = function () local playersOnline = getElementsByType ( "player" ) local playersO = 0 for count, playerOn in pairs(playersOnline) do playersO = playersO + 1 end return playersO end That function is completely useless, you can simply use: playersO = #getElementsByType ( "player" ) About the other problem, try this: function Scoreboard() dxDrawImage(X,Y,Width,Height, "images/back.png") dxDrawText("Name", X+60, Y+10, Width,Height, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, true, false, false) dxDrawText(getPlayersOnline().."/50" ,X+525, Y-15, Width,Height, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("Ping", X+480, Y+10, Width, Height, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, true, false, false) dxDrawText("Geld", X+210, Y+10, Width, Height, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, true, false, false) dxDrawText("Team", X+350, Y+10, Width, Height, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, true, false, false) local players = getElementsByType ( "player" ) local playas = 0 local playerheight = 20 for amt, player in pairs(players) do playas = playas + 1 if (playas <= 20) then local ping = getPlayerPing(player) local teamp = getPlayerTeam(player) local teamn = getTeamName(teamp) local money = tonumber ( getElementData(player, "playerMoney") ) or 0 if (ping >= 250) then r,g,b = 255,0,0 elseif (ping >= 120) then r,g,b = 255,69,0 else r,g,b = 0,255,0 end dxDrawText(getPlayerName ( player ), X+60,Y+60+playerheight*(amt-1), Width,Height, tocolor(255,255,255), 1 , "default-bold","left", "top",false, false,true,true) dxDrawText(ping,X+480,Y+60+playerheight*(amt-1), Width, Height, tocolor(r,g,b), 1, "default","left", "top",false,false,true,true) dxDrawText( tostring ( money ) .." $", X+210,Y+60+playerheight*(amt-1),Width, Height, tocolor(255,255,255), 1, "default","left", "top",false, false, true, true) dxDrawText(teamn, X+350,Y+60+playerheight*(amt-1),Width, Height, tocolor(255,255,255), 1, "default","left", "top",false, false, true, true) end end end
  3. You haven't posted the full script.
  4. You need onClientRender to draw it, where is it?
  5. Well, that's just the GUI, you have to make it load the animations from the XML file using the functions I posted earlier.
  6. The best way to make interactive DX is to compare the cursor position.
  7. Yes, you can add as many groups as you want. To add them you just take one as example, it's exactly the same way.
  8. No need to do that? the script I gave you earlier will update the element data when the money changes.
  9. Yes, it should work just fine, go ahead a try it.
  10. local currentMoney = 0 addEventHandler ( "onClientRender", root, function ( ) local money = getPlayerMoney ( ) if ( currentMoney ~= money ) then outputChatBox ( money ) setElementData ( localPlayer, "playerMoney", money ) currentMoney = money end end ) I'm not sure how efficient this is, it'll set the element data "playerMoney" everytime the player's money changes. Then you can use getElementData to get the player money.
  11. Yes, you can use the same one.
  12. Use the following functions: xmlLoadFile -- To load the XML files xmlNodeGetChildren -- To get the XML children and a for-loop to loop all the children to add them to the gridlist.
  13. Castillo

    setTimer

    That's what my code will do, it'll trigger that event 15 seconds after the player spawned.
  14. Castillo

    setTimer

    setTimer ( triggerServerEvent, 15000, 1, "ClientHaveLevel", getLocalPlayer() ) --active weapons Is that what you mean?
  15. No, it would be a lot easier to make your own from scratch.
  16. You want the gates to don't open or close if they are already being opened/closed?
  17. If you load the map as ".map" then it's not possible, maps don't get saved in the player's HDD.
  18. That spawn system and the private vehicle system are made by me, and they are obviously leaked from a server to which I sold them to. Topic locked.
  19. Post the client side script.
  20. Castillo

    No response

    'vehicle' is not defined anywhere.
  21. La unica manera de hacer esto es hacer al vehiculo indestructible ( damage proof ).
  22. Your answer has nothing to do with what he's asking. @Jacobob: I guess that you'll have to edit the script to edit how it works.
  23. El script es server side o client side? si es client side te recomiendo usar onClientRender o onClientPreRender.
×
×
  • Create New...