Jump to content

PoliceSA

Members
  • Posts

    15
  • Joined

  • Last visited

Everything posted by PoliceSA

  1. It Work just for the local player but the other no ..i should trigger it via server but i don't know how
  2. Like That? .... for id,v in ipairs(players)do dxDrawText(getPlayerName(v), x + 60,420*id, x, screenHeight, tocolor(255, 255, 255, 255), 1, "default-bold", "left", "top", false, false, true, true, false)
  3. Okay but this is for just 1 player and others?
  4. .... local team = getPlayerTeam(localPlayer) if not(team)then return end local players = getPlayersInTeam(team) for k,v in ipairs(players)do dxDrawText (whatishouldputhere?, x + 60, 420, x, y, tocolor( 255, 255, 255 ), 1, "default-bold" ) end
  5. Aahah thx but what should I put in the client? Cuz i'm not good to script i should use on server like that? for k, v in ipairs(allPlayers) do if(getTeamName(getPlayerTeam(v)) == "team[1]") then local playerName = getPlayerName(v) table.insert(mtaTeamPlayers, #mtaTeamPlayers, playerName); triggerClientEvent (source, "TriggerToClient", g_Root, mtaTeamPlayers) end end
  6. How? can you explain me please?
  7. There is a way to get the name of all players on my team called for example : MTA, and write they're name with dxdrawtext ?
  8. Can you explain better how i can do that?
  9. I tried with this script too : local file = xmlLoadFile("meta.xml") for i, v in ipairs(xmlNodeGetChildren(file)) do local name = xmlNodeGetName(v) if name == "settings" then local sname = xmlNodeGetAttribute(v,"name") if sname == "#time" then local value = xmlNodeGetAttribute(v, "value") if value then value = string.gsub(value, "%s+", "") value = string.gsub(value, "[%[%]]", "") setTime(value:match('(%d+)%d+)')) realtime = value else setTime(12,0) end end end end but still doesn't set the correct time
  10. no, i failed when i wrote that.. (look edit)
  11. function SetTime() local mapMeta = xmlLoadFile("meta.xml") local value = xmlNodeGetAttribute(mapMeta, "value") local dotPos = string.find(value,":")-- The Problem local hours = string.sub(value,1,dotPos-1) local minutes = string.sub(value,dotPos+1,string.len(value)) setTime(tonumber(hours),tonumber(minutes)) setMinuteDuration(1000000000) outputChatBox("Time Setted") end Error : bad argument #1 to 'find' string expected got boolean
×
×
  • Create New...