Jump to content

Search the Community

Showing results for tags 'player'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

  1. hi guys Is it possible to add a sound effect like this video to the sound of the player? I want to make a megaphone for police video : megaphone voice
  2. Hello everyone, I have a question about this script that I found in the community. It doesn't have any errors on startup, I just want to know how I could hide the local player's tag but keep others visible. Client side: myfont = "default-bold" nametags_Root = getRootElement() nametags_ResRoot = getResourceRootElement(getThisResource()) nametags_Players = getElementsByType('player') nametags_Me = getLocalPlayer() nametag = {} local nametags = {} local sWidth,sHeight = guiGetScreenSize() local Nametags_Hide = false local Nametags_Scale = 0.36 local Nametags_Alpha_Distance = 30 local Nametags_Distance = 40 local Nametags_Alpha = 255 local Nametags_Text_Bar_Space = 1 local Nametags_Width = 50 local Nametags_Height = 20 local Nametags_Size = 0.45 local Nametags_Outline_Thickness = 1.2 local Nametags_Alpha_Diff = Nametags_Distance - Nametags_Alpha_Distance Nametags_Scale = 1/Nametags_Scale * 800 / sHeight local maxScaleCurve = { {0, 0}, {3, 3}, {13, 5} } local textScaleCurve = { {0, 0.8}, {0.8, 1.2}, {99, 99} } local textAlphaCurve = { {0, 0}, {25, 100}, {120, 190}, {255, 190} } function nametags.Create ( player ) nametags[player] = true end function nametags.Destroy ( player ) nametags[player] = nil end addEventHandler ( "onClientRender", nametags_Root, function() if getElementData(getLocalPlayer(), "state.hud") == "disabled" then return end for i,player in ipairs(nametags_Players) do if isElement(player) then setPlayerNametagShowing ( player, false ) if not nametags[player] then nametags.Create ( player ) end end end if Nametags_Hide then return end local x,y,z = getCameraMatrix() for player in pairs(nametags) do while true do if not isElement(player) then break end if getElementDimension(player) ~= getElementDimension(nametags_Me) then break end local px,py,pz = getElementPosition ( player ) local bx, by, bz = getPedBonePosition( player, 5 ) if processLineOfSight(x, y, z, px, py, pz, true, false, false, true, false, true) then break end local playerDistance = getDistanceBetweenPoints3D ( x,y,z,px,py,pz ) if playerDistance <= Nametags_Distance then --Get screen position local sx,sy = getScreenFromWorldPosition( bx + 0, by, bz + 0.4 ) if not sx or not sy then break end --Calculate our components local scale = 1/(Nametags_Scale * (playerDistance / Nametags_Distance)) local alpha = ((playerDistance - Nametags_Alpha_Distance) / Nametags_Alpha_Diff) alpha = (alpha < 0) and Nametags_Alpha or Nametags_Alpha-(alpha*Nametags_Alpha) scale = math.evalCurve(maxScaleCurve,scale) local textScale = math.evalCurve(textScaleCurve,scale) local textAlpha = math.evalCurve(textAlphaCurve,alpha) local outlineThickness = Nametags_Outline_Thickness*(scale) --Requirements local team = getPlayerTeam(player) local level = getElementData(player, "LV") or 0 local Reputation = getElementData(player, "Reputation") or "player" local r,g,b = getPlayerNametagColor(player) local offset = (scale) * Nametags_Text_Bar_Space/2 local playerName = getPlayerName(player) local imageSize = dxGetFontHeight ( textScale*Nametags_Size, myfont ) local lp = getElementData(player, "experience.rank") or "Newbie" local bitt = interpolateBetween(40, 0, 0, 255, 0, 0, ((getTickCount()) / 1300), "SineCurve") local isim = getPlayerName(player):gsub('#%x%x%x%x%x%x', '') --Draw our text dxDrawText ( isim.."", sx + 0.5*scale, sy - offset + 0.5*scale, sx + 0.5*scale, sy - offset + 0.5*scale, tocolor(0,0,0,255), textScale*Nametags_Size*1., myfont, "center", "bottom", false, false, false, true, true ) dxDrawText ( playerName.."", sx, sy - offset, sx, sy - offset, tocolor(r,g,b,255), textScale*Nametags_Size*1., myfont, "center", "bottom", false, false, false, true, true ) nameWidth = dxGetTextWidth ( playerName.."", textScale*Nametags_Size, myfont ) teamWidth = nameWidth if Reputation then -- dxDrawImage ( sx - math.max(nameWidth/2, teamWidth/2) - 40*scale, sy - 2*imageSize, 7*imageSize, 2*imageSize, ""..Reputation..".png" ) end end break end end end ) function nametagsCreate() for i,player in ipairs(getElementsByType"player") do nametags.Create ( player ) nametags.Create ( localPlayer ) setElementData(player, "nametags", "enabled") end end addEventHandler('onClientResourceStart', nametags_Root, nametagsCreate) function nametagsCreateOnJoin() if source == nametags_Me then return end setPlayerNametagShowing ( source, false ) nametags.Create ( source ) end addEventHandler('onClientPlayerJoin', nametags_Root, nametagsCreateOnJoin) function nametagsDestroy() nametags.Destroy ( source ) end addEventHandler('onClientPlayerQuit', nametags_Root, nametagsDestroy) function math.lerp(from,to,alpha) return from + (to-from) * alpha end function math.evalCurve( curve, input ) if input<curve[1][1] then return curve[1][2] end for idx=2,#curve do if input<curve[idx][1] then local x1 = curve[idx-1][1] local y1 = curve[idx-1][2] local x2 = curve[idx][1] local y2 = curve[idx][2] local alpha = (input - x1)/(x2 - x1); return math.lerp(y1,y2,alpha) end end return curve[#curve][2] end function dxDrawColorText(str, ax, ay, bx, by, color, scale, font,alignX,alignY,clip, wordBreak, postGUI) local pat = "(.-)#(%x%x%x%x%x%x)" local s, e, cap, col = str:find(pat, 1) local last = 1 while s do if s ~= 1 or cap ~= "" then local w = dxGetTextWidth(cap, scale, font) dxDrawText(cap, ax, ay, ax + w, by, color, scale, font,alignX,alignY,clip, wordBreak, postGUI) ax = ax + w color = tocolor(tonumber("0x"..string.sub(col, 1, 2)), tonumber("0x"..string.sub(col, 3, 4)), tonumber("0x"..string.sub(col, 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,alignX,alignY,clip, wordBreak, postGUI) end end Thanks.
  3. سلام میخواستم بدونم چطور باید دیتا های پلیر مثل فکشنش اسکینش میزان پولش و غیره رو وقتی از سرور میره ذخیره کنم و وقتی دوباره بر میگرده همون اطلاعاتو بهش بدم؟
  4. what is noname player in server?
  5. Sziasztok, egy olyan scriptet szeretnék csinálni hogy pl beírom hogy /lightning [id] akkor egy villám csapjon a player-be és a player meghalljon, nem tudom hogy, hogy kezdjek hozzá, eddig csak 1 képem van a villámról, már mint egy texture, már csak az kellene hogy lehessen látni hogy belecsapjon. kellene egy kiinduló pont. segítségeket előre is köszönöm
  6. Olá, Tenho um Local host com as Seguientes configurações : Intel(R) Atom(TM) CPU 230 @ 1.60Ghz 2 GB de Ram Sistema Operacional Windows 7 Ultimamente x32(tema do windows xp para ficar lite) e Gostaria de Saber quantos Players Simultâneos eu Poderia Por nele sem ter Algum Problema Tipo : "200 Player Ping Subiu." Vale Lembrar que eu tenho uma Internet de 30MB de download e 15MB de Upload, mais são exatamente 30mb que não abaixa mais varia de 30 a 35mb de internet (Cabeado viu RJ45) e de 15 a 21 mb de upload.
  7. Is it possible to change the model for one person so that this person has a different model visible to others? In the sense that I change the model of the M4 weapon and how I hold it, it is visible to others that I have this model, but when they pull out their M4, they do not have this model. It is possible?
  8. What's wrong? scirpt: plalyer-> seat to vehicle-> pres space and draw handbrake image debugscript errors :((( code: function hand ( thePlayer ) local theVehicle = getPedOccupiedVehicle ( thePlayer ) if theVehicle then dxDrawImage(200,110,100,100,"hand.png", 255,255,255,true, theVehicle, thePlayer) end end bindKey("space","down", hand)
  9. Tirar o Nick e a barra de Vida de cima da cabeça do player. Eu queria tirar essa barra pq tenho um sistema de id e fica bugando, obg.
  10. Opa blz! Preciso de ajuda, como fazer para deixar outro jogador que não seja do grupo "VIPCARRO" pelo menos pegar carona ?? ? ? E também como fazer pra colocar ao invés da ACL do grupo, colocar o veiculo pelo nick do jogador ??? function enterVehicle(thePlayer, seat, jacked) local account = getPlayerAccount(thePlayer) if (not account or isGuestAccount(account)) then return end local accountName = getAccountName(account) if (getElementModel(source) == 602) and (not isObjectInACLGroup("user.".. accountName,aclGetGroup("VIPCARRO"))) then setVehicleLocked(source, true) outputChatBox("#ffff00SOMENTE MEMBROS DA #000000[ #ff0000Nome da gang #000000] #ffff00PODEM USAR ESSE VEICULO!", thePlayer) else setVehicleLocked(source, false) end end addEventHandler("onVehicleStartEnter",root,enterVehicle)
  11. I created a youtube player, and i want to remove the event handler, when the music ends, but i dont know how to get the song length from web browser... anyone can help?
  12. Scrolling through the tutorials, I found a script that displays players in the server when joining and quitting. function playerCount ( ) outputChatBox("#ff8800[server]: #ffffffPlayers: #ffffff(" .. getPlayerCount() .. "#ffffff)" , root, 255, 0, 0, true) end addEventHandler ( "onPlayerJoin", getRootElement(), playerCount ) addEventHandler ( "onPlayerQuit", getRootElement(), playerCount ) What would I have to add to trigger it with a command, such as "/players"?
  13. Buenas gente, necesito saber si ¿existe alguna función que permita identificar si un jugador que está dentro de un vehículo es el conductor o el pasajero? Si es así ¿cuál es? Por favor. Gracias ?
  14. Hola de nuevo, tengo un problema sobre un trabajo en este caso el de pizzero, cuestion que cuando dos personas hacen el trabajo si uno se queda en cualquier parte del mapa y el otro pasa por los markets para entregar la pizza les completa cada market a los dos o mas jugadores que esten trabajando, asi hasta llegar a la paga la verdad estoy un poco frustrado por que soy nuevo en esto y por ahora solo se editar cosas muy basicas pero esta no, espero que me puedan ayudar que tengan buen dia Estos son los c.Lua y el s.Lua : c.
  15. Hello I'm just asking for function or way to get the local player in the Server-Side in the mod Please explain me all the possible ways to get the local player in the Server-Side in Easy , Clear and detailed way Thank you !
  16. No errors / warnings in debugscript 3... then what wrong in this script? Client: requestBrowserDomains({"www.convertmp3.io"}) local browser = createBrowser( 1, 1, false ) local currentSound = {} addEvent( 'Play' , true ) addEventHandler( 'Play' , root , function( link ) local vehicle = getPedOccupiedVehicle ( source ) local x, y, z = getElementPosition(vehicle) currentSound[source] = playSound3D( link, x, y, z ) attachElements(currentSound[source],vehicle) setSoundMaxDistance(currentSound[source],30) setSoundVolume(currentSound[source],50) end ) function fetch(_,url) if url and url ~= "" then fetchRemote("http://www.convertmp3.io/fetch/?format=JSON&video="..url, callback) end end addCommandHandler("p",fetch) function callback(data, error) if (error ~= 0) then return outputChatBox(error) end if (data == "ERROR") then return outputChatBox("data error") end local data = fromJSON("["..data.."]") if (data) then outputChatBox("Title: "..data.title) outputChatBox("Length: "..data.length) outputChatBox("Link: "..data.link) loadBrowserURL( browser, data.link ) end end addEventHandler( "onClientBrowserNavigate", browser, function( link ) if not link:find("www.convertmp3.io") then triggerServerEvent( 'play' , localPlayer , link ) -- trigger the event when the script actially gets the playable link! end end ) server: addEvent( 'play' , true ) addEventHandler( 'play' , root , function( link ) triggerClientEvent( root , 'Play' , client , link ) end )
  17. Olá Pessoal, como fazer para clicar em um veículo e receber no chat uma localização da roda dele? Já tenho a ideia de como usar o getVehicleComponentPosition (algo do lado do cliente), mas como identificar ou veicular o que estou tentando ver no OnElementClicked é do lado Server? function rodadireita (source) local vehicle = --Queria por aqui o veiculo que estou clicando x, y, z = getVehicleComponentPosition ( vehicle , "wheel_rf_dummy", "world") outputChatBox ( "Cordenadas:"..x..", "..y..", "..z, 255, 255, 255, true ) end
  18. Sorry by my english. I need to get a value with the whole number of weapons the player has. (Whole Number from player's weapon). I'm trying to do this, but with no sucess: function getPedWeapons(ped) local playerWeapons = {} if ped and isElement(ped) and getElementType(ped) == "ped" or getElementType(ped) == "player" then for i=2,9 do local wep = getPedWeapon(ped,i) if wep and wep ~= 0 then table.insert(playerWeapons,wep) end end else return false end return playerWeapons end function SaberArmas (player) outputChatBox("Armas (Caso tenha armas elas serão listadas abaixo!)",player,255,0,0) for i,wep in ipairs(getPedWeapons(player)) do outputChatBox("Você tem: " .. getWeaponNameFromID(wep),player,0,255,0) end end addEventHandler("onMarkerHit", MarkerInfo, SaberArmas) The script is making a list not a Whole Number. Someone can help me ?
  19. Hoje recebi uma sugestão para melhorar meu servidor o seguinte mod : Ligar para tal jogador . Se tiver como pfv me respondam e oque devo usar para fazer esse mod se não tiver como pode falar . !!
  20. Regeneration (health) This resource lets you regenerate player and vehicle* health. It is not an unique idea, I know... but there weren't good implementations for it at the community resource list. So that's why I share this with YOU. * Vehicle regeneration for the driver only. Version 1.0.0 Not compiled! Smooth health regeneration No UI, just the manager Settings (Admin panel) Settings Regeneration [on/off] (player/vehicle) Regeneration value (player/vehicle) Regeneration delay (player/vehicle) Regeneration [on/off] while the vehicle is burning Download link: https://community.multitheftauto.com/?p=resources&amp;s=details&amp;id=15757 Take a quick look into the source code (v1.0.0) Client Server Meta
  21. Galera,ja fiz alguns posts aqui,ja estou bem caminhado,hoje fui fazer um script pensando no que eu queria fazer que era UM MARKER ONDE QUANDO EU ENTRASSE NELE ELE ABRIA UM PAINEL SO QUEM PODERIA USAR ESSE PAINEL ERA POLICIAL SE SAISSE DO MARKER O PAINEL SUMIA OU O PAINEL NAO ABRIRIA POR COMANDO CASO NAO FOSSE COM PAINEL QUERIA FAZER UM COMANDO QUE SO PODERIA SER EXECUTADO NAQUELE MARKER QUERIA FAZER TIPO UM COMANDO DENTRO DE OUTRO,TIPO /PRENDER (NICK) (MOTIVO) (TEMPO) SO CONSIGO FAZER O /PRENDER (NICK) E O POLICIAL PUDESSE PRENDER PESSOAS SEM ESTRELA TBM ME AJUDEM POR FAVOR Discord: CarllosDrift7412
  22. This is the code: requestBrowserDomains({"www.convertmp3.io"}) local browser = createBrowser( 0, 0, false ) local currentSound = {} function start(_,link) fetch(link) end addCommandHandler("play",start) function fetch(url) if (url) then fetchRemote("http://www.convertmp3.io/fetch/?format=JSON&video="..url, callback) end end function callback(data, error) if (error ~= 0) then return outputChatBox(error) end if (data == "ERROR") then return outputChatBox("data error") end local data = fromJSON("["..data.."]") if (data) then outputChatBox("Title: "..data.title) outputChatBox("Length: "..data.length) outputChatBox("Link: "..data.link) loadBrowserURL( browser, data.link ) end end addEventHandler( "onClientBrowserNavigate", browser, function( link ) if not link:find("www.convertmp3.io") then local vehicle = getPedOccupiedVehicle ( localPlayer ) local x, y, z = getElementPosition(vehicle) currentSound[localPlayer] = playSound3D( link, x, y, z ) attachElements(currentSound[localPlayer],vehicle) setSoundMaxDistance(currentSound[localPlayer],30) setSoundVolume(currentSound[localPlayer],50) end end ) How to synchronise to all players?
  23. I want get online player count from my secondary server, and show with a label.. But how is it possible?
  24. Привет всем! Не знаю как правильно написать скрипт Нужно сделать так, чтобы делалось 100 хп, если хп меньше 10. Буду рад помощи
  25. Hello everyone. I met 1 problem ~5 minutes ago. When player spawns, shader creates and applies on ped's texture (custom skin texture) dxCreateShader ( "shad.fx", 0, 0, false, "ped" ) Then i add image on as dxSetShaderValue material <--- everything OK here and i can see this texture. If i teleport somewhere using default freeroam resource/hit the marker (it changes my dimension), this texture disappeares. i use gTexture(source material) + my texture + alpha blending.
×
×
  • Create New...