Jump to content

custom animations


greentumbleweed

Recommended Posts

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
)

--Test


function startingAnimations()
    ReplacePedBlockAnimations ( source, 7 )
end 

client

 

server

-- since we're only interested in ped block, we don't need support for other blocks
-- you might want to rename playerAnimations.replacedPedBlock to playerAnimations.replacedBlocks 
-- to add support for replacing more blocks and keeping them sync 

local playerAnimations = {  } -- current = {}, replacedPedBlock = {}
local synchronizationPlayers = {}

local SetAnimation -- function

addEventHandler ( "onPlayerJoin", root,
    function ( )
        playerAnimations [ source ] = {}
    end
)

for _, player in pairs ( getElementsByType ("player") ) do 
    playerAnimations [ player ] = {}
end

addEvent ("onCustomAnimationStop", true )
addEventHandler ("onCustomAnimationStop", root,
    function ( player )
        SetAnimation ( player, false )
    end 
)

addEvent ("onCustomAnimationSyncRequest", true )
addEventHandler ("onCustomAnimationSyncRequest", root,
    function ( player )
        table.insert ( synchronizationPlayers, player )
        triggerLatentClientEvent ( player, "onClientCustomAnimationSyncRequest", 50000, false, player, playerAnimations )
    end 
)

addEventHandler ( "onPlayerQuit", root,
    function ( )
        for i, player in pairs ( synchronizationPlayers ) do
            if source == player then 
                table.remove ( synchronizationPlayers, i )
                break
            end 
        end 
        playerAnimations [ source ] = nil
    end
)

addEvent ("onCustomAnimationSet", true )
addEventHandler ("onCustomAnimationSet", root,
    function ( player, blockName, animationName )
        SetAnimation ( player, blockName, animationName )
        triggerClientEvent ( synchronizationPlayers, "onClientCustomAnimationSet", player, blockName, animationName ) 
    end 
)

addEvent ("onCustomAnimationReplace", true )
addEventHandler ("onCustomAnimationReplace", root,
    function ( player, ifpIndex )
        playerAnimations[ player ].replacedPedBlock = ifpIndex
        triggerClientEvent ( synchronizationPlayers, "onClientCustomAnimationReplace", player, ifpIndex )
    end 
)

addEvent ("onCustomAnimationRestore", true )
addEventHandler ("onCustomAnimationRestore", root,
    function ( player, blockName )
        playerAnimations[ player ].replacedPedBlock = nil
        triggerClientEvent ( synchronizationPlayers, "onClientCustomAnimationRestore", player, blockName )
    end 
)

function SetAnimation ( player, blockName, animationName )
    if not playerAnimations[ player ] then playerAnimations[ player ] = {} end 
    if blockName == false then
        playerAnimations[ player ].current = nil
    else
        playerAnimations[ player ].current = { blockName, animationName }
    end 
end 

 

Link to comment
12 hours ago, Saml1er said:

You can load any IFP file that was created for GTA VC and SA using:


engineLoadIFP

So yes, you can load the ifp file to MTA if you have it.

so if i use ^ on client side will everything still be synchronize server side? 

12 hours ago, Saml1er said:

You can load any IFP file that was created for GTA VC and SA using:


engineLoadIFP

So yes, you can load the ifp file to MTA if you have it.

this isnt exactly what im trying to figure out, ik how to use engineLoadIFP but this uses a lot of functions to sync it server side but only from starting the block through panel

i want to automatically start the animation block at the start of the resource for all players in sync so you do not have to use this panel

Link to comment
26 minutes ago, greentumbleweed said:

so if i use ^ on client side will everything still be synchronize server side?

No, I was talking to NmLa. I asked you a question but you didn't respond:

12 hours ago, Saml1er said:

where are you calling startingAnimations function? Also, can you show how globalLoadedIfps is defined? 

 

Edited by Saml1er
Link to comment
13 hours ago, Saml1er said:

No, I was talking to NmLa. I asked you a question but you didn't respond:

 

oops thought i put that bottom of "client" 

 

tables:

