Jump to content

Parazitas

Members
  • Posts

    51
  • Joined

  • Last visited

Details

  • Gang
    Varior la azdecas

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Parazitas's Achievements

Snitch

Snitch (10/54)

0

Reputation

  1. Hello im trying to make script who destroys all empty fagio in map after some time. maybe some help? function deletefag() vehicles = getElementsByType("vehicle") for i,v in ipairs(vehicles) do if (getElementModel(v) == modelID) then destroyElement(v) end end end setTimer(deletefag, 5000, 0) deletefag(462)
  2. thanks.. but now then I got 1 hit in face I reapeat this anim..
  3. Hello guys. im stuck in this script.. tying to make death animation then player gets killed in head but.. it's not working.. maybe some help? function animacija(attacker, weapon, bodypart, loss) if (bodypart == 9) then setPedAnimation(source, "ped", "KO_shot_face") end end addEventHandler("onPlayerWasted", getRootElement(), animacija)
  4. Damn.. thank you so much.. maybe you can tell me what you change? I need to know maybe finaly learn something.. ?:D and I don't wanna make another post so I put in here. I writte this script but its not work.. what I do wrong in here? function animacija(attacker, weapon, bodypart, loss) if (bodypart == 9) then setPedAnimation(source, "ped", "KO_shot_face") end end addEventHandler("onPlayerWasted", getRootElement(), animacija)
  5. Hey, I tying to fix this: when I log in automaticly turns on gui.. but I need just turn on with bind press or marker hit.. bc it's so anoyng when join auto turn on login panel and animation gui. I tried change onClientResourceStart to onClientKey but not work still... I tried simplify script.. just do on player marker hit load ifp on him and when he write command remove ipf.. but still nothing.. local animationManagerWindow = nil local replaceAnimationLabel, playAnimationLabel = nil, nil local restoreDefaultsButton, stopAnimationButton = nil, nil local replaceAnimationGridList, playAnimationGridList = nil, nil local isShowingAnimationBlocksInPlayGridList = true local currentBlockNameSelected = nil local isLocalPlayerAnimating = false local function PopulatePlayAnimationGridListWithBlocks () isShowingAnimationBlocksInPlayGridList = true currentBlockNameSelected = nil guiGridListClear ( playAnimationGridList ) -- Add IFP blocks to the play animation gridlist for customAnimationBlockIndex, customAnimationBlock in ipairs ( globalLoadedIfps ) do local rowIndex = guiGridListAddRow ( playAnimationGridList, " + "..customAnimationBlock.friendlyName ) guiGridListSetItemData ( playAnimationGridList, rowIndex, 1, customAnimationBlockIndex ) end end local function PopulatePlayAnimationGridListWithCustomBlockAnimations ( ifpIndex ) isShowingAnimationBlocksInPlayGridList = false currentBlockNameSelected = globalLoadedIfps [ifpIndex].blockName guiGridListClear ( playAnimationGridList ) guiGridListAddRow ( playAnimationGridList, ".." ) -- Add IFP blocks to the play animation gridlist for _, customAnimationName in ipairs ( globalLoadedIfps [ifpIndex].animations ) do local rowIndex = guiGridListAddRow ( playAnimationGridList, " "..customAnimationName ) guiGridListSetItemData ( playAnimationGridList, rowIndex, 1, customAnimationName ) end end addEventHandler("onClientResourceStart", resourceRoot, function() triggerServerEvent ( "onCustomAnimationSyncRequest", resourceRoot, localPlayer ) outputChatBox ("Press 'X' to toggle Animation Manager", 255, 255, 255) showCursor ( true ) animationManagerWindow = guiCreateWindow(118, 116, 558, 371, "Animation Manager", false) guiWindowSetSizable(animationManagerWindow, false) replaceAnimationLabel = guiCreateLabel(12, 26, 245, 19, "Replace Animations With", false, animationManagerWindow) guiSetFont(replaceAnimationLabel, "default-bold-small") guiLabelSetHorizontalAlign(replaceAnimationLabel, "center", false) replaceAnimationGridList = guiCreateGridList(12, 49, 245, 255, false, animationManagerWindow) guiGridListAddColumn(replaceAnimationGridList, "Animation Blocks", 0.9) restoreDefaultsButton = guiCreateButton(49, 314, 174, 41, "Restore Defaults", false, animationManagerWindow) playAnimationLabel = guiCreateLabel(294, 26, 245, 19, "Play Animation", false, animationManagerWindow) guiSetFont(playAnimationLabel, "default-bold-small") guiLabelSetHorizontalAlign(playAnimationLabel, "center", false) stopAnimationButton = guiCreateButton(329, 314, 174, 41, "Stop Animation", false, animationManagerWindow) playAnimationGridList = guiCreateGridList(294, 49, 245, 255, false, animationManagerWindow) guiGridListAddColumn(playAnimationGridList, "Animation Blocks", 0.9) -- load IFP files and add them to the play animation gridlist for customAnimationBlockIndex, customAnimationBlock in ipairs ( globalLoadedIfps ) do local ifp = engineLoadIFP ( customAnimationBlock.path, customAnimationBlock.blockName ) if not ifp then outputChatBox ("Failed to load '"..customAnimationBlock.path.."'") end end -- now add replaceable ifps to the other grid list for _, ifpIndex in ipairs ( globalReplaceableIfpsIndices ) do local customAnimationBlock = globalLoadedIfps [ ifpIndex ] local rowIndex = guiGridListAddRow ( replaceAnimationGridList, customAnimationBlock.friendlyName ) guiGridListSetItemData ( replaceAnimationGridList, rowIndex, 1, ifpIndex ) end PopulatePlayAnimationGridListWithBlocks () end ) local function ReplacePedBlockAnimations ( player, ifpIndex ) local customIfpBlockName = globalLoadedIfps [ ifpIndex ].blockName for _, animationName in pairs ( globalPedAnimationBlock.animations ) do -- make sure that we don't replace a partial animation if not globalPedAnimationBlock.partialAnimations [ animationName ] then engineReplaceAnimation ( player, "ped", animationName, customIfpBlockName, animationName ) end end end local function HandleReplacedAnimationGridListDoubleClick () local replacedAnimGridSelectedRow, replacedAnimGridSelectedCol = guiGridListGetSelectedItem ( replaceAnimationGridList ); if replacedAnimGridSelectedRow and replacedAnimGridSelectedRow ~= -1 then local ifpFriendlyName = guiGridListGetItemText( replaceAnimationGridList, replacedAnimGridSelectedRow, replacedAnimGridSelectedCol ) local ifpIndex = guiGridListGetItemData(replaceAnimationGridList, replacedAnimGridSelectedRow, replacedAnimGridSelectedCol ) ReplacePedBlockAnimations ( localPlayer, ifpIndex ) triggerServerEvent ( "onCustomAnimationReplace", resourceRoot, localPlayer, ifpIndex ) outputChatBox ("Replaced 'ped' block animations with '"..ifpFriendlyName.."'", 255, 255, 255) end end local function HandlePlayAnimationGridListDoubleClick () local playAnimGridSelectedRow, playAnimGridSelectedCol = guiGridListGetSelectedItem ( playAnimationGridList ); if playAnimGridSelectedRow and playAnimGridSelectedRow ~= -1 then local itemText = guiGridListGetItemText( playAnimationGridList, playAnimGridSelectedRow, playAnimGridSelectedCol ) if isShowingAnimationBlocksInPlayGridList then local ifpIndex = guiGridListGetItemData(playAnimationGridList, playAnimGridSelectedRow, playAnimGridSelectedCol ) PopulatePlayAnimationGridListWithCustomBlockAnimations ( ifpIndex ) else if itemText == ".." then PopulatePlayAnimationGridListWithBlocks ( ) else local animationName = guiGridListGetItemData(playAnimationGridList, playAnimGridSelectedRow, playAnimGridSelectedCol ) setPedAnimation ( localPlayer, currentBlockNameSelected, animationName ) triggerServerEvent ( "onCustomAnimationSet", resourceRoot, localPlayer, currentBlockNameSelected, animationName ) isLocalPlayerAnimating = true end end end end addEventHandler( "onClientGUIDoubleClick", resourceRoot, function ( button, state, absoluteX, absoluteY ) if button == "left" and state == "up" then if source == replaceAnimationGridList then HandleReplacedAnimationGridListDoubleClick ( ) elseif source == playAnimationGridList then HandlePlayAnimationGridListDoubleClick ( ) end end end ) addEventHandler( "onClientGUIClick", resourceRoot, function ( button, state ) if button == "left" and state == "up" then if source == restoreDefaultsButton then -- restore all replaced animations of "ped" block engineRestoreAnimation ( localPlayer, "ped" ) triggerServerEvent ( "onCustomAnimationRestore", resourceRoot, localPlayer, "ped" ) outputChatBox ("Restored ped block animations", 255, 255, 255) elseif source == stopAnimationButton then setPedAnimation ( localPlayer, false ) triggerServerEvent ( "onCustomAnimationSet", resourceRoot, localPlayer, false, false ) end end end ) bindKey ( "X", "down", function ( key, keyState ) if ( keyState == "down" ) then local isAnimationMangerWindowVisible = guiGetVisible ( animationManagerWindow ) guiSetVisible ( animationManagerWindow, not isAnimationMangerWindowVisible ) showCursor ( not isAnimationMangerWindowVisible ) end end ) addEvent ("onClientCustomAnimationSyncRequest", true ) addEventHandler ("onClientCustomAnimationSyncRequest", root, function ( playerAnimations ) for player, anims in pairs ( playerAnimations ) do if isElement ( player ) then if anims.current then setPedAnimation ( player, anims.current[1], anims.current[2] ) end if anims.replacedPedBlock then ReplacePedBlockAnimations ( player, anims.replacedPedBlock ) end end end end ) addEvent ("onClientCustomAnimationSet", true ) addEventHandler ("onClientCustomAnimationSet", root, function ( blockName, animationName ) if source == localPlayer then return end if blockName == false then setPedAnimation ( source, false ) return end setPedAnimation ( source, blockName, animationName ) end ) addEvent ("onClientCustomAnimationReplace", true ) addEventHandler ("onClientCustomAnimationReplace", root, function ( ifpIndex ) if source == localPlayer then return end ReplacePedBlockAnimations ( source, ifpIndex ) end ) addEvent ("onClientCustomAnimationRestore", true ) addEventHandler ("onClientCustomAnimationRestore", root, function ( blockName ) if source == localPlayer then return end engineRestoreAnimation ( source, blockName ) end ) setTimer ( function () if isLocalPlayerAnimating then if not getPedAnimation (localPlayer) then isLocalPlayerAnimating = false triggerServerEvent ( "onCustomAnimationStop", resourceRoot, localPlayer ) end end end, 100, 0 )
  6. I know that.. but I started write script (not edit ) about few weeks ago.. I have tons of ideas but it's preaty hard even with multitheftauto.wiki like one script.. I saw can replate ipf files I wanna make script load ipf with command.. like: write /parkour and load parkour.ipf on player. and with command /back remove ipf tried but.. nothing.. function parkour ( commandName ) local customBlockName = "myNewBlock" local IFP = engineLoadIFP( localPlayer, "parkour.ifp", parkour ) setPedAnimation( localPlayer, parkour ) end addCommandHandler ( "parkour", parkour )
  7. Lol.. so easy.. I tried write this script about 3 hours..
  8. Hello guys, im stuck again in scripting.. I need to make script: then player in dimension 1 he can't take any damage but idk how to check player dimension in script.. maybe some help? addEventHandler ( "onClientPlayerDamage", getRootElement(), function() cancelEvent() end )
  9. Thanks!! one more thing.. imposible to make script: player who have skin 45 have unlimited ammo of weapon 41 or something like that?
  10. Hello guys! Im learning how to script, i have this function and i want edit ( When player have skin 45 he cant can't kill other players and others cant kill him.. maybe can help me? function enterWaterfish () local playerTeam = getPlayerTeam ( source ) local TeamName = getTeamName ( playerTeam ) if TeamName == "team" then if isElementInWater(source) then setElementHealth ( source, 100 ) end end end addEventHandler ( "onPlayerDamage", getRootElement (), enterWaterfish )
  11. Parazitas

    Bounty

    And.. how make full script.. ?
  12. Parazitas

    Bounty

    Hello guys! I making some freeroam server for fun play with friends.. But i don't know how make scripts.. I need resource: which Auto set 1000000$ bouny on random player every 30 minutes, Maybe someone can help me? sorry for bad English..
  13. Bin? umm... i tried replace other object to this mod and place object to marker places and set markers alpha to 0 but.. its same.. or maybe i use bad script..
  14. Im try to replace and search info in other websites but nothing works.. im tired of this s**t
×
×
  • Create New...