Jump to content

Search the Community

Showing results for tags 'ped'.

  • 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. This is my first post, so forgive me if i make any mistakes! I'm creating a Police Script where i get to a random Ped and type a command(i'll change it to bind later) and it creates a Marker attached(0,1,0) to the Source that if it touches the Ped will activate a function that makes him follow the Marker. And this is the function so far: Everything is Server-Side (because i suck at Client-Side) function func1(p) local x,y,z = getElementPosition(p) Marker = createMarker(x, y, z, "cylinder", 1, 255, 0, 0, 170) attachElements(Marker,p, 0,1,0) addEventHandler("onMarkerHit", Marker, func2) addEventHandler("onMarkerHit", Marker, func3) end addCommandHandler("render", func1) function fun2(p,_) if getElementType ( p ) == "ped" then x2,y2,z2 = getElementPosition(Marker) x1,y1,z1 = getElementPosition(p) rx,ry,rz = findRotation3D(x1,y1,z1,x2,y2,z2) setElementRotation(p, rx+0,ry+0,rz+0) setPedAnimation(p, "ped", "walk_player") setTimer(function() bunda(p,_) end, 999, 1) end end And then here's the devil: function func3(p, ped) if not getElementType ( ped ) == "ped" then return end --else return end --carro = getElementType ( carro ) carro = getElementsByType("vehicle") --psha = getElementColShape(p) --elements = getElementsWithinColShape(psha) --if elements == carro == "vehicle" then --local vee = getElementsByType(carro) -- and getElementType ( carro ) == "vehicle" then --if getElementType(p2) == "player" then --local vei = getPedOccupiedVehicle(p2) --addEventHandler("onColShapeHit", psha, function(hit) --if carro == "vehicle" then addEventHandler("onVehicleEnter", root, function() setTimer(function() setPedAnimation(ped, false) vei = getPedOccupiedVehicle(p) warpPedIntoVehicle ( ped, root, math.random(2,4) ) end, 999, 1) timers = getTimers ( 1000) for timerKey, timerValue in ipairs(timers) do killTimer ( timerValue ) end destroyElement(Marker) --end end) end --end --end I tried everything my :~ty skills allowed me to and now i'm out of ideas on how to solve this without Client-Side. The idea is when the Ped approaches the car, it chooses between seats 2 or 3 and enters the car, but as i'm not creating the car in the script, instead you should be able to spawn any vehicle and as a Cop you could arrest people and take them to the car. Sorry for the ugly-ass code. EDIT: Making the Ped follow the Player and when the Player enters a Vehicle the Ped is warped into the back seat is fine too.
  2. Hello all! Please help, I need to make a driving ped. So I've tried to create ped and create a vehicle and make ped drive to me, but soon I'm understood that I don't know how to make ped choose right direction (turning left or right) and go forward to me... Tried to investigate CrystalMV's NPC HLC scripts, but cannot understand how it works... So, please, somebody, help me code and understand how ur code works. I need a simple NPC turning into the right side and accelerate then stop using handbrake or brake_reverse and that's all. I've spend many hours thinking how to code it, but decision still not found, so I'm here..
  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. Hello, I need to make a ped driving a plane to turn it, Already tried the "vehicle_right" and "special_control_right" on setPedAnalogControlState and also tried setPedControlState with no success so far, the only thing that works so far is the forward and backward ones. any tips?
  6. Hello everyone. About 3 years ago I have worked on some project and got experiments on skin morphing. The video below shows some results in that: MTA gives all opportunities for creating a morphing for a face, body or something else. I hope in the future someone makes a full-customizable character.
  7. Hello guys! I have a Ped on serverside, and a Panel on clientside. How can I open my panel on serverside just for the localplayer?
  8. I need a function that calculates ped's bone matrices. (bone_attach functions doesn't work) I'm working on a shader that actually can move a ped's bone.
  9. السلام عليكم شباب ابي مساعدة في عمل حركة للاعب لمدة بضع ثواني وبعد انتهاء الثواني يقوم بالغاء الحركة واسترجاع الحركة العادية الي هيا المشي
  10. The resource starts, but the bot does not spawn. function bot () team = createTeam ("AngryBots", 255,255,255) exports [ "slothBot" ]:spawnBot ( 2002.5241699219,1546.9384765625,13.5859375, 90, 124, 0, 0, 29, "waiting", true ) end addCommandHandler("bots",bot) <meta> <info author="Falke" version="2.0.0" type="misc" name="angrybots" description="This script will add Silent Hill to San Andreas" /> <script src="server.lua" type="server" /> <include resource="slothbot" /> </meta> Why does not the bot spawn?? Please, help me! Neither the "nemesi1" script is working now (it worked when i played MTA years ago...). I don't know what is happening ;-; *nemesi1: https://community.multitheftauto.com/index.php?p=resources&s=details&id=5722
  11. السلام عليكم ورحمه الله وبركاته انا عندي ملف ped.ifp الصيغه مكتوبه طبعا المهم كيف اركبه؟ اخليه مود واركبه هوا خاص بحركات معينه .. زي النينجا وضربات النينجا والجري زي النينجا , بس كيف اركبه ؟
  12. 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
  13. Hello! I have an issue with the ped shooting. I created a ped with a weapon but when i make him shooting, he shoots but the bullet goes through my body and goes through everything. It does not hurt.But when he only gets a melee weapon it works normally. What's the problem?
  14. [Alright, first of all: I just joined the Forums, so if i do anything wrong, just tell me.] Ok, so i got a problem, it's about an event i want to trigger on a certain amount of zombie's, or on a certain timer, that's all fine and such.. But, i want to merge some event's into a resource called "zombies", like the 'onZombieWasted' event, but then for a seperated Event, What i mean with that is i want to have a new 'onNemesisWasted' event working together with the 'onZombieWasted', but they need to sync up with the (if possible exported) createZombie function from the "zombies" resource. And i am aiming to make it to a elementData trigger, that i locally created as for example: local Nemesis = export.zombies:createZombie(etc,etc..), So when i check for that element's data on the name 'Nemesis' by existence (as in: if ( isElement ( Nemesis ) ) then) and in combination on the 'onNemesisWasted'- event to check if that export of createZombie (ped works aswel) is dead or not, after all of that if the createZombie (ped) is actually dead, then i wan't it to trigger the reward system together with the other piece's of code. To clear out this idea and problem, i also recorded the ZTown Nemesis Event Script and also post the 2 main scripts that hold me from finishing the Nemesis: The Video of me, quickly explaining what, how, and showing the problem: "youtube" And the 2 script's, there both Server-Side, The Nemesis.lua is changed to test it's functionality and quick testing, but feel free to change the code and re-post it here to function with 'onNemesisWasted' additions!.. the first setTimer(function() is there to prevent complication problems from other zombie resource's and scripts, just delaying it for better run's. Also, the second setTimer(function() is just to delay it's Blip creation and Attaching to prevent the Blip not being attached to the createZombie named nemesis. Nemesis.lua (start/event): function nemesisON() setTimer(function() if ( not isElement ( Nemesis ) ) then local nemesis = exports.zombies:createZombie ( 2343, 57, 26.5, 90, 38, 0, 0, nemesis, 0, "hunting", true ) setPedHeadless(nemesis, true) exports.extrahealth:setElementExtraHealth ( nemesis, 150 ) setElementData ( nemesis, "nemesis", true ) setTimer(function() myBlip = createBlipAttachedTo ( nemesis, 23 ) outputChatBox ('#FFFFFF[#7CFC00ZTown#FFFFFF]: #00BFFF A #00FFFFNemesis #00BFFFHas been spawned inside ZTown! #FFFFFF(#7CFC00Nemesis Boss Event#FFFFFF)', root, 255, 255, 255, true) triggerClientEvent(root, "event", root, "start") end,2500,1) end end,2500,1) end addEventHandler ( "onResourceStart", getRootElement(), nemesisON) monemesi.lua (check/reward): addEvent ( "onNemesisWasted", true ) addEventHandler ( "onNemesisWasted", root, function ( killer ) if ( isElement ( Nemesis ) ) then givePlayerMoney(killer,math.random(5000,25000)) killer = getPlayerName(killer) destroyElement ( myBlip ) outputChatBox ('#FFFFFF[#7CFC00ZTown#FFFFFF]: #00BFFF The #00FFFFNemesis #00BFFFHas been killed! #FFFFFF(#7CFC00Nemesis-Boss Event#FFFFFF)', root, 255, 255, 255, true) triggerClientEvent(root, "event", root, "stop") end end ) I hope sombady could find a way to make this function correctly, because i have try'ed loads of ways, and the way to use slothbot together with zombies resource... nahh, won't work, they wil keep fighting together like d*cks. EDIT: if ( isElement ( Nemesis ) ) = nemesis, i already changed that, but right after i posted it, derp.. Gr.xboxxxxd
  15. 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.
  16. So hello, I maked a script, when i teleport with my command "sf" or "lv" or even "ls" when I'm in a car, I never teleport, but when I'm standing I doo teleport, soo how to do a teleportation with a car that worked when im in car and when im on foot, and i want to add a timer when i say "ls" and on the screen shows "3 seconds until a teleportation", and when hit by a player or a car, stop it by 1 sec and continue it. commando = { } laikas = 5000 function Tele( playerSource ) if (commando[playerSource]) then end setElementPosition(playerSource, 1518.88757, -1668.16504, 13.54688) commando[playerSource] = true setTimer( function() commando[playerSource] = false end, laikas, 1) end addCommandHandler( "ls",Tele) ------------------------------------------------------------------------------------------------------------------------- function Tele( playerSource ) if (commando[playerSource]) then end setElementPosition(playerSource, 2032.60022, 1343.41199, 10.82031) commando[playerSource] = true setTimer( function() commando[playerSource] = false end, laikas, 1) end addCommandHandler( "lv",Tele) ------------------------------------------------------------------------------------------------------------------------- function Tele( playerSource ) if (commando[playerSource]) then end setElementPosition(playerSource, -2028.97644, 148.12634, 28.83594) commando[playerSource] = true setTimer( function() commando[playerSource] = false end, laikas, 1) end addCommandHandler( "sf",Tele) -------------------------------------------------------------------------------------------------------------------------
  17. 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']
  18. السلام عليكم المشكلة باختصار انه انا اريد اسوي بيد (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")
  19. Well, this is recent, it was working fine, but now it stopped working, any solution? (arguments are right) no error in debug !
  20. Kliens: karakterLetrehozoPed = nil function asd() karakterLetrehozoPed = createPed(100,0,0,0) triggerServerEvent("pedStatisztikak", getRootElement(), karakterLetrehozoPed, 21, 1000) end asd() Szerver: function pedStatisztikak (ped,id,szam) setPedStat ( ped, id, szam ) end addEvent("pedStatisztikak", true) addEventHandler("pedStatisztikak", getRootElement(), pedStatisztikak) És egyszerűen nem tudom a karakter fat statisztikáját megnövelni, pedig kliensben akarom a set ped statot használni
  21. --Creating the ped drugDealer = createPed( 121, 2486, -1650.9, 13.5, 90.762) function startWalking() setPedAnimation( drugDealer, "ped", "WALK_gang1", 10000, true, true, false) setPedAnimation( drugDealer, "ped", "WALK_gang2", 10000, true, true, false) end Help. When I run this script I would the ped walk for ten seconds then change his walk style to gang2 after it, but it just run the second animation, please help on this.
  22. rablashelye = createMarker ( 252.3,-54.6,0.9, "cylinder", 1, 255, 255, 255, 170 ) function beleallas(thePlayer) outputChatBox("test",thePlayer,r,g,b,true) setPedAnimation ( thePlayer, "DANCING", "dnce_m_b") end addEventHandler( "onMarkerHit", rablashelye, beleallas ) setTimer( function(thePlayer) setPedAnimation(thePlayer,false) end,1000,0)
  23. Hola a todos bueno estoy creando un sistema de ped pero quiero que solo se pueda crear uno por player ya que abusan del script y ponen muchos y dan lag aqui les dejo una parte del script: function loli2( thePlayer ) local x, y, z = getElementPosition( thePlayer ); y = y - 5 ped = createPed( 139, x, y, z ) setElementData(ped,"PedExtraHealth",2000) setTimer (destroyElement, 500000, 1, ped) if ped then follow( ped, thePlayer ) end end addCommandHandler( "loli", loli2 )
  24. Skin Shader from player can not see the other players, how to synchronize Shader Skin on the player saw the other players?
  25. problem, did Shader skin player, but it only sees the player who entered the command, or only those who have the same skin. other players who did not enter and command them not to be schöder How to make that it was visible Shader .
×
×
  • Create New...