globalLoadedIfps = {
    [1] = { friendlyName = "PARKOUR", blockName = "parkour", path = "Animations/parkour.ifp", animations = { 'BckHndSpingBTuck', 'BckHndSping','CartWheel','FrntHndSpring','HandPlant' } },
    [2] = { friendlyName = "ASSASSIN'S CREED", blockName = "assassin_creed", path = "Animations/Assassins_creed_ped.ifp", animations = { 'abseil', 'ARRESTgun', 'ATM', 'BIKE_elbowL', 'BIKE_elbowR', 'BIKE_fallR', 'BIKE_fall_off', 'BIKE_pickupL', 'BIKE_pickupR', 'BIKE_pullupL', 'BIKE_pullupR', 'bomber', 'CAR_alignHI_LHS', 'CAR_alignHI_RHS', 'CAR_align_LHS', 'CAR_align_RHS', 'CAR_closedoorL_LHS', 'CAR_closedoorL_RHS', 'CAR_closedoor_LHS', 'CAR_closedoor_RHS', 'CAR_close_LHS', 'CAR_close_RHS', 'CAR_crawloutRHS', 'CAR_dead_LHS', 'CAR_dead_RHS', 'CAR_doorlocked_LHS', 'CAR_doorlocked_RHS', 'CAR_fallout_LHS', 'CAR_fallout_RHS', 'CAR_getinL_LHS', 'CAR_getinL_RHS', 'CAR_getin_LHS', 'CAR_getin_RHS', 'CAR_getoutL_LHS', 'CAR_getoutL_RHS', 'CAR_getout_LHS', 'CAR_getout_RHS', 'car_hookertalk', 'CAR_jackedLHS', 'CAR_jackedRHS', 'CAR_jumpin_LHS', 'CAR_LB', 'CAR_LB_pro', 'CAR_LB_weak', 'CAR_LjackedLHS', 'CAR_LjackedRHS', 'CAR_Lshuffle_RHS', 'CAR_Lsit', 'CAR_open_LHS', 'CAR_open_RHS', 'CAR_pulloutL_LHS', 'CAR_pulloutL_RHS', 'CAR_pullout_LHS', 'CAR_pullout_RHS', 'CAR_Qjacked', 'CAR_rolldoor', 'CAR_rolldoorLO', 'CAR_rollout_LHS', 'CAR_rollout_RHS', 'CAR_shuffle_RHS', 'CAR_sit', 'CAR_sitp', 'CAR_sitpLO', 'CAR_sit_pro', 'CAR_sit_weak', 'CAR_tune_radio', 'CLIMB_idle', 'CLIMB_jump', 'CLIMB_jump2fall', 'CLIMB_jump_B', 'CLIMB_Pull', 'CLIMB_Stand', 'CLIMB_Stand_finish', 'cower', 'Crouch_Roll_L', 'Crouch_Roll_R', 'DAM_armL_frmBK', 'DAM_armL_frmFT', 'DAM_armL_frmLT', 'DAM_armR_frmBK', 'DAM_armR_frmFT', 'DAM_armR_frmRT', 'DAM_LegL_frmBK', 'DAM_LegL_frmFT', 'DAM_LegL_frmLT', 'DAM_LegR_frmBK', 'DAM_LegR_frmFT', 'DAM_LegR_frmRT', 'DAM_stomach_frmBK', 'DAM_stomach_frmFT', 'DAM_stomach_frmLT', 'DAM_stomach_frmRT', 'DOOR_LHinge_O', 'DOOR_RHinge_O', 'DrivebyL_L', 'DrivebyL_R', 'Driveby_L', 'Driveby_R', 'DRIVE_BOAT', 'DRIVE_BOAT_back', 'DRIVE_BOAT_L', 'DRIVE_BOAT_R', 'Drive_L', 'Drive_LO_l', 'Drive_LO_R', 'Drive_L_pro', 'Drive_L_pro_slow', 'Drive_L_slow', 'Drive_L_weak', 'Drive_L_weak_slow', 'Drive_R', 'Drive_R_pro', 'Drive_R_pro_slow', 'Drive_R_slow', 'Drive_R_weak', 'Drive_R_weak_slow', 'Drive_truck', 'DRIVE_truck_back', 'DRIVE_truck_L', 'DRIVE_truck_R', 'Drown', 'DUCK_cower', 'endchat_01', 'endchat_02', 'endchat_03', 'EV_dive', 'EV_step', 'facanger', 'facgum', 'facsurp', 'facsurpm', 'factalk', 'facurios', 'FALL_back', 'FALL_collapse', 'FALL_fall', 'FALL_front', 'FALL_glide', 'FALL_land', 'FALL_skyDive', 'Fight2Idle', 'FightA_1', 'FightA_2', 'FightA_3', 'FightA_block', 'FightA_G', 'FightA_M', 'FIGHTIDLE', 'FightShB', 'FightShF', 'FightSh_BWD', 'FightSh_FWD', 'FightSh_Left', 'FightSh_Right', 'flee_lkaround_01', 'FLOOR_hit', 'FLOOR_hit_f', ':Ou', 'gang_gunstand', 'gas_cwr', 'getup', 'getup_front', 'gum_eat', 'GunCrouchBwd', 'GunCrouchFwd', 'GunMove_BWD', 'GunMove_FWD', 'GunMove_L', 'GunMove_R', 'Gun_2_IDLE', 'GUN_BUTT', 'GUN_BUTT_crouch', 'Gun_stand', 'handscower', 'handsup', 'HitA_1', 'HitA_2', 'HitA_3', 'HIT_back', 'HIT_behind', 'HIT_front', 'HIT_GUN_BUTT', 'HIT_L', 'HIT_R', 'HIT_walk', 'HIT_wall', 'Idlestance_fat', 'idlestance_old', 'IDLE_armed', 'IDLE_chat', 'IDLE_csaw', 'Idle_Gang1', 'IDLE_HBHB', 'IDLE_ROCKET', 'IDLE_stance', 'IDLE_taxi', 'IDLE_tired', 'Jetpack_Idle', 'JOG_femaleA', 'JOG_maleA', 'JUMP_glide', 'JUMP_land', 'JUMP_launch', 'JUMP_launch_R', 'KART_drive', 'KART_L', 'KART_LB', 'KART_R', 'KD_left', 'KD_right', 'KO_shot_face', 'KO_shot_front', 'KO_shot_stom', 'KO_skid_back', 'KO_skid_front', 'KO_spin_L', 'KO_spin_R', 'pass_Smoke_in_car', 'phone_in', 'phone_out', 'phone_talk', 'Player_Sneak', 'Player_Sneak_walkstart', 'roadcross', 'roadcross_female', 'roadcross_gang', 'roadcross_old', 'run_1armed', 'run_armed', 'run_civi', 'run_csaw', 'run_fat', 'run_fatold', 'run_gang1', 'run_left', 'run_old', 'run_player', 'run_right', 'run_rocket', 'Run_stop', 'Run_stopR', 'Run_Wuzi', 'SEAT_down', 'SEAT_idle', 'SEAT_up', 'SHOT_leftP', 'SHOT_partial', 'SHOT_partial_B', 'SHOT_rightP', 'Shove_Partial', 'Smoke_in_car', 'sprint_civi', 'sprint_panic', 'Sprint_Wuzi', 'swat_run', 'Swim_Tread', 'Tap_hand', 'Tap_handP', 'turn_180', 'Turn_L', 'Turn_R', 'WALK_armed', 'WALK_civi', 'WALK_csaw', 'Walk_DoorPartial', 'WALK_drunk', 'WALK_fat', 'WALK_fatold', 'WALK_gang1', 'WALK_gang2', 'WALK_old', 'WALK_player', 'WALK_rocket', 'WALK_shuffle', 'WALK_start', 'WALK_start_armed', 'WALK_start_csaw', 'WALK_start_rocket', 'Walk_Wuzi', 'WEAPON_crouch', 'woman_idlestance', 'woman_run', 'WOMAN_runbusy', 'WOMAN_runfatold', 'woman_runpanic', 'WOMAN_runsexy', 'WOMAN_walkbusy', 'WOMAN_walkfatold', 'WOMAN_walknorm', 'WOMAN_walkold', 'WOMAN_walkpro', 'WOMAN_walksexy', 'WOMAN_walkshop', 'XPRESSscratch' } },
    [3] = { friendlyName = "ZOMBIE", blockName = "zombie", path = "Animations/zombie_ped.ifp", animations = { 'abseil', 'ARRESTgun', 'ATM', 'BIKE_elbowL', 'BIKE_elbowR', 'BIKE_fallR', 'BIKE_fall_off', 'BIKE_pickupL', 'BIKE_pickupR', 'BIKE_pullupL', 'BIKE_pullupR', 'bomber', 'CAR_alignHI_LHS', 'CAR_alignHI_RHS', 'CAR_align_LHS', 'CAR_align_RHS', 'CAR_closedoorL_LHS', 'CAR_closedoorL_RHS', 'CAR_closedoor_LHS', 'CAR_closedoor_RHS', 'CAR_close_LHS', 'CAR_close_RHS', 'CAR_crawloutRHS', 'CAR_dead_LHS', 'CAR_dead_RHS', 'CAR_doorlocked_LHS', 'CAR_doorlocked_RHS', 'CAR_fallout_LHS', 'CAR_fallout_RHS', 'CAR_getinL_LHS', 'CAR_getinL_RHS', 'CAR_getin_LHS', 'CAR_getin_RHS', 'CAR_getoutL_LHS', 'CAR_getoutL_RHS', 'CAR_getout_LHS', 'CAR_getout_RHS', 'car_hookertalk', 'CAR_jackedLHS', 'CAR_jackedRHS', 'CAR_jumpin_LHS', 'CAR_LB', 'CAR_LB_pro', 'CAR_LB_weak', 'CAR_LjackedLHS', 'CAR_LjackedRHS', 'CAR_Lshuffle_RHS', 'CAR_Lsit', 'CAR_open_LHS', 'CAR_open_RHS', 'CAR_pulloutL_LHS', 'CAR_pulloutL_RHS', 'CAR_pullout_LHS', 'CAR_pullout_RHS', 'CAR_Qjacked', 'CAR_rolldoor', 'CAR_rolldoorLO', 'CAR_rollout_LHS', 'CAR_rollout_RHS', 'CAR_shuffle_RHS', 'CAR_sit', 'CAR_sitp', 'CAR_sitpLO', 'CAR_sit_pro', 'CAR_sit_weak', 'CAR_tune_radio', 'CLIMB_idle', 'CLIMB_jump', 'CLIMB_jump2fall', 'CLIMB_jump_B', 'CLIMB_Pull', 'CLIMB_Stand', 'CLIMB_Stand_finish', 'cower', 'Crouch_Roll_L', 'Crouch_Roll_R', 'DAM_armL_frmBK', 'DAM_armL_frmFT', 'DAM_armL_frmLT', 'DAM_armR_frmBK', 'DAM_armR_frmFT', 'DAM_armR_frmRT', 'DAM_LegL_frmBK', 'DAM_LegL_frmFT', 'DAM_LegL_frmLT', 'DAM_LegR_frmBK', 'DAM_LegR_frmFT', 'DAM_LegR_frmRT', 'DAM_stomach_frmBK', 'DAM_stomach_frmFT', 'DAM_stomach_frmLT', 'DAM_stomach_frmRT', 'DOOR_LHinge_O', 'DOOR_RHinge_O', 'DrivebyL_L', 'DrivebyL_R', 'Driveby_L', 'Driveby_R', 'DRIVE_BOAT', 'DRIVE_BOAT_back', 'DRIVE_BOAT_L', 'DRIVE_BOAT_R', 'Drive_L', 'Drive_LO_l', 'Drive_LO_R', 'Drive_L_pro', 'Drive_L_pro_slow', 'Drive_L_slow', 'Drive_L_weak', 'Drive_L_weak_slow', 'Drive_R', 'Drive_R_pro', 'Drive_R_pro_slow', 'Drive_R_slow', 'Drive_R_weak', 'Drive_R_weak_slow', 'Drive_truck', 'DRIVE_truck_back', 'DRIVE_truck_L', 'DRIVE_truck_R', 'Drown', 'endchat_01', 'endchat_02', 'endchat_03', 'EV_dive', 'EV_step', 'facanger', 'facgum', 'facsurp', 'facsurpm', 'factalk', 'facurios', 'FALL_back', 'FALL_collapse', 'FALL_fall', 'FALL_front', 'FALL_glide', 'FALL_land', 'FALL_skyDive', 'FightA_M', 'FightShF', 'FightSh_BWD', 'FightSh_FWD', 'FightSh_Left', 'FightSh_Right', 'flee_lkaround_01', 'FLOOR_hit', 'FLOOR_hit_f', ':Ou', 'gang_gunstand', 'gas_cwr', 'getup', 'getup_front', 'gum_eat', 'GunCrouchBwd', 'GunCrouchFwd', 'GunMove_BWD', 'GunMove_FWD', 'GunMove_L', 'GunMove_R', 'Gun_2_IDLE', 'GUN_BUTT', 'GUN_BUTT_crouch', 'Gun_stand', 'handscower', 'handsup', 'HIT_back', 'HIT_behind', 'HIT_front', 'HIT_GUN_BUTT', 'HIT_L', 'HIT_R', 'HIT_walk', 'HIT_wall', 'Idlestance_fat', 'idlestance_old', 'IDLE_armed', 'IDLE_chat', 'IDLE_csaw', 'Idle_Gang1', 'IDLE_HBHB', 'IDLE_ROCKET', 'IDLE_taxi', 'IDLE_tired', 'Jetpack_Idle', 'JOG_femaleA', 'JOG_maleA', 'JUMP_glide', 'JUMP_land', 'JUMP_launch', 'JUMP_launch_R', 'KART_drive', 'KART_L', 'KART_LB', 'KART_R', 'KD_left', 'KD_right', 'KO_shot_face', 'KO_shot_stom', 'KO_skid_back', 'KO_spin_L', 'KO_spin_R', 'pass_Smoke_in_car', 'phone_in', 'phone_out', 'phone_talk', 'Player_Sneak', 'Player_Sneak_walkstart', 'roadcross', 'roadcross_female', 'roadcross_gang', 'roadcross_old', 'run_armed', 'run_csaw', 'run_fat', 'run_fatold', 'run_gang1', 'run_left', 'run_old', 'run_right', 'run_rocket', 'Run_stop', 'Run_stopR', 'Run_Wuzi', 'SEAT_down', 'SEAT_idle', 'SEAT_up', 'SHOT_leftP', 'SHOT_partial', 'SHOT_partial_B', 'SHOT_rightP', 'Shove_Partial', 'Smoke_in_car', 'sprint_panic', 'Sprint_Wuzi', 'swat_run', 'Swim_Tread', 'Tap_hand', 'Tap_handP', 'turn_180', 'Turn_L', 'Turn_R', 'WALK_armed', 'WALK_civi', 'WALK_csaw', 'Walk_DoorPartial', 'WALK_drunk', 'WALK_fat', 'WALK_fatold', 'WALK_gang1', 'WALK_gang2', 'WALK_old', 'WALK_rocket', 'WALK_shuffle', 'WALK_start', 'WALK_start_armed', 'WALK_start_csaw', 'WALK_start_rocket', 'Walk_Wuzi', 'WEAPON_crouch', 'woman_idlestance', 'woman_run', 'WOMAN_runbusy', 'WOMAN_runfatold', 'woman_runpanic', 'WOMAN_runsexy', 'WOMAN_walkbusy', 'WOMAN_walkfatold', 'WOMAN_walknorm', 'WOMAN_walkold', 'WOMAN_walkpro', 'WOMAN_walksexy', 'WOMAN_walkshop', 'XPRESSscratch', 'asfna', 'FightA_1', 'FIGHTIDLE', 'FightA_block', 'FightA_G', 'FightShB', 'DUCK_cower', 'Fight2Idle', 'FightA_3', 'HitA_3', 'run_civi', 'KO_skid_front', 'HitA_2', 'HitA_1', 'FightA_2', 'run_1armed', 'b', 'run_player', 'sprint_civi', 'WALK_player', 'KO_shot_front', 'IDLE_stance' } },
    [4] = { friendlyName = "GTA III", blockName = "gta3", path = "Animations/gta3_ped.ifp", animations = { 'abseil' , 'ARRESTgun' , 'ATM' , 'batherdown' , 'batherscape' , 'batherup' , 'BIKE_elbowL' , 'BIKE_elbowR' , 'BIKE_fallR' , 'BIKE_fall_off' , 'BIKE_pickupL' , 'BIKE_pickupR' , 'BIKE_pullupL' , 'BIKE_pullupR' , 'bomber' , 'CAR_alignHI_LHS' , 'CAR_alignHI_RHS' , 'CAR_align_LHS' , 'CAR_align_RHS' , 'CAR_closedoorL_LHS' , 'CAR_closedoorL_RHS' , 'CAR_closedoor_LHS' , 'CAR_closedoor_RHS' , 'CAR_close_LHS' , 'CAR_close_RHS' , 'CAR_crawloutRHS' , 'CAR_doorlocked_LHS' , 'CAR_doorlocked_RHS' , 'CAR_getinL_LHS' , 'CAR_getinL_RHS' , 'CAR_getin_LHS' , 'CAR_getin_RHS' , 'CAR_getoutL_LHS' , 'CAR_getoutL_RHS' , 'CAR_getout_LHS' , 'CAR_getout_RHS' , 'car_hookertalk' , 'CAR_jackedLHS' , 'CAR_jackedRHS' , 'CAR_jumpin_LHS' , 'CAR_LB' , 'CAR_LjackedLHS' , 'CAR_LjackedRHS' , 'CAR_Lshuffle_RHS' , 'CAR_Lsit' , 'CAR_open_LHS' , 'CAR_open_RHS' , 'CAR_pulloutL_LHS' , 'CAR_pulloutL_RHS' , 'CAR_pullout_LHS' , 'CAR_pullout_RHS' , 'CAR_Qjack' , 'CAR_Qjacked' , 'CAR_rolldoor' , 'CAR_rolldoorLO' , 'CAR_rollout_LHS' , 'CAR_rollout_RHS' , 'CAR_shuffleLO' , 'CAR_shuffle_RHS' , 'CAR_sit' , 'CAR_sitp' , 'CAR_sitpLO' , 'cower' , 'DrivebyL_L' , 'DrivebyL_R' , 'Driveby_L' , 'Driveby_R' , 'DRIVE_BOAT' , 'DRIVE_BOAT_back' , 'DRIVE_BOAT_L' , 'DRIVE_BOAT_R' , 'Drive_L' , 'Drive_LO_l' , 'Drive_LO_R' , 'Drive_R' , 'Drown' , 'DUCK_down' , 'DUCK_low' , 'EV_dive' , 'EV_step' , 'FALL_back' , 'FALL_collapse' , 'FALL_fall' , 'FALL_front' , 'FALL_glide' , 'FALL_land' , 'FIGHT2IDLE' , 'FIGHTbkickL' , 'FIGHTbkickR' , 'FIGHTbodyblow' , 'FIGHTelbowL' , 'FIGHTelbowR' , 'FIGHThead' , 'FIGHTIDLE' , 'FIGHTjab' , 'FIGHTkick' , 'FIGHTknee' , 'FIGHTLhook' , 'FIGHTlngkck' , 'FIGHTppunch' , 'FIGHTpunch' , 'FIGHTrndhse' , 'FIGHTsh_back' , 'FIGHTsh_F' , 'FLOOR_hit' , 'FLOOR_hit_f' , ':Ou' , 'getup' , 'getup_front' , 'handscower' , 'handsup' , 'HIT_back' , 'HIT_behind' , 'HIT_bodyblow' , 'HIT_chest' , 'HIT_front' , 'HIT_head' , 'HIT_L' , 'HIT_R' , 'HIT_walk' , 'HIT_wall' , 'IDLE_armed' , 'IDLE_cam' , 'IDLE_chat' , 'IDLE_csaw' , 'IDLE_HBHB' , 'IDLE_ROCKET' , 'IDLE_stance' , 'IDLE_taxi' , 'IDLE_time' , 'IDLE_tired' , 'JOG_maleA' , 'JOG_maleB' , 'JUMP_glide' , 'JUMP_land' , 'JUMP_launch' , 'KD_left' , 'KD_right' , 'KICK_floor' , 'KO_shot_armL' , 'KO_shot_armR' , 'KO_shot_face' , 'KO_shot_front' , 'KO_shot_legL' , 'KO_shot_legR' , 'KO_shot_stom' , 'KO_skid_back' , 'KO_skid_front' , 'KO_spin_L' , 'KO_spin_R' , 'LIMP' , 'phone_in' , 'phone_out' , 'phone_talk' , 'pounds_A' , 'pounds_B' , 'PUNCHR' , 'RBLOCK_Cshoot' , 'roadcross' , 'run_1armed' , 'run_armed' , 'run_back' , 'run_civi' , 'run_csaw' , 'run_csaw_back' , 'run_csaw_left' , 'run_csaw_right' , 'run_fatold' , 'run_gang1' , 'run_left' , 'run_player' , 'run_right' , 'run_rocket' , 'run_rocket_back' , 'run_rocket_left' , 'run_rocket_right' , 'Run_stop' , 'Run_stopR' , 'SEAT_down' , 'SEAT_idle' , 'SEAT_rvrs' , 'SEAT_up' , 'SHOT_leftP' , 'SHOT_partial' , 'SHOT_rightP' , 'SLAPS_A' , 'SLAPS_B' , 'sprint_civi' , 'sprint_panic' , 'turn_180' , 'walkst_csaw_back' , 'walkst_csaw_left' , 'walkst_csaw_right' , 'walkst_rocket_back' , 'walkst_rocket_left' , 'walkst_rocket_right' , 'WALK_armed' , 'walk_back' , 'WALK_civi' , 'WALK_csaw' , 'walk_csaw_back' , 'walk_csaw_left' , 'walk_csaw_right' , 'WALK_fat' , 'WALK_fatold' , 'WALK_gang1' , 'WALK_gang2' , 'walk_left' , 'WALK_old' , 'WALK_player' , 'walk_right' , 'WALK_rocket' , 'walk_rocket_back' , 'walk_rocket_left' , 'walk_rocket_right' , 'WALK_shuffle' , 'WALK_start' , 'WALK_start_armed' , 'walk_start_back' , 'WALK_start_csaw' , 'walk_start_left' , 'walk_start_right' , 'WALK_start_rocket' , 'WEAPON_crouch' , 'WEAPON_throwu' , 'woman_idlestance' , 'woman_run' , 'woman_runpanic' , 'WOMAN_walkbusy' , 'WOMAN_walknorm' , 'WOMAN_walkold' , 'WOMAN_walksexy' , 'WOMAN_walkshop' , 'XPRESSscratch' } },
    [5] = { friendlyName = "GTA VC STORIES", blockName = "gtavc_stories", path = "Animations/gtavc_stories_ped.ifp", animations = { 'abseil' , 'ARRESTgun' , 'ATM' , 'batherdown' , 'batherscape' , 'batherup' , 'BIKE_elbowL' , 'BIKE_elbowR' , 'BIKE_fallR' , 'BIKE_fall_off' , 'BIKE_pickupL' , 'BIKE_pickupR' , 'BIKE_pullupL' , 'BIKE_pullupR' , 'bomber' , 'CAR_alignHI_LHS' , 'CAR_alignHI_RHS' , 'CAR_align_LHS' , 'CAR_align_RHS' , 'CAR_closedoorL_LHS' , 'CAR_closedoorL_RHS' , 'CAR_closedoor_LHS' , 'CAR_closedoor_RHS' , 'CAR_close_LHS' , 'CAR_close_RHS' , 'CAR_crawloutRHS' , 'CAR_doorlocked_LHS' , 'CAR_doorlocked_RHS' , 'CAR_getinL_LHS' , 'CAR_getinL_RHS' , 'CAR_getin_LHS' , 'CAR_getin_RHS' , 'CAR_getoutL_LHS' , 'CAR_getoutL_RHS' , 'CAR_getout_LHS' , 'CAR_getout_RHS' , 'car_hookertalk' , 'CAR_jackedLHS' , 'CAR_jackedRHS' , 'CAR_jumpin_LHS' , 'CAR_LB' , 'CAR_LjackedLHS' , 'CAR_LjackedRHS' , 'CAR_Lshuffle_RHS' , 'CAR_Lsit' , 'CAR_open_LHS' , 'CAR_open_RHS' , 'CAR_pulloutL_LHS' , 'CAR_pulloutL_RHS' , 'CAR_pullout_LHS' , 'CAR_pullout_RHS' , 'CAR_Qjack' , 'CAR_Qjacked' , 'CAR_rolldoor' , 'CAR_rolldoorLO' , 'CAR_rollout_LHS' , 'CAR_rollout_RHS' , 'CAR_shuffleLO' , 'CAR_shuffle_RHS' , 'CAR_sit' , 'CAR_sitp' , 'CAR_sitpLO' , 'cower' , 'DrivebyL_L' , 'DrivebyL_R' , 'Driveby_L' , 'Driveby_R' , 'DRIVE_BOAT' , 'DRIVE_BOAT_back' , 'DRIVE_BOAT_L' , 'DRIVE_BOAT_R' , 'Drive_L' , 'Drive_LO_l' , 'Drive_LO_R' , 'Drive_R' , 'Drown' , 'DUCK_down' , 'DUCK_low' , 'EV_dive' , 'EV_step' , 'FALL_back' , 'FALL_collapse' , 'FALL_fall' , 'FALL_front' , 'FALL_glide' , 'FALL_land' , 'FIGHT2IDLE' , 'FIGHTbkickL' , 'FIGHTbkickR' , 'FIGHTbodyblow' , 'FIGHTelbowL' , 'FIGHTelbowR' , 'FIGHThead' , 'FIGHTIDLE' , 'FIGHTjab' , 'FIGHTkick' , 'FIGHTknee' , 'FIGHTLhook' , 'FIGHTlngkck' , 'FIGHTppunch' , 'FIGHTpunch' , 'FIGHTrndhse' , 'FIGHTsh_back' , 'FIGHTsh_F' , 'FLOOR_hit' , 'FLOOR_hit_f' , ':Ou' , 'getup' , 'getup_front' , 'handscower' , 'handsup' , 'HIT_back' , 'HIT_behind' , 'HIT_bodyblow' , 'HIT_chest' , 'HIT_front' , 'HIT_head' , 'HIT_L' , 'HIT_R' , 'HIT_walk' , 'HIT_wall' , 'IDLE_armed' , 'IDLE_cam' , 'IDLE_chat' , 'IDLE_csaw' , 'IDLE_HBHB' , 'IDLE_ROCKET' , 'IDLE_stance' , 'IDLE_taxi' , 'IDLE_time' , 'IDLE_tired' , 'JOG_maleA' , 'JOG_maleB' , 'JUMP_glide' , 'JUMP_land' , 'JUMP_launch' , 'KD_left' , 'KD_right' , 'KICK_floor' , 'KO_shot_armL' , 'KO_shot_armR' , 'KO_shot_face' , 'KO_shot_front' , 'KO_shot_legL' , 'KO_shot_legR' , 'KO_shot_stom' , 'KO_skid_back' , 'KO_skid_front' , 'KO_spin_L' , 'KO_spin_R' , 'LIMP' , 'phone_in' , 'phone_out' , 'phone_talk' , 'pounds_A' , 'pounds_B' , 'PUNCHR' , 'RBLOCK_Cshoot' , 'roadcross' , 'run_1armed' , 'run_armed' , 'run_back' , 'run_civi' , 'run_csaw' , 'run_csaw_back' , 'run_csaw_left' , 'run_csaw_right' , 'run_fatold' , 'run_gang1' , 'run_left' , 'run_player' , 'run_right' , 'run_rocket' , 'run_rocket_back' , 'run_rocket_left' , 'run_rocket_right' , 'Run_stop' , 'Run_stopR' , 'SEAT_down' , 'SEAT_idle' , 'SEAT_rvrs' , 'SEAT_up' , 'SHOT_leftP' , 'SHOT_partial' , 'SHOT_rightP' , 'SLAPS_A' , 'SLAPS_B' , 'sprint_civi' , 'sprint_panic' , 'turn_180' , 'walkst_csaw_back' , 'walkst_csaw_left' , 'walkst_csaw_right' , 'walkst_rocket_back' , 'walkst_rocket_left' , 'walkst_rocket_right' , 'WALK_armed' , 'walk_back' , 'WALK_civi' , 'WALK_csaw' , 'walk_csaw_back' , 'walk_csaw_left' , 'walk_csaw_right' , 'WALK_fat' , 'WALK_fatold' , 'WALK_gang1' , 'WALK_gang2' , 'walk_left' , 'WALK_old' , 'WALK_player' , 'walk_right' , 'WALK_rocket' , 'walk_rocket_back' , 'walk_rocket_left' , 'walk_rocket_right' , 'WALK_shuffle' , 'WALK_start' , 'WALK_start_armed' , 'walk_start_back' , 'WALK_start_csaw' , 'walk_start_left' , 'walk_start_right' , 'WALK_start_rocket' , 'WEAPON_crouch' , 'WEAPON_throwu' , 'woman_idlestance' , 'woman_run' , 'woman_runpanic' , 'WOMAN_walkbusy' , 'WOMAN_walknorm' , 'WOMAN_walkold' , 'WOMAN_walksexy' , 'WOMAN_walkshop' , 'XPRESSscratch' } },
    [6] = { friendlyName = "GTA VC MODDED", blockName = "gtavc_modded", path = "Animations/gtavc_modded_ped.ifp", animations = { 'abseil' , 'ARRESTgun' , 'ATM' , 'batherdown' , 'batherscape' , 'batherup' , 'BIKE_elbowL' , 'BIKE_elbowR' , 'BIKE_fallR' , 'BIKE_fall_off' , 'BIKE_pickupL' , 'BIKE_pickupR' , 'BIKE_pullupL' , 'BIKE_pullupR' , 'bomber' , 'CAR_alignHI_LHS' , 'CAR_alignHI_RHS' , 'CAR_align_LHS' , 'CAR_align_RHS' , 'CAR_closedoorL_LHS' , 'CAR_closedoorL_RHS' , 'CAR_closedoor_LHS' , 'CAR_closedoor_RHS' , 'CAR_close_LHS' , 'CAR_close_RHS' , 'CAR_crawloutRHS' , 'CAR_doorlocked_LHS' , 'CAR_doorlocked_RHS' , 'CAR_getinL_LHS' , 'CAR_getinL_RHS' , 'CAR_getin_LHS' , 'CAR_getin_RHS' , 'CAR_getoutL_LHS' , 'CAR_getoutL_RHS' , 'CAR_getout_LHS' , 'CAR_getout_RHS' , 'car_hookertalk' , 'CAR_jackedLHS' , 'CAR_jackedRHS' , 'CAR_jumpin_LHS' , 'CAR_LB' , 'CAR_LjackedLHS' , 'CAR_LjackedRHS' , 'CAR_Lshuffle_RHS' , 'CAR_Lsit' , 'CAR_open_LHS' , 'CAR_open_RHS' , 'CAR_pulloutL_LHS' , 'CAR_pulloutL_RHS' , 'CAR_pullout_LHS' , 'CAR_pullout_RHS' , 'CAR_Qjack' , 'CAR_Qjacked' , 'CAR_rolldoor' , 'CAR_rolldoorLO' , 'CAR_rollout_LHS' , 'CAR_rollout_RHS' , 'CAR_shuffleLO' , 'CAR_shuffle_RHS' , 'CAR_sit' , 'CAR_sitp' , 'CAR_sitpLO' , 'cower' , 'DrivebyL_L' , 'DrivebyL_R' , 'Driveby_L' , 'Driveby_R' , 'DRIVE_BOAT' , 'DRIVE_BOAT_back' , 'DRIVE_BOAT_L' , 'DRIVE_BOAT_R' , 'Drive_L' , 'Drive_LO_l' , 'Drive_LO_R' , 'Drive_R' , 'Drown' , 'DUCK_down' , 'DUCK_low' , 'EV_dive' , 'EV_step' , 'FALL_back' , 'FALL_collapse' , 'FALL_fall' , 'FALL_front' , 'FALL_glide' , 'FALL_land' , 'FIGHT2IDLE' , 'FIGHTbkickL' , 'FIGHTbkickR' , 'FIGHTbodyblow' , 'FIGHTelbowL' , 'FIGHTelbowR' , 'FIGHThead' , 'FIGHTIDLE' , 'FIGHTjab' , 'FIGHTkick' , 'FIGHTknee' , 'FIGHTLhook' , 'FIGHTlngkck' , 'FIGHTppunch' , 'FIGHTpunch' , 'FIGHTrndhse' , 'FIGHTsh_back' , 'FIGHTsh_F' , 'FLOOR_hit' , 'FLOOR_hit_f' , ':Ou' , 'getup' , 'getup_front' , 'handscower' , 'handsup' , 'HIT_back' , 'HIT_behind' , 'HIT_bodyblow' , 'HIT_chest' , 'HIT_front' , 'HIT_head' , 'HIT_L' , 'HIT_R' , 'HIT_walk' , 'HIT_wall' , 'IDLE_armed' , 'IDLE_cam' , 'IDLE_chat' , 'IDLE_csaw' , 'IDLE_HBHB' , 'IDLE_ROCKET' , 'IDLE_stance' , 'IDLE_taxi' , 'IDLE_time' , 'IDLE_tired' , 'JOG_maleA' , 'JOG_maleB' , 'JUMP_glide' , 'JUMP_land' , 'JUMP_launch' , 'KD_left' , 'KD_right' , 'KICK_floor' , 'KO_shot_armL' , 'KO_shot_armR' , 'KO_shot_face' , 'KO_shot_front' , 'KO_shot_legL' , 'KO_shot_legR' , 'KO_shot_stom' , 'KO_skid_back' , 'KO_skid_front' , 'KO_spin_L' , 'KO_spin_R' , 'LIMP' , 'phone_in' , 'phone_out' , 'phone_talk' , 'pounds_A' , 'pounds_B' , 'PUNCHR' , 'RBLOCK_Cshoot' , 'roadcross' , 'run_1armed' , 'run_armed' , 'run_back' , 'run_civi' , 'run_csaw' , 'run_csaw_back' , 'run_csaw_left' , 'run_csaw_right' , 'run_fatold' , 'run_gang1' , 'run_left' , 'run_player' , 'run_right' , 'run_rocket' , 'run_rocket_back' , 'run_rocket_left' , 'run_rocket_right' , 'Run_stop' , 'Run_stopR' , 'SEAT_down' , 'SEAT_idle' , 'SEAT_rvrs' , 'SEAT_up' , 'SHOT_leftP' , 'SHOT_partial' , 'SHOT_rightP' , 'SLAPS_A' , 'SLAPS_B' , 'sprint_civi' , 'sprint_panic' , 'turn_180' , 'walkst_csaw_back' , 'walkst_csaw_left' , 'walkst_csaw_right' , 'walkst_rocket_back' , 'walkst_rocket_left' , 'walkst_rocket_right' , 'WALK_armed' , 'walk_back' , 'WALK_civi' , 'WALK_csaw' , 'walk_csaw_back' , 'walk_csaw_left' , 'walk_csaw_right' , 'WALK_fat' , 'WALK_fatold' , 'WALK_gang1' , 'WALK_gang2' , 'walk_left' , 'WALK_old' , 'WALK_player' , 'walk_right' , 'WALK_rocket' , 'walk_rocket_back' , 'walk_rocket_left' , 'walk_rocket_right' , 'WALK_shuffle' , 'WALK_start' , 'WALK_start_armed' , 'walk_start_back' , 'WALK_start_csaw' , 'walk_start_left' , 'walk_start_right' , 'WALK_start_rocket' , 'WEAPON_crouch' , 'WEAPON_throwu' , 'woman_idlestance' , 'woman_run' , 'woman_runpanic' , 'WOMAN_walkbusy' , 'WOMAN_walknorm' , 'WOMAN_walkold' , 'WOMAN_walksexy' , 'WOMAN_walkshop' , 'XPRESSscratch' } },
    [7] = { friendlyName = "GTA IV", blockName = "gtaiv", path = "Animations/gta4_ped.ifp", animations = { 'abseil' , 'ARRESTgun' , 'ATM' , 'batherdown' , 'batherscape' , 'batherup' , 'BIKE_elbowL' , 'BIKE_elbowR' , 'BIKE_fallR' , 'BIKE_fall_off' , 'BIKE_pickupL' , 'BIKE_pickupR' , 'BIKE_pullupL' , 'BIKE_pullupR' , 'bomber' , 'CAR_alignHI_LHS' , 'CAR_alignHI_RHS' , 'CAR_align_LHS' , 'CAR_align_RHS' , 'CAR_closedoorL_LHS' , 'CAR_closedoorL_RHS' , 'CAR_closedoor_LHS' , 'CAR_closedoor_RHS' , 'CAR_close_LHS' , 'CAR_close_RHS' , 'CAR_crawloutRHS' , 'CAR_doorlocked_LHS' , 'CAR_doorlocked_RHS' , 'CAR_getinL_LHS' , 'CAR_getinL_RHS' , 'CAR_getin_LHS' , 'CAR_getin_RHS' , 'CAR_getoutL_LHS' , 'CAR_getoutL_RHS' , 'CAR_getout_LHS' , 'CAR_getout_RHS' , 'car_hookertalk' , 'CAR_jackedLHS' , 'CAR_jackedRHS' , 'CAR_jumpin_LHS' , 'CAR_LB' , 'CAR_LjackedLHS' , 'CAR_LjackedRHS' , 'CAR_Lshuffle_RHS' , 'CAR_Lsit' , 'CAR_open_LHS' , 'CAR_open_RHS' , 'CAR_pulloutL_LHS' , 'CAR_pulloutL_RHS' , 'CAR_pullout_LHS' , 'CAR_pullout_RHS' , 'CAR_Qjack' , 'CAR_Qjacked' , 'CAR_rolldoor' , 'CAR_rolldoorLO' , 'CAR_rollout_LHS' , 'CAR_rollout_RHS' , 'CAR_shuffleLO' , 'CAR_shuffle_RHS' , 'CAR_sit' , 'CAR_sitp' , 'CAR_sitpLO' , 'cower' , 'DrivebyL_L' , 'DrivebyL_R' , 'Driveby_L' , 'Driveby_R' , 'DRIVE_BOAT' , 'DRIVE_BOAT_back' , 'DRIVE_BOAT_L' , 'DRIVE_BOAT_R' , 'Drive_L' , 'Drive_LO_l' , 'Drive_LO_R' , 'Drive_R' , 'Drown' , 'DUCK_down' , 'DUCK_low' , 'EV_dive' , 'EV_step' , 'FALL_back' , 'FALL_collapse' , 'FALL_fall' , 'FALL_front' , 'FALL_glide' , 'FALL_land' , 'FIGHT2IDLE' , 'FIGHTbkickL' , 'FIGHTbkickR' , 'FIGHTbodyblow' , 'FIGHTelbowL' , 'FIGHTelbowR' , 'FIGHThead' , 'FIGHTIDLE' , 'FIGHTjab' , 'FIGHTkick' , 'FIGHTknee' , 'FIGHTLhook' , 'FIGHTlngkck' , 'FIGHTppunch' , 'FIGHTpunch' , 'FIGHTrndhse' , 'FIGHTsh_back' , 'FIGHTsh_F' , 'FLOOR_hit' , 'FLOOR_hit_f' , ':Ou' , 'getup' , 'getup_front' , 'handscower' , 'handsup' , 'HIT_back' , 'HIT_behind' , 'HIT_bodyblow' , 'HIT_chest' , 'HIT_front' , 'HIT_head' , 'HIT_L' , 'HIT_R' , 'HIT_walk' , 'HIT_wall' , 'IDLE_armed' , 'IDLE_cam' , 'IDLE_chat' , 'IDLE_csaw' , 'IDLE_HBHB' , 'IDLE_ROCKET' , 'IDLE_stance' , 'IDLE_taxi' , 'IDLE_time' , 'IDLE_tired' , 'JOG_maleA' , 'JOG_maleB' , 'JUMP_glide' , 'JUMP_land' , 'JUMP_launch' , 'KD_left' , 'KD_right' , 'KICK_floor' , 'KO_shot_armL' , 'KO_shot_armR' , 'KO_shot_face' , 'KO_shot_front' , 'KO_shot_legL' , 'KO_shot_legR' , 'KO_shot_stom' , 'KO_skid_back' , 'KO_skid_front' , 'KO_spin_L' , 'KO_spin_R' , 'LIMP' , 'phone_in' , 'phone_out' , 'phone_talk' , 'pounds_A' , 'pounds_B' , 'PUNCHR' , 'RBLOCK_Cshoot' , 'roadcross' , 'run_1armed' , 'run_armed' , 'run_back' , 'run_civi' , 'run_csaw' , 'run_csaw_back' , 'run_csaw_left' , 'run_csaw_right' , 'run_fatold' , 'run_gang1' , 'run_left' , 'run_player' , 'run_right' , 'run_rocket' , 'run_rocket_back' , 'run_rocket_left' , 'run_rocket_right' , 'Run_stop' , 'Run_stopR' , 'SEAT_down' , 'SEAT_idle' , 'SEAT_rvrs' , 'SEAT_up' , 'SHOT_leftP' , 'SHOT_partial' , 'SHOT_rightP' , 'SLAPS_A' , 'SLAPS_B' , 'sprint_civi' , 'sprint_panic' , 'turn_180' , 'walkst_csaw_back' , 'walkst_csaw_left' , 'walkst_csaw_right' , 'walkst_rocket_back' , 'walkst_rocket_left' , 'walkst_rocket_right' , 'WALK_armed' , 'walk_back' , 'WALK_civi' , 'WALK_csaw' , 'walk_csaw_back' , 'walk_csaw_left' , 'walk_csaw_right' , 'WALK_fat' , 'WALK_fatold' , 'WALK_gang1' , 'WALK_gang2' , 'walk_left' , 'WALK_old' , 'WALK_player' , 'walk_right' , 'WALK_rocket' , 'walk_rocket_back' , 'walk_rocket_left' , 'walk_rocket_right' , 'WALK_shuffle' , 'WALK_start' , 'WALK_start_armed' , 'walk_start_back' , 'WALK_start_csaw' , 'walk_start_left' , 'walk_start_right' , 'WALK_start_rocket' , 'WEAPON_crouch' , 'WEAPON_throwu' , 'woman_idlestance' , 'woman_run' , 'woman_runpanic' , 'WOMAN_walkbusy' , 'WOMAN_walknorm' , 'WOMAN_walkold' , 'WOMAN_walksexy' , 'WOMAN_walkshop' , 'XPRESSscratch' } },
    [8] = { friendlyName = "GTA V", blockName = "gtav", path = "Animations/gta5_ped.ifp", animations = { 'abseil' , 'ARRESTgun' , 'ATM' , 'batherdown' , 'batherscape' , 'batherup' , 'BIKE_elbowL' , 'BIKE_elbowR' , 'BIKE_fallR' , 'BIKE_fall_off' , 'BIKE_pickupL' , 'BIKE_pickupR' , 'BIKE_pullupL' , 'BIKE_pullupR' , 'bomber' , 'CAR_alignHI_LHS' , 'CAR_alignHI_RHS' , 'CAR_align_LHS' , 'CAR_align_RHS' , 'CAR_closedoorL_LHS' , 'CAR_closedoorL_RHS' , 'CAR_closedoor_LHS' , 'CAR_closedoor_RHS' , 'CAR_close_LHS' , 'CAR_close_RHS' , 'CAR_crawloutRHS' , 'CAR_doorlocked_LHS' , 'CAR_doorlocked_RHS' , 'CAR_getinL_LHS' , 'CAR_getinL_RHS' , 'CAR_getin_LHS' , 'CAR_getin_RHS' , 'CAR_getoutL_LHS' , 'CAR_getoutL_RHS' , 'CAR_getout_LHS' , 'CAR_getout_RHS' , 'car_hookertalk' , 'CAR_jackedLHS' , 'CAR_jackedRHS' , 'CAR_jumpin_LHS' , 'CAR_LB' , 'CAR_LjackedLHS' , 'CAR_LjackedRHS' , 'CAR_Lshuffle_RHS' , 'CAR_Lsit' , 'CAR_open_LHS' , 'CAR_open_RHS' , 'CAR_pulloutL_LHS' , 'CAR_pulloutL_RHS' , 'CAR_pullout_LHS' , 'CAR_pullout_RHS' , 'CAR_Qjack' , 'CAR_Qjacked' , 'CAR_rolldoor' , 'CAR_rolldoorLO' , 'CAR_rollout_LHS' , 'CAR_rollout_RHS' , 'CAR_shuffleLO' , 'CAR_shuffle_RHS' , 'CAR_sit' , 'CAR_sitp' , 'CAR_sitpLO' , 'cower' , 'DrivebyL_L' , 'DrivebyL_R' , 'Driveby_L' , 'Driveby_R' , 'DRIVE_BOAT' , 'DRIVE_BOAT_back' , 'DRIVE_BOAT_L' , 'DRIVE_BOAT_R' , 'Drive_L' , 'Drive_LO_l' , 'Drive_LO_R' , 'Drive_R' , 'Drown' , 'DUCK_down' , 'DUCK_low' , 'EV_dive' , 'EV_step' , 'FALL_back' , 'FALL_collapse' , 'FALL_fall' , 'FALL_front' , 'FALL_glide' , 'FALL_land' , 'FIGHT2IDLE' , 'FIGHTbkickL' , 'FIGHTbkickR' , 'FIGHTbodyblow' , 'FIGHTelbowL' , 'FIGHTelbowR' , 'FIGHThead' , 'FIGHTIDLE' , 'FIGHTjab' , 'FIGHTkick' , 'FIGHTknee' , 'FIGHTLhook' , 'FIGHTlngkck' , 'FIGHTppunch' , 'FIGHTpunch' , 'FIGHTrndhse' , 'FIGHTsh_back' , 'FIGHTsh_F' , 'FLOOR_hit' , 'FLOOR_hit_f' , ':Ou' , 'getup' , 'getup_front' , 'handscower' , 'handsup' , 'HIT_back' , 'HIT_behind' , 'HIT_bodyblow' , 'HIT_chest' , 'HIT_front' , 'HIT_head' , 'HIT_L' , 'HIT_R' , 'HIT_walk' , 'HIT_wall' , 'IDLE_armed' , 'IDLE_cam' , 'IDLE_chat' , 'IDLE_csaw' , 'IDLE_HBHB' , 'IDLE_ROCKET' , 'IDLE_stance' , 'IDLE_taxi' , 'IDLE_time' , 'IDLE_tired' , 'JOG_maleA' , 'JOG_maleB' , 'JUMP_glide' , 'JUMP_land' , 'JUMP_launch' , 'KD_left' , 'KD_right' , 'KICK_floor' , 'KO_shot_armL' , 'KO_shot_armR' , 'KO_shot_face' , 'KO_shot_front' , 'KO_shot_legL' , 'KO_shot_legR' , 'KO_shot_stom' , 'KO_skid_back' , 'KO_skid_front' , 'KO_spin_L' , 'KO_spin_R' , 'LIMP' , 'phone_in' , 'phone_out' , 'phone_talk' , 'pounds_A' , 'pounds_B' , 'PUNCHR' , 'RBLOCK_Cshoot' , 'roadcross' , 'run_1armed' , 'run_armed' , 'run_back' , 'run_civi' , 'run_csaw' , 'run_csaw_back' , 'run_csaw_left' , 'run_csaw_right' , 'run_fatold' , 'run_gang1' , 'run_left' , 'run_player' , 'run_right' , 'run_rocket' , 'run_rocket_back' , 'run_rocket_left' , 'run_rocket_right' , 'Run_stop' , 'Run_stopR' , 'SEAT_down' , 'SEAT_idle' , 'SEAT_rvrs' , 'SEAT_up' , 'SHOT_leftP' , 'SHOT_partial' , 'SHOT_rightP' , 'SLAPS_A' , 'SLAPS_B' , 'sprint_civi' , 'sprint_panic' , 'turn_180' , 'walkst_csaw_back' , 'walkst_csaw_left' , 'walkst_csaw_right' , 'walkst_rocket_back' , 'walkst_rocket_left' , 'walkst_rocket_right' , 'WALK_armed' , 'walk_back' , 'WALK_civi' , 'WALK_csaw' , 'walk_csaw_back' , 'walk_csaw_left' , 'walk_csaw_right' , 'WALK_fat' , 'WALK_fatold' , 'WALK_gang1' , 'WALK_gang2' , 'walk_left' , 'WALK_old' , 'WALK_player' , 'walk_right' , 'WALK_rocket' , 'walk_rocket_back' , 'walk_rocket_left' , 'walk_rocket_right' , 'WALK_shuffle' , 'WALK_start' , 'WALK_start_armed' , 'walk_start_back' , 'WALK_start_csaw' , 'walk_start_left' , 'walk_start_right' , 'WALK_start_rocket' , 'WEAPON_crouch' , 'WEAPON_throwu' , 'woman_idlestance' , 'woman_run' , 'woman_runpanic' , 'WOMAN_walkbusy' , 'WOMAN_walknorm' , 'WOMAN_walkold' , 'WOMAN_walksexy' , 'WOMAN_walkshop' , 'XPRESSscratch' } },
    [9] = { friendlyName = "360 DAB", blockName = "dab", path = "Animations/StandingWebsterAerialBack360.ifp", animations = { 'weapon_crouch' } }
}

