🤠 Wild Country Libs
Client API

Emotes

Synchronized player+NPC emotes, looping conversation gestures, and the money-handover reward animation. All functions are framework-agnostic pure-native wrappers.

StartConversationGestures(npcPed, skipNpc, skipPlayer) → functionclient

Starts looping idle-conversation gestures while a dialogue is open. Returns a stopper function — call it when dialogue closes.

ParamTypeDescription
npcPednumberEntity handle of the NPC.
skipNpcboolean | nilIf true, NPC plays no gestures.
skipPlayerboolean | nilIf true, player plays no gestures.
PlayShareEmote(emoteKey, npcPed, customEmotes)client

Plays a synchronized emote between player and NPC. emoteKey indexes into WCLibEmote.ShareEmotes or the optional customEmotes table.

ParamTypeDescription
emoteKeystringBuilt-in keys: hug, handshake, hat_tip, wave_thanks, cheer, kneel_grateful.
npcPednumberEntity handle of the NPC.
customEmotestable | nilOptional table of custom emote definitions to override built-ins.
PlayFailEmote(emoteKey, npcPed, customEmotes)client

Plays an NPC fail-reaction emote.

ParamTypeDescription
emoteKeystringBuilt-in keys: slap, push, cry_run, cry_turn, shoo, head_shake, frustrated_gesture, ignore.
npcPednumberEntity handle of the NPC.
customEmotestable | nilOptional table of custom emote definitions to override built-ins.
PlayRewardHandover(npcPed)client

Full blocking money-handover reward animation (~8 seconds). NPC spawns a bill prop on its hand and passes it to the player.

ParamTypeDescription
npcPednumberEntity handle of the NPC performing the handover.
example
-- Conversation gestures (returns a stopper)
local stop = wc:StartConversationGestures(npcPed)
Wait(5000)
stop()

-- Synchronized emote
wc:PlayShareEmote('handshake', npcPed)

-- Reward handover animation
wc:PlayRewardHandover(npcPed)
TriggerServerEvent('myResource:giveReward', rewardAmount)

Real Wild County example — stagecoach mission reward

wc_stagecoach/client/main.lua
wc:PlayRewardHandover(clerkPed) -- ~8s blocking animation
TriggerServerEvent('wc_stagecoach:missionComplete') -- server pays out AFTER the animation

Common mistakes

Troubleshooting