Jump to content

Et-win

Members
  • Posts

    1,390
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Et-win

  1. guiSetVisible ( oknoo, false ) guiSetVisible: Does it need to be visible? No = false and yes = true. So set it to true Also, you don't have to put the code there, because if you create it it is visible automatically.
  2. Explain what you want exactly...
  3. Well, it's this line atleast: if teams[i] == getTeamName(getPlayerTeam(player)) then Put 'getTeamName(getPlayerTeam(player))' into a variable and output it, also for 'teams' and check or they are both the same. 1 of these must be wrong.
  4. function dMarker() destroyElement(source) end addEventHandler("onMarkerHit", getRootElement(), dMarker)
  5. Never mind what I said about , I looked wrong. But why putting it into a table and not just a variable?
  6. destroyElement --Event: (Server-side) onMarkerHit
  7. Et-win

    Team health

    function showteamhealth ( command, snipers ) local steam = getTeamFromName ( snipers ) if ( steam ) then health = 0 for i, player in ipairs(getPlayersInTeam(steam)) do health = health + getElementHealth(player) end outputChatBox("Team "..steam.." has " .. tostring(health) .. " %health", getRootElement(), 255, 255, 255, true) end end addCommandHandler ( "snipers", showteamhealth ) This should work. PS: This gets the team you have entered in the command. (e.g. /snipers teamname1)
  8. Et-win

    Team health

    ...No, look to the function. It has to be snipers instead of Snipers local steam = getTeamFromName ( snipers )
  9. function memoannouncement(tPlayer) xml = xmlLoadFile ( ":CGlogin/announcements.xml" ) if (xml ~= false) then --If loading the file wasn't failed, then: children = xmlNodeGetChildren(xml) for placeNumber, childrenData in ipairs(children) do --Loop through all childs in the XML file. attr = xmlNodeGetAttributes(childrenData) --Get all attributes with values for attributeData, valueData in pairs(attr) do --For every attribute, do: outputChatBox(attributeData..": "..valueData, tPlayer) end end else outputChatBox("Error loading announcements files", tPlayer) end end addCommandHandler("testmemo", memoannouncement) 'xmlNodeGetAttributes' returns a table of arrays/keys(?). Also this needs to be looped through with 'pairs' and not with 'ipairs'. 'xmlNodeGetChildren' needs to be looped though with 'ipairs', because this code returns a table with indexes. I think you are using this server-side, otherwise, remove ", tPlayer". Made this 'start' for you, now you can make your script further from here. -- XML doesn't 'support' those signs
  10. Depends. If you do: triggerClientEvent(the-player-element(Who hitted the marker), ........ Then it does.
  11. Et-win

    Skin mod

    <script src="script.lua" type="client" />
  12. So first the resource get's loaded + scripts, and then all event's get started? And if so, what about replacing event 'onResourceStart' to functionname() ?
  13. The function changeLights couldn't be found. Move the function ALWAYS (If starting with resource start) above the addEventHandler, so above function createCarPanel.
  14. 1. What is wrong/not working? 2. Better you get a paid scripter, because you are constantly sending scritps which are not yours and to let get fixed by us.
  15. xmlNodeGetChildren xmlNodeGetAttribute
  16. As soon as you are going to be more clear about what you are doing, I, maybe others, will help you again.
  17. 'getZoneName' returns a string of the zone name. If it is in the table, then that is 'playerZoneName', otherwise "None". So this can't be the problem. Same for this one. @Mr.Risk: I doubt that nothing output's in the chatbox. Also, if I see the meta file, I highly doubt you made this script.
  18. I have no idea what you are doing wrong. It just should work. Make a new resource, then maybe it solves while you don't know what you did wrong.
  19. I used what you send me... It's working by me... So no need for that.
  20. Mmm, well it's working on my server. Are you really sure it's running? And using 't' chat?
  21. Post your script and meta.
  22. Well try this again then, is the script running, is it server-side in meta? This just works.
  23. It just works on my server. So, do it again, lol.
×
×
  • Create New...