Advertisement
Guest User

server

a guest
Dec 14th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.32 KB | None | 0 0
  1. local _ = function(k,...) return ImportPackage("i18n").t(GetPackageName(),k,...) end
  2.  
  3. local danceIds = {
  4.     dance_1 = "DANCE01",
  5.     dance_2 = "DANCE02",
  6.     dance_3 = "DANCE03",
  7.  
  8. }
  9.  
  10. local actionIds = {
  11.     action_1 = "SIT01",
  12.     action_2 = "LAY01",
  13.     action_3 = "CALLME",
  14. }
  15.  
  16. local diversIds = {
  17.     divers_1 = "CLAP3",
  18.     divers_2 = "CALL_SOMEONE",
  19.     divers_3 = "LAUGH",
  20.     divers_4 = "SALUTE2",
  21.     divers_5 = "KUNGFU",
  22.     divers_6 = "DABSAREGAY",
  23.     divers_7 = "CROSSARMS",
  24.     divers_8 = "THINKING01",
  25.     divers_9 = "FISHING",  
  26. }
  27.  
  28. AddRemoteEvent("ServerAnimationMenu", function(player)
  29.     local playersIds = GetAllPlayers()
  30.     CallRemoteEvent(player, "OpenAnimationMenu", danceIds, actionIds, diversIds, playersIds)
  31. end)
  32.  
  33. AddRemoteEvent("PlayerSetDance", function(playerid, animationName)
  34. for k,v in pairs(danceIds) do
  35.         if k == animationName then
  36.             SetPlayerAnimation(playerid,  v)
  37.         end
  38.     end
  39. end)
  40.  
  41. AddRemoteEvent("PlayerSetAction", function(playerid, animationName)
  42. for k,v in pairs(actionIds) do
  43.         if k == animationName then
  44.             SetPlayerAnimation(playerid,  v)
  45.         end
  46.     end
  47. end)
  48.  
  49. AddRemoteEvent("PlayerSetDivers", function(playerid, animationName)
  50. for k,v in pairs(diversIds) do
  51.         if k == animationName then
  52.             SetPlayerAnimation(playerid,  v)
  53.         end
  54.     end
  55. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement