Jump to content

Admigo

Members
  • Posts

    175
  • Joined

  • Last visited

Everything posted by Admigo

  1. Thats 1 or 2 years ago. I bought it from Skotinka and you gave the resources to me: scoreboard,joinquit and deathlist
  2. If you like it or not, I bought the resources from Skotinka.
  3. I dont know how i can make that.
  4. Heey all, How can i detect if the map is a [DM] or [DD] by detecting with part of the map name? Admigo
  5. Thanks but the problem is the maps are random so i dont know how to detect the next map.
  6. Hi all, How can i make the ''Next Map:'' text above ''Map:''? I dont even know where i need to put the code and how i can detect it. Please, need help. Admigo
  7. Heey all, I bought some scripts from WTF but they didnt decompile it and know i cant edit anything. Anyone has the WTF lua compiler for me? I really need it. Admigo
  8. I know that. Map Manager is running.
  9. Heey all, I have a problem with my admin panel. It doesnt shows my maps in the list. And at resources they are shown. How can i fix this? Admigo
  10. I already fixed that. Read my message^
  11. Thanks! Worked great. Only i need one thing: The spectators name are colored that is good but only its not detecting the team color. How can i fix it?
  12. Heey all, I am using this resource of mta to show the players who spectate you but this resource doesnt work cause it shows none. https://community.multitheftauto.com/ind ... ls&id=3136 Server side: [**********RRRRRRRBBBBBBB***********] [url=http://www.expertgamerz.clan.su]http://www.expertgamerz.clan.su[/url] << download script here local GATHER_FREQUENCY = 1000 -- how often in ms it should run the "spectator" function local playerData = {} local spectator_players = {} addEvent('onCameraTargetChange') addEvent('removeClient', true) addEvent('addClient', true) function elementCheck (elem) if elem then if isElement (elem) then if (getElementType (elem) == 'player') then return true end end end return false end function repairTable() for i, val in ipairs (spectator_players) do if not elementCheck (val) then if playerData[val] then if playerData[val].target then if (elementCheck(playerData[val].target) and playerData[val].target ~= val) then triggerClientEvent(playerData[val].target, 'removeSpectator', playerData[val].target, player) end end for k, v in ipairs (playerData) do if (k == val) then table.remove (playerData, k) end end end table.remove (spectator_players, i) end end end function spectators() for i, player in ipairs(spectator_players) do if elementCheck (player) then local target = getCameraTarget(player) if (not playerData[player]) then playerData[player] = {} end if (target ~= playerData[player].target) then -- if the target is different from previous one playerData[player].previous = playerData[player].target -- store the old target playerData[player].target = target -- store the new target triggerEvent('onCameraTargetChange', player, playerData[player].target, playerData[player].previous) end else repairTable() end end end setTimer(spectators, GATHER_FREQUENCY, 0) addEventHandler('onCameraTargetChange', root, function(target, oldTarget) if elementCheck (oldTarget) then -- if the old target is valid(ie. not false or nil(in which case the camera was fixed)) triggerClientEvent(oldTarget, 'removeSpectator', oldTarget, source) -- trigger for the old target to remove from his list end if (target == source) or (not target) then -- if the new target is invalid or facing the player who invoked the event return end if elementCheck (target) then triggerClientEvent(target, 'addSpectator', target, source) -- else we add the player to the targets list end end ) function removeClient() if (playerData[source]) then if (playerData[source].target) then triggerClientEvent(playerData[source].target, 'removeSpectator', playerData[source].target, source) end playerData[source] = nil end for i, val in ipairs(spectator_players) do if (val == source) then table.remove(spectator_players, i) end end end addEvent ('removeClient') addEventHandler ('removeClient', root, removeClient) function addClient() if elementCheck (source) then table.insert(spectator_players, source) end end addEvent ('addClient', true) addEventHandler ('addClient', root, addClient) addEventHandler ('onPlayerQuit', root, removeClient) Client side: ------------------------------------------------------ ----- Spectators Script Downloaded From Comunity ----- ------- Created By Zango Modified by SoundWave ------- ------------------------------------------------------ -- Set up variables and settings local x, y = guiGetScreenSize () local localPlayer = getLocalPlayer() local dxDraw = {} local dxDrawOutline = {} local spectatorSettings = { xOffset = (x/6.3), yOffset = y - (y/1.4)} local showSpectators = true function changeSpectatorsEnabled() showSpectators = not showSpectators end bindKey("F2","down",changeSpectatorsEnabled) local spectators = {} addEvent('addSpectator', true) addEvent('removeSpectator', true) addEventHandler('onClientResourceStart', root, function() triggerServerEvent ('addClient', localPlayer) end) addEventHandler('addSpectator', root, function(spectator) table.insert(spectators, spectator) end) addEventHandler('removeSpectator', root, function(spectator) for i, val in ipairs(spectators) do if (val == spectator) then table.remove(spectators, i) end end end) function elementCheck (elem) if elem then if isElement (elem) then if (getElementType (elem) == 'player') then return true end end end return false end -------------------------------------------------------- function drawSpectators() if showSpectators == true then local textX = x - spectatorSettings.xOffset local textY = spectatorSettings.yOffset scale = getScale(x) dxDrawText("Spectators: ",textX - 1, textY + 1, x, y, tocolor(0,0,0,255), scale, 'bankgothic') dxDrawText("Spectators: ",textX, textY, x, y, tocolor(255,190,0,255), scale, 'bankgothic') if not (isPlayerDead(localPlayer)) then if (#spectators > 0) then for i, v in ipairs(spectators) do if elementCheck (v) then local name = getPlayerName(v) if (i) then dxDrawOutline[i] = dxDrawText (" "..string.gsub(name,"#%x%x%x%x%x%x",""), textX - 1, (textY + scale) + (dxGetFontHeight(scale,'bankgothic') * i) + 1.5, x, y, tocolor(0,0,0, 255), scale, 'bankgothic') dxDraw[i] = dxDrawColorText (" "..name, textX, (textY + scale) + (dxGetFontHeight(scale,'bankgothic') * i), x, y, tocolor(255, 255, 255, 255), scale, 'bankgothic') end else table.remove (spectators, k) end end else dxDrawOutline[1] = dxDrawText ("None.", textX - 1, (textY + scale) + dxGetFontHeight(scale,'bankgothic') + 1.5, x, y, tocolor(0,0,0, 255), scale, 'bankgothic') dxDraw[1] = dxDrawColorText ("None.", textX, (textY + scale) + dxGetFontHeight(scale,'bankgothic'), x, y, tocolor(255, 255, 255, 255), scale, 'bankgothic') end end end end addEventHandler('onClientRender', root, drawSpectators) function dxDrawColorText(str, ax, ay, bx, by, color, scale, font) local pat = "(.-)#(%x%x%x%x%x%x)" local s, e, cap, col = str:find(pat, 1) local last = 1 while s do if cap == "" and col then color = tocolor(tonumber("0x"..col:sub(1, 2)), tonumber("0x"..col:sub(3, 4)), tonumber("0x"..col:sub(5, 6)), 255) end if s ~= 1 or cap ~= "" then local w = dxGetTextWidth(cap, scale, font) dxDrawText(cap, ax, ay, ax + w, by, color, scale, font) ax = ax + w color = tocolor(tonumber("0x"..col:sub(1, 2)), tonumber("0x"..col:sub(3, 4)), tonumber("0x"..col:sub(5, 6)), 255) end last = e + 1 s, e, cap, col = str:find(pat, last) end if last <= #str then cap = str:sub(last) local w = dxGetTextWidth(cap, scale, font) dxDrawText(cap, ax, ay, ax + w, by, color, scale, font) end end function getScale(w) local scale = (w*0.5)/1000 return scale end How can i fix it? Thanks Admigo
  13. I mean my nametag color is different then my car color. I have the nametag hex color same as the decimal color code from the vehicle color. How can i get the same color?
  14. Thanks for reply. But why my vehicle dont give the right color same as nametag?
  15. Heey all, Anyone here know what the hex color code of my car at my avatar is? And i need to define the color for a vehicle? Because i dont get the right color for the car. Thanks Admigo
  16. How can i still show the player blips on radar when they are in different dimension?
  17. But i placed this code in race_client. There needs to be a way that i can hide the lights from car+nitro. I need this code because when players have bad fps they will hide the players so the fps will increase. I think when u hide the players mta dont load the player data.
  18. Heey all, I have this code from kenix and solid: state = not state for _, v in pairs( getElementsByType 'player' ) do if v ~= localPlayer then local theVehicle = getPedOccupiedVehicle ( v ) if state then setPlayerNametagShowing( v, false ) setElementAlpha( v, 0 ) setElementAlpha (theVehicle, 0) else setPlayerNametagShowing( v, true ) setElementAlpha( v, 255 ) setElementAlpha (theVehicle, 255) end end end And added invisible vehicle but i still can see light and nitro of vehicle. And when someone in server enters a race pickup they cars and players will be visible again. How can i fix this problems? Thanks Admigo
  19. I cant test the codes,first i need players to join my server. mtasa://178.238.227.144:22003
  20. @kenix :I tested with a friend but f1 dont work. If i press f1 i can show/hide all players. i need it for [DM].
  21. I want that every player in server can press f1 if the want to hide/show players so it increase fps;) So what code can i use:P
  22. Heey all, I want to make a f1 key for making all other players invisible. I made this code(server side): iv = 0 function invis(thePlayer) for index, player in ipairs(getElementsByType("player")) do if (player ~= thePlayer) then if iv == 0 then iv = 1 setPlayerNametagShowing(player, false) setElementAlpha(player, 0) else iv = 0 setPlayerNametagShowing(player, true) setElementAlpha(player, 255) end end end end bindKey("F1","down",invis) But when i pres f1 nothing happens. No errors. Pls help, Thanks Admigo.
  23. Thanks Social and Solid,codes works great!
  24. server side or client side? I placed at client:S error:attempt to concatente a boolean amount.
×
×
  • Create New...