globalReplaceableIfpsIndices = {
    2, 4, 5, 6, 7, 8
}


globalPedAnimationBlock = {
    -- Complete list of all animations in ped block, it is the default block
    -- in gta sa 
    animations = {
        "abseil","arrestgun","atm","bike_elbowl","bike_elbowr","bike_fallr","bike_fall_off","bike_pickupl","bike_pickupr",
        "bike_pullupl","bike_pullupr","bomber","car_alignhi_lhs","car_alignhi_rhs","car_align_lhs","car_align_rhs","car_closedoorl_lhs",
        "car_closedoorl_rhs","car_closedoor_lhs","car_closedoor_rhs","car_close_lhs","car_close_rhs","car_crawloutrhs","car_dead_lhs","car_dead_rhs",
        "car_doorlocked_lhs","car_doorlocked_rhs","car_fallout_lhs","car_fallout_rhs","car_getinl_lhs","car_getinl_rhs","car_getin_lhs","car_getin_rhs",
        "car_getoutl_lhs","car_getoutl_rhs","car_getout_lhs","car_getout_rhs","car_hookertalk","car_jackedlhs","car_jackedrhs","car_jumpin_lhs",
        "car_lb","car_lb_pro","car_lb_weak","car_ljackedlhs","car_ljackedrhs","car_lshuffle_rhs","car_lsit","car_open_lhs","car_open_rhs",
        "car_pulloutl_lhs","car_pulloutl_rhs","car_pullout_lhs","car_pullout_rhs","car_qjacked","car_rolldoor","car_rolldoorlo","car_rollout_lhs",
        "car_rollout_rhs","car_shuffle_rhs","car_sit","car_sitp","car_sitplo","car_sit_pro","car_sit_weak","car_tune_radio","climb_idle","climb_jump",
        "climb_jump2fall","climb_jump_b","climb_pull","climb_stand","climb_stand_finish","cower","crouch_roll_l","crouch_roll_r","dam_arml_frmbk",
        "dam_arml_frmft","dam_arml_frmlt","dam_armr_frmbk","dam_armr_frmft","dam_armr_frmrt","dam_legl_frmbk","dam_legl_frmft","dam_legl_frmlt","dam_legr_frmbk",
        "dam_legr_frmft","dam_legr_frmrt","dam_stomach_frmbk","dam_stomach_frmft","dam_stomach_frmlt","dam_stomach_frmrt","door_lhinge_o","door_rhinge_o",
        "drivebyl_l","drivebyl_r","driveby_l","driveby_r","drive_boat","drive_boat_back","drive_boat_l","drive_boat_r","drive_l","drive_lo_l","drive_lo_r",
        "drive_l_pro","drive_l_pro_slow","drive_l_slow","drive_l_weak","drive_l_weak_slow","drive_r","drive_r_pro","drive_r_pro_slow","drive_r_slow","drive_r_weak",
        "drive_r_weak_slow","drive_truck","drive_truck_back","drive_truck_l","drive_truck_r","drown","duck_cower","endchat_01","endchat_02","endchat_03",
        "ev_dive","ev_step","facanger","facgum","facsurp","facsurpm","factalk","facurios","fall_back","fall_collapse","fall_fall","fall_front","fall_glide",
        "fall_land","fall_skydive","fight2idle","fighta_1","fighta_2","fighta_3","fighta_block","fighta_g","fighta_m","fightidle","fightshb","fightshf",
        "fightsh_bwd","fightsh_fwd","fightsh_left","fightsh_right","flee_lkaround_01","floor_hit","floor_hit_f",":Ou","gang_gunstand","gas_cwr","getup",
        "getup_front","gum_eat","guncrouchbwd","guncrouchfwd","gunmove_bwd","gunmove_fwd","gunmove_l","gunmove_r","gun_2_idle","gun_butt","gun_butt_crouch",
        "gun_stand","handscower","handsup","hita_1","hita_2","hita_3","hit_back","hit_behind","hit_front","hit_gun_butt","hit_l","hit_r","hit_walk","hit_wall",
        "idlestance_fat","idlestance_old","idle_armed","idle_chat","idle_csaw","idle_gang1","idle_hbhb","idle_rocket","idle_stance","idle_taxi","idle_tired",
        "jetpack_idle","jog_femalea","jog_malea","jump_glide","jump_land","jump_launch","jump_launch_r","kart_drive","kart_l","kart_lb","kart_r","kd_left",
        "kd_right","ko_shot_face","ko_shot_front","ko_shot_stom","ko_skid_back","ko_skid_front","ko_spin_l","ko_spin_r","pass_smoke_in_car","phone_in","phone_out",
        "phone_talk","player_sneak","player_sneak_walkstart","roadcross","roadcross_female","roadcross_gang","roadcross_old","run_1armed","run_armed",
        "run_civi","run_csaw","run_fat","run_fatold","run_gang1","run_left","run_old","run_player","run_right","run_rocket","run_stop","run_stopr",
        "run_wuzi","seat_down","seat_idle","seat_up","shot_leftp","shot_partial","shot_partial_b","shot_rightp","shove_partial","smoke_in_car",
        "sprint_civi","sprint_panic","sprint_wuzi","swat_run","swim_tread","tap_hand","tap_handp","turn_180","turn_l","turn_r","walk_armed","walk_civi",
        "walk_csaw","walk_doorpartial","walk_drunk","walk_fat","walk_fatold","walk_gang1","walk_gang2","walk_old","walk_player","walk_rocket","walk_shuffle",
        "walk_start","walk_start_armed","walk_start_csaw","walk_start_rocket","walk_wuzi","weapon_crouch","woman_idlestance","woman_run","woman_runbusy",
        "woman_runfatold","woman_runpanic","woman_runsexy","woman_walkbusy","woman_walkfatold","woman_walknorm","woman_walkold","woman_walkpro","woman_walksexy",
        "woman_walkshop","xpressscratch"
    },

    -- We will use this for checking whether animation is partial or not for ped block
    -- if it is, we won't replace it. Partial animations can be played using setPedAnimation.
    partialAnimations = {
        ["CAR_alignHI_LHS"] = true,
        ["CAR_alignHI_RHS"] = true,
        ["DAM_armL_frmFT"] = true,
        ["endchat_01"] = true,
        ["endchat_02"] = true,
        ["endchat_03"] = true,
        ["facanger"] = true,
        ["facgum"] = true,
        ["facsurp"] = true,
        ["facsurpm"] = true,
        ["factalk"] = true,
        ["facurios"] = true,
        ["FightA_M"] = true,
        ["FightA_block"] = true,
        ["flee_lkaround_01"] = true,
        ["handscower"] = true,
        ["HIT_walk"] = true,
        ["IDLE_chat"] = true,
        ["pass_Smoke_in_car"] = true,
        ["phone_in"] = true,
        ["phone_out"] = true,
        ["phone_talk"] = true,
        ["SHOT_leftP"] = true,
        ["SHOT_partial"] = true,
        ["SHOT_partial_B"] = true,
        ["SHOT_rightP"] = true,
        ["Shove_Partial"] = true,
        ["Smoke_in_car"] = true,
        ["Walk_DoorPartial"] = true,
    }
}

 

Link to comment

Okay, I can see everything's right here. Now tell me where you are calling startingAnimations function? You have defined the function but you never call it anywhere within the code which means the code never executes.

Edited by Saml1er
Link to comment
7 hours ago, greentumbleweed said:

its at the bottom of the client

Nope. You have only defined the function, you never call it. It's like you sit in a vehicle with no driver and you expect it to magically take you to your destination, that won't happen. You have to drive the vehicle, in the same way, you have to call this function. You call the function like this:

startingAnimations()

Ok, calling this function before the download will not work because the IFP has not loaded, so we'll use an event for it. Put this code snippet at the bottom of client.lua:

addEventHandler("onClientResourceStart", resourceRoot,
    function()
        startingAnimations() -- call the function
    end
)

 

Link to comment
17 hours ago, Saml1er said:

Nope. You have only defined the function, you never call it. It's like you sit in a vehicle with no driver and you expect it to magically take you to your destination, that won't happen. You have to drive the vehicle, in the same way, you have to call this function. You call the function like this:


startingAnimations()

Ok, calling this function before the download will not work because the IFP has not loaded, so we'll use an event for it. Put this code snippet at the bottom of client.lua:


addEventHandler("onClientResourceStart", resourceRoot,    function()        startingAnimations() -- call the function    end)

 

my last question and the one i should have started with is what is "ifpIndex" is that the number or is that the block name

--Test
addEventHandler("onClientResourceStart", resourceRoot,
    function()
        startingAnimations() -- call the function
    end
)

function startingAnimations()
    ReplacePedBlockAnimations ( source, 7 )
end 
--END

ReplacePedBlockAnimations ( player, ifpIndex )-- i do not understand i tried 7 and nothing happens, also tried "GTA IV" still nothing

 

Link to comment
3 hours ago, greentumbleweed said:

my last question and the one i should have started with is what is "ifpIndex" is that the number or is that the block name


--TestaddEventHandler("onClientResourceStart", resourceRoot,    function()        startingAnimations() -- call the function    end)function startingAnimations()    ReplacePedBlockAnimations ( source, 7 )end --ENDReplacePedBlockAnimations ( player, ifpIndex )-- i do not understand i tried 7 and nothing happens, also tried "GTA IV" still nothing

 

"ifpIndex" is the index of the ifp file you want to load from globalLoadedIfps table, the table contains IFP data, like file path, new block name, the animations of the ifp file, etc.. Instead of sending an entire table via triggerServerEvent or triggerClientEvent which will use more internet bandwidth, we simply send an index of the required table for ifp which will be much faster. Also, can you please login as admin and execute /debugscript 3 on your server? It will show you errors within code on screen if there are any. Also, I just realized that source is also not defined here:

function startingAnimations()
    ReplacePedBlockAnimations ( source, 7 ) -- Where is source defined? It is not a predefined variable.
end 

Correction:

function startingAnimations()
    ReplacePedBlockAnimations ( localPlayer, 7 )
end 

localPlayer is a predefined variable on client side. It will always be valid. localPlayer is YOU. 

More about predefined variables: https://wiki.multitheftauto.com/wiki/Predefined_variables_list

Edited by Saml1er
Link to comment
13 hours ago, Saml1er said:
  • function startingAnimations()
  • ReplacePedBlockAnimations ( localPlayer, 7 )
  • end

so.. i have this figured out but still.. the animations are not synced ive tried a few things and i feel like im close but no cigar

 

--Test "Client"
addEvent ("onClientCustomAnimationSyncRequest2",true)
addEventHandler("onClientCustomAnimationSyncRequest2", resourceRoot, aSTart)
function aSTart(playerAnimations)
	for player, anims in pairs ( playerAnimations ) do 
        if isElement ( player ) then 
            if anims.replacedPedBlock then 
                ReplacePedBlockAnimations ( player, anims.replacedPedBlock )
            end
        end
    end 
    startingAnimations() 
end
addEventHandler("onClientResourceStart",resourceRoot, aSTart)

function startingAnimations()
    ReplacePedBlockAnimations ( localPlayer, 7 )
end 

--TEST "Server"
addEvent ("onCustomAnimationSyncRequest", true )
addEventHandler ("onCustomAnimationSyncRequest", root,
    function ( player )
        table.insert ( synchronizationPlayers, player )
        triggerLatentClientEvent ( player, "onClientCustomAnimationSyncRequest", 50000, false, player, playerAnimations )
		triggerLatentClientEvent ( player, "onClientCustomAnimationSyncRequest2", 50000, false, player, playerAnimations )
    end 
)

 im getting this error

ERROR:IFPM/client.lua:223:bad argument #1 to 'pairs'(table expected, got userdata)

P.S: i learned to code from reading others code so i get lost a lot sadly. Also i stopped messing with mta for about a year so im rusty! sorry for mile long thread 

Edited by greentumbleweed
Link to comment

Delete all of your code from server.lua and client.lua. Copy-paste everything from ifp_demo and put this in client.lua at bottom of the file:

addEventHandler("onClientResourceStart", resourceRoot,
    function()
        local ifpIndex = 7       
        ReplacePedBlockAnimations ( localPlayer, ifpIndex )
        triggerServerEvent ( "onCustomAnimationReplace", resourceRoot, localPlayer, ifpIndex )
    end
)

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...