Jump to content

Z4Zy

Members
  • Posts

    215
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Z4Zy

  1. I tested the below script with the IFP file that you have posted with the link https://www.sendspace.com/file/jskfzu . There's no error with weapon and weapon walk after replacing the animation. client side :- local customBlockName = "pedAnims" -- load the IFP file local IFP = engineLoadIFP( "ped.ifp", customBlockName ) -- let us know if IFP failed to load if not IFP then outputChatBox( "Failed to load 'ped.ifp'" ) end -- replace the crouch animation engineReplaceAnimation( localPlayer, "ped", "weapon_crouch", customBlockName, "weapon_crouch" ) meta file :- <meta> <script src="client.lua" type="client" /> <file src="ped.ifp" /> </meta>
  2. but you must need that IFP to replace the anim
  3. so do you have military walk animation's IFP ?
  4. you should have the IFP file with correct weapon down animation. do you have one ?
  5. as 'weapon_crouch' animation replaced, you can use that code and modify it to replace the walking animation.
  6. when you replace the 'weapon_crouch' animation, your custom animation will run when you crouch with a weapon [ press 'C' ].
  7. Hello dear ! I'm straightly go into the question .. Can't we create a new model instead of replacing another object ? like we can set new animations to the player without replacing another ?
  8. As and example, if you want to replace the current 'weapon_crouch' animation of the player with animation in your IFP file, try below code with your existing meta file. local customBlockName = "pedAnims" -- load the IFP file local IFP = engineLoadIFP( "ped.ifp", customBlockName ) -- let us know if IFP failed to load if not IFP then outputChatBox( "Failed to load 'ped.ifp'" ) end -- replace the crouch animation engineReplaceAnimation( localPlayer, "ped", "weapon_crouch", customBlockName, "weapon_crouch" )
  9. what if player should wrap to one position and his vehicle to another position ?
  10. Hello ! Below code working find without any error ! addEventHandler("onPlayerLogin",root, function () bindKey(source,"1","down", function (p) setElementPosition(p,0,0,5) end) end ) When player login, button 1 will bind to the function. So, when player press 1 key, he will wrap in to the position. But the problem is, when player in a vehicle, he wouldn't wrap into the position... ! There's a way to solve this like if player in a vehicle when he press 1, vehicle will destroy and player wrapped into the position. But, I want to wrap the player to the position without destroying the vehicle. Are there any way to troubleshoot by problem ? or any alternative way ? Please Help Me ! ------------------------------------------------------------------------------------------------------------------------------------------- heheey ! There's a function called 'removePedFromVehicle'. That was helped me in this occasion !! Thank You @removePedFromVehicle ..!!
  11. Oh it's a great idea. Let me try that !
  12. Hello Everybody ! Can you help me to turn the lights on, that are circled with red color ?
  13. i think below topic will helpful for you !
  14. i think you had to move one by one object if you want to move grove street to another place using MTA map editor.
  15. Z4Zy

    Animations stuff

    If that doesn't work -- server -- addCommandHandler ( "animation" , function ( player ) triggerClientEvent ( "SetAnimForAll", resourceRoot, player ) end ) -- client -- addEvent('SetAnimForAll',true) addEventHandler('SetAnimForAll',root, function(player) local customBlockName = "myNewBlock" local IFP = engineLoadIFP( "parkour.ifp", customBlockName ) engineReplaceAnimation( source, "ped", "weapon_crouch", customBlockName, "HandPlant" ) setPedAnimation( player, customBlockName, "HandPlant" ) end)
  16. Z4Zy

    Animations stuff

    -- server -- addCommandHandler ( "animation" , function ( player ) triggerClientEvent ( root, "SetAnimForAll" ,player ) --sent to root element end ) try this server code with your existing client code.
  17. so, aren't there any why to remove that type of event handlers ?
  18. Hello ! when there's an event handler like below, function vehicleEnter(vehicle,seat) if seat == 0 then outputChatBox("You have entered a "..getVehicleName(vehicle),source,255,255,0) end end addEventHandler("onPlayerVehicleEnter",root,vehicleEnter) we can remove it from one line code like below, removeEventHandler("onPlayerVehicleEnter",root,vehicleEnter) So that's all. BUT !, when there's an event handler like below, addEventHandler("onPlayerVehicleEnter",root, function (vehicle,seat) if seat == 0 then outputChatBox("You have entered a "..getVehicleName(vehicle),source,255,255,0) end end ) How to remove that event handler ? are there any way ?
  19. so post the code that helps to put a player in a clan.
  20. there's no code that joining the player into a clan. So, you have to add blip() to the code that joining the player into a clan.
  21. so you need to run the blip function [ blip() ] when someone join the clan.
  22. check that element exists ! vehicles_blips = {} function blip () local pla = getElementsByType ( "player" ) for k,x in ipairs (pla) do if ( getElementData (x, "gang" ) == "123" )then vehicles_blips[MiAuto] = createBlipAttachedTo(MiAuto,2,2,255,55,0,255,0,1000,x) end end end setTimer(blip,3000,1) function destroyb(player) local play = getElementsByType ( "player" ) for k,z in ipairs (play) do if ( getElementData (z, "gang" ) ~= "123" )then local blip = vehicles_blips[MiAuto] if isElement(blip) then destroyElement(blip) vehicles_blips[MiAuto] = nil end end end end setTimer(destroyb,3000,0)
  23. There's and 'visibleTo' argument already in "createBlipAttachedTo" function. Server Side :- vehicles_blips = {} function blip () local pla = getElementsByType ( "player" ) for k,x in ipairs (pla) do if ( getElementData (x, "gang" ) == "123" )then vehicles_blips[MiAuto] = createBlipAttachedTo(MiAuto,2,2,255,55,0,255,0,1000,x) end end end setTimer(blip,3000,1) function destroyb(player) local play = getElementsByType ( "player" ) for k,z in ipairs (play) do if ( getElementData (z, "gang" ) == "None" )then local blip = vehicles_blips[MiAuto] destroyElement(blip) vehicles_blips[MiAuto] = nil end end end setTimer(destroyb,3000,0)
  24. Z4Zy

    Hydra Flares

    i think you had to create another lines of code for change target of the HSrockets. I think so !
×
×
  • Create New...