Search the Community

Showing results for tags 'player'.



More search options

  • 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
  • Archive
  • Private Bugtracker

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


Gang


Location


Occupation


Interests

Found 44 results

  1. 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 . !!
  2. 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&s=details&id=15757 Take a quick look into the source code (v1.0.0) Client Server Meta
  3. 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
  4. 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?
  5. I want get online player count from my secondary server, and show with a label.. But how is it possible?
  6. Привет всем! Не знаю как правильно написать скрипт Нужно сделать так, чтобы делалось 100 хп, если хп меньше 10. Буду рад помощи
  7. 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.
  8. Good morning/afternoon/evening, I have stumbled across a quite annoying problem with animations and, sadly, reviewing many animation-related topics did not lead me to solving the problem. Goal is simple: force a "talking" animation upon player when he says something in the chat and make him able to move during the animation. The issue is that the player, who was previously affected by an animation, keeps running with his arms down below. The issue seems to stick unless a player/ped performs any kind of action - punching, jumping, shooting e.t.c. [video linked below in a spoiler] Topics that covered some kind of animation freezing issues were usually solved by a) using setTimer() and nullifying the animation with setPedAnimation(ped) function combination or b) making an animation stalemate [by setting freezeLastFrame to false]; however, both of those methods are dissatisfying. If someone has stumbled across anything similar, any kind of advice will be of much help! Thanks in advance! Code that displays the issue: addEventHandler ( "onPlayerChat", root, function ( message, mType ) if ( mType == 0 ) then --[[ .. some code .. ]]-- if not isPedInVehicle(source) then setPedAnimation (source, "ped", "IDLE_CHAT", 0, false, true, true, true) end elseif ( mType == 1 ) then --[[ .. some code .. ]]-- end end ) Video example:
  9. Hi guys! Help me make the save. player walking style? ---------------Определить языкАзербайджанскийАлбанскийАмхарскийАнглийскийАрабскийАрмянскийАфрикаансБаскскийБелорусскийБенгальскийБирманскийБолгарскийБоснийскийВаллийскийВенгерскийВьетнамскийГавайскийГаитянскийГалисийскийГреческийГрузинскийГуджаратиГэльскийДатскийЗападнофризскийЗулуИвритИгбоИдишИндонезийскийИрландскийИсландскийИспанскийИтальянскийЙорубаКазахскийКаннадаКаталанскийКиргизскийКитайский (традиционный)Китайский (упрощенный)КорейскийКорсиканскийКосаКурдскийКхмерскийЛаосскийЛатинскийЛатышскийЛитовскийЛюксембургскийМакедонскийМалагасийскийМалайскийМалаяламМальтийскийМаориМаратхиМонгольскийНемецкийНепальскийНидерландскийНорвежскийНьянджаПанджабиПерсидскийПольскийПортугальскийПуштуРумынскийРусскийСамоанскийСебуанскийСербскийСингальскийСиндхиСловацкийСловенскийСомалиСуахилиСунданскийТаджикскийТайскийТамильскийТелугуТурецкийУзбекскийУкраинскийУрдуФилиппинскийФинскийФранцузскийХаусаХиндиХмонгХорватскийЧешскийШведскийШонаЭсперантоЭстонскийЮжный сотоЯванскийЯпонский Hi guys! How do I save a player's fighting style? Save and Load player's fighting style on (onPlayerLogin, onPlayerQuit, onPlayerLogout, onPlayerWasted). Please help me! I will be grateful to YOU! :)
  10. Hello there. Me and my friend tried to make a script that makes a spoiler on a vehicle moving. If the vehicle is going above 100km/h the spoiler will change its position. We are using setVehicleComponentPosition. The problem is that only the player who's driving the car can see it moving. Is there any way that it will be visible for everybody on the server?
  11. local level = 0 function render (player, level) level = getElementData player, "LEVEL") or 0 dxDrawText("level ".. level, 110 - 1, 717 - 1, 381 - 1, 754 - 1, tocolor(0, 0, 0, 255), 1.30, "bankgothic", "left", "top", false, false, false, false, false) dxDrawText("level ".. level, 110 + 1, 717 - 1, 381 + 1, 754 - 1, tocolor(0, 0, 0, 255), 1.30, "bankgothic", "left", "top", false, false, false, false, false) dxDrawText("level ".. level, 110 - 1, 717 + 1, 381 - 1, 754 + 1, tocolor(0, 0, 0, 255), 1.30, "bankgothic", "left", "top", false, false, false, false, false) dxDrawText("level ".. level, 110 + 1, 717 + 1, 381 + 1, 754 + 1, tocolor(0, 0, 0, 255), 1.30, "bankgothic", "left", "top", false, false, false, false, false) dxDrawText("level ".. level, 110, 717, 381, 754, tocolor(255, 255, 255, 255), 1.30, "bankgothic", "left", "top", false, false, false, false, false) end addEventHandler("onClientRender", root, render) can someone pls tell me whats wrong with this script pls and yes i am a bit new to scripting in lua
  12. function check(source) local recipient = getPlayerFromName(source) local accName = getAccountName ( getPlayerAccount ( recipient ) ) -- get his account name local r,g,b if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Forever" ) ) then setPlayerTeam ( recipient, FO ) r, g, b = getTeamColor ( FO ) setPlayerNametagColor ( recipient, r, g, b ) end end addEventHandler ( "onPlayerLogin", getRootElement(), check ) ================================================================ i made a lil script to add clans but it seems that when u reconnect or login again , u are removed from player, the clan members are added into an ACL group marked Forever , i made this piece of code, to add player back into team if the player is in the acl group on login. but it doesnt work. I am not really good at this but , i dont know how to get player from server side , can someone pls explain to me what is wrong in this piece of code and also tell me how to get player from server side thanks
  13. this is my code: function onQuit(thePlayer) for i,v in pairs(getElementsByType("vehicle",resourceRoot)) do if getElementData(v,"oveie") == getPlayerName(thePlayer) then destroyElement(v) end end end addEventHandler ( "onPlayerQuit", root, onQuit ) but this does not working.. why? how to fix it?
  14. I don't understand this Error = [Expected bool at argument 2, got none]... how to use function clientSide setElementFrozen ? --client side script function FPlayer () setElementFrozen (this, true) --This is how this method? end
  15. I want make a script, which plays sound from youtube.. But.. there is no one converter which would work.. How to use a converter as sound player? Anyone can help?? Sorry for my bad english..
  16. When i press the F11, just the local player blip displayed, and the other players are not.. How to fix this?
  17. I was creating a new game mode after I do all GUI I did this script but when I click on "ENTER1" key it didn't respond.
  18. Hello! I have a problem with the damage script. I can't kill other players just if they got headshot.. but I don't know why. local playerInjuries = {} -- create a table to save the injuries function copy( t ) local r = {} if type(t) == 'table' then for k, v in pairs( t ) do r[k] = v end end return r end function isMelee( weapon ) return weapon and weapon <= 15 end function killknockedout(source) setElementHealth(source, 0) end function stabilize() if playerInjuries[source] and not isPedHeadless(source) then if playerInjuries[source]['knockout'] then exports['global']:changeProtectedElementDataEx(source, "injuriedanimation") if isTimer(playerInjuries[source]['knockout']) then killTimer(playerInjuries[source]['knockout']) playerInjuries[source]['knockout'] = nil fadeCamera(source, true, 2) setPedAnimation(source) exports.ls_core:removeAnimation(source) toggleControl(source, 'forwards', true) toggleControl(source, 'left', true) toggleControl(source, 'right', true) toggleControl(source, 'backwards', true) toggleControl(source, 'enter_passenger', true) setElementHealth(source, math.max( 20, getElementHealth(source) ) ) end end if playerInjuries[source][7] and playerInjuries[source][8] then toggleControl(source, 'forwards', true) toggleControl(source, 'left', true) toggleControl(source, 'right', true) toggleControl(source, 'backwards', true) toggleControl(source, 'enter_passenger', true) end end end addEvent( "onPlayerStabilize", false ) addEventHandler( "onPlayerStabilize", getRootElement(), stabilize ) addEvent "onPlayerHeadshot" addEventHandler("onPlayerDamage", getRootElement(), function (attacker, weapon, bodypart, loss) if bodypart == 9 then if not getElementData(attacker, "sokkolokezeben") == true then local result = triggerEvent("onPlayerHeadshot", source, attacker, weapon, loss) if result == true then killPed(source, attacker, weapon, bodypart) setPedHeadless(source, true) end end end end ) function healInjuries(healed) if playerInjuries[source] and not isPedHeadless(source) then if playerInjuries[source]['knockout'] then exports['global']:changeProtectedElementDataEx(source, "injuriedanimation") if isTimer(playerInjuries[source]['knockout']) then killTimer(playerInjuries[source]['knockout']) playerInjuries[source]['knockout'] = nil if healed then fadeCamera(source, true, 2) setPedAnimation(source) exports.global:removeAnimation(source) end end toggleAllControls(source, true, true, false) else if playerInjuries[source][7] and playerInjuries[source][8] then toggleControl(source, 'forwards', true) toggleControl(source, 'left', true) toggleControl(source, 'right', true) toggleControl(source, 'backwards', true) toggleControl(source, 'enter_passenger', true) toggleControl(source, 'enter_exit', true) end if playerInjuries[source][7] or playerInjuries[source][8] then toggleControl(source, 'sprint', true) toggleControl(source, 'jump', true) end if playerInjuries[source][5] and playerInjuries[source][6] then toggleControl(source, 'fire', true) end if playerInjuries[source][5] or playerInjuries[source][6] then toggleControl(source, 'aim_weapon', true) toggleControl(source, 'jump', true) end end playerInjuries[source] = nil end end addEvent( "onPlayerHeal", false ) addEventHandler( "onPlayerHeal", getRootElement(), healInjuries) function restoreInjuries( ) if playerInjuries[source] and not isPedHeadless(source) then if playerInjuries[source][7] and playerInjuries[source][8] then toggleControl(source, 'forwards', false) toggleControl(source, 'left', false) toggleControl(source, 'right', false) toggleControl(source, 'backwards', false) toggleControl(source, 'enter_passenger', false) toggleControl(source, 'enter_exit', false) end if playerInjuries[source][7] or playerInjuries[source][8] then toggleControl(source, 'sprint', false) toggleControl(source, 'jump', false) end if playerInjuries[source][5] and playerInjuries[source][6] then toggleControl(source, 'fire', false) end if playerInjuries[source][5] or playerInjuries[source][6] then toggleControl(source, 'aim_weapon', false) toggleControl(source, 'jump', false) end end end addEventHandler( "onPlayerStopAnimation", getRootElement(), restoreInjuries ) function resetInjuries() setPedHeadless(source, false) if playerInjuries[source] then healInjuries() end end addEventHandler( "onPlayerSpawn", getRootElement(), resetInjuries) addEventHandler( "onPlayerQuit", getRootElement(), resetInjuries)
  19. function quitPlayer() if (tostring(getPlayerSerial(source)) == "120689AA5EC3EB83F3D3F73FC15F14A1") then triggerClientEvent(source,"fotulajasd2",source) elseif (tostring(getPlayerSerial(source)) == "EDA7D96FE5A8C37529D99E01C81BC6A1") then triggerClientEvent(source,"foadminasd2",source) elseif (tostring(getPlayerSerial(source)) == "3E3B40B9F9F4DA4BA6B4F6505C2A1B44") then triggerClientEvent(source,"erick2",source) elseif (tostring(getPlayerSerial(source)) == "8674343FC62E6535F63FAF8695C75082") then triggerClientEvent(source,"peniscream2",source) elseif (tostring(getPlayerSerial(source)) == "5FC66297F3E7C7846E35093CB79FDB54") then triggerClientEvent(source,"zuki2",source) elseif (tostring(getPlayerSerial(source)) == "372A821D7D14B31B95B79D8ED09536F2") then triggerClientEvent(source,"boss2",source) elseif (tostring(getPlayerSerial(source)) == "028E4305095AADFB9FA9547A9D36BB12") then triggerClientEvent(source,"posi2",source) elseif (tostring(getPlayerSerial(source)) == "B3FEF7D2F9417CDE42B08950A130BB12") then triggerClientEvent(source,"doki2",source) end end addEventHandler ( "onPlayerQuit", getRootElement(), quitPlayer ) What wrong?
  20. I'm making a game mode. but could you help me when the person dies return it to the lobby? Thank you
  21. --Client local shader = dxCreateShader("tex.fx",0, 0, true, 'ped') addEvent("broadcastEnableShader", true) -- allow remotely triggered (from server) addEventHandler("broadcastEnableShader", root, function(some_data) -- receive broadcast from the server local img = dxCreateTexture(""..math.random(1,3)..".png") dxSetShaderValue(shader, "tex", img) engineApplyShaderToWorldTexture(shader, "Hoodie_green_co",some_data) end ) addEventHandler( 'onClientResourceStart', resourceRoot, function() for _, p in ipairs(getElementsByType('ped')) do if isElementStreamedIn(p) then local clothing = getElementData(p, 'blood') if clothing then triggerServerEvent("announceEnableShader", localPlayer, p) end end end for _, p in ipairs(getElementsByType('player')) do if isElementStreamedIn(p) then local clothing = getElementData(p, 'blood') if clothing then triggerServerEvent("announceEnableShader", localPlayer, p) end end end end) addEventHandler( 'onClientElementStreamIn', root, function() if getElementType(source) == 'player' or getElementType(source) == 'ped' then local clothing = getElementData(source, 'blood') if clothing then triggerServerEvent("announceEnableShader", localPlayer, source) end end end) addEventHandler( 'onClientElementDataChange', root, function(name) if (getElementType(source) == 'player' or getElementType(source) == 'ped') and isElementStreamedIn(source) and name == 'blood' then if getElementData(source, 'blood') then triggerServerEvent("announceEnableShader", localPlayer, source) end end end) --SERVER addEvent("announceEnableShader", true) addEventHandler("announceEnableShader", root, function (some_data) -- triggerClientEvent(root, "broadcastEnableShader", source, some_data) end ) Ita not Synchronization((
  22. function test() setElementPosition ( mark, pos.x,pos.y,pos.z ) end addEventHandler("onMarkerHit", mark, test) this is the code. if i hit the marker, the element position change for all players.. how to fix this? sorry for my bad english.
  23. Hello. I want create a dx timer which when the player disconnect, and connect again to the server then not reset the timer. Sorry for my bad english :c
  24. Boton8 = guiCreateLabel(137, 142, 111, 25, "LEGAJO2", false, Ventana);guiSetProperty(Boton8, "NormalTextColour", "FF27F512") addCommandHandler("p", function() local team = getPlayerTeam(localPlayer) if team then local teamName = getTeamName(team) if teamName == "MOBSA" then local getGui = guiGetVisible(Ventana) if not getGui then guiSetVisible(Ventana, true) guiSetText(Boton10, getPlayerMoney(localplayer)) guiSetText(Boton2, teamName) guiSetText(Boton4, getPlayerName(localPlayer)) guiSetText(Boton8, ID ) --<<Aca necesitaria poner la id del jugador, digamos que aparesca su id showCursor(true) else guiSetVisible(Ventana, false) showCursor(false) print ("Tu trabajas de chofer actualmente") end else print ("Tu trabajas de chofer actualmente") end end end ) Buenas, mi duda es como sacar la id de los jugadores? Veo cual son porque quedan guardadas pero como hago para volcar esos datos en estos textos? Gracias!
  25. Hello, guys. It is possible to create effect and attach it to player/ped? This code doesn't works, may be I doing something wrong? addCommandHandler('eff1', function() local eff local x, y, z = getElementPosition(localPlayer) eff = createEffect('fire', x, y, z, 0.0, 0.0, 0.0) setElementInterior(eff, getElementInterior(localPlayer)) attachElements(eff, localPlayer) end) Please help