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
    • Open Source Contributors
    • Suggestions
  • General MTA
    • News
    • Media
    • Site/Forum/IRC/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • community.mtasa.com
    • 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
  • 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


Gang


Location


Occupation


Interests

Found 40 results

  1. I want get online player count from my secondary server, and show with a label.. But how is it possible?
  2. Привет всем! Не знаю как правильно написать скрипт Нужно сделать так, чтобы делалось 100 хп, если хп меньше 10. Буду рад помощи
  3. 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.
  4. 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:
  5. Ivan Orel

    Save player's fighting style

    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! :)
  6. 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?
  7. TheGrimReaper

    [help] Display Player Account data

    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
  8. 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
  9. 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?
  10. VEILUS

    How to freeze my player?

    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
  11. 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..
  12. When i press the F11, just the local player blip displayed, and the other players are not.. How to fix this?
  13. WezzarD

    setPlayerPosition

    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.
  14. syxx1337

    [HELP] Player Damage

    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)
  15. 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?
  16. -RL-

    Help with game mode

    I'm making a game mode. but could you help me when the person dies return it to the lobby? Thank you
  17. --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((
  18. 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.
  19. 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
  20. Starztec

    GET account ID

    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!
  21. 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
  22. Hello! I've made a login panel. After the player logs in, he'll need to select which character he wanna play with. At this point, the player see the selected character in gta world (interior: 0) and a window with his characters. Because if it's interior 0, I want to make only the local player see that character in the world, how is that possible if I can't set the camera's dimension?
  23. WorthlessCynomys

    [QUESTION] Movement replay

    Hello. Is it possible to make a script that records your movement and then makes a ped do it after you? The exact same thing? Because I tried to do that, with 3 or 4 methods, but the closest I got was like a 5 meters miss at the end of the replay.
  24. Dking2001

    set ped rotation to player rotation

    hi guys i have a problem to set ped rotation like player rotation always i mean if you change yor rotation the ped change his rotation too sorry for bad English here is the code local pylonid = 2662 local pylon_x, pylon_y = 0, 0.5 local pylon_c, pylon_v = 0, 0 local pylonheight = 0 local pylonscale = 1.3 local function pylonHead(player, command) if not pylon or pylon == nil then local px, py, pz = getElementPosition( player ) pylon = createObject( pylonid, px, py, pz) attachElements(pylon, player, pylon_x-1, pylon_y, pylonheight, 0, 0, 180) setObjectScale( pylon, pylonscale ) setElementCollisionsEnabled( pylon, true ) myBlip = createBlipAttachedTo ( player, 19 ) ped = createPed( 105, px, py, pz) attachElements( ped, player, pylon_c-2, pylon_v, pylonheight) setPedAnimation(ped, "wuzi", "wuzi_walk") peda = createPed( 33, px, py, pz) attachElements( peda, player, pylon_c-1, pylon_v-1, pylonheight) setPedAnimation(peda, "wuzi", "wuzi_walk") pedb = createPed( 33, px, py, pz) attachElements( pedb, player, pylon_c, pylon_v-1, pylonheight) setPedAnimation(pedb, "wuzi", "wuzi_walk") pedc = createPed( 105, px, py, pz) attachElements( pedc, player, pylon_c-2, pylon_v-1, pylonheight) setPedAnimation(pedc, "wuzi", "wuzi_walk") else detachElements( pylon, player ) detachElements( ped, player ) detachElements( peda, player ) detachElements( pedb, player ) detachElements( pedc, player ) destroyElement( pylon ) setPedAnimation(ped, "riot", "riot_angry") setPedAnimation(peda, "riot", "riot_chant") setPedAnimation(pedb, "riot", "riot_punches") setPedAnimation(pedc, "riot", "riot_shout") destroyElement( myBlip ) pylon = nil end end addCommandHandler("bnr", pylonHead) i want the peds (ped , peda , pedb and pedc) moveing with me i need only to set rotation changing with me thank you ... mta server write like this [00:53:36] WARNING: banner\pylonhead.lua:28: Bad argument @ 'setElementRotation' [Expected element at argument 1, got number '0']
  25. السلام عليكم المشكلة باختصار انه انا اريد اسوي بيد (ped) واخلي الروتيشن حقه مثل الروتيشن حق اللاعب يعي يتغير باستمرار قصدي من يفتر اللاعب يفتر معاه البيد يعني من يغير اللاعب الروتيشن حقه ابي يسوي البيد setElementRotation(thePed, (getPlayerRotation (thePlayer) ) ) بس حاليا المشكلة اني ما اعرف كيف اجيب كود انه اذا تغير روتيشن اللاعب ولعلمكم انا مخلي ped attached with player pedc = createPed( 105, px, py, pz) attachElements( pedc, player, pylon_c-2, pylon_v-1, pylonheight) setPedAnimation(pedc, "wuzi", "wuzi_walk")