Advertisement
Guest User

Example Handsup

a guest
Mar 16th, 2017
1,421
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.48 KB | None | 0 0
  1. --CLIENT SIDE CODE--
  2. local handsup = false
  3.  
  4. RegisterNetEvent("csrp_Handsup")
  5. AddEventHandler("csrp_Handsup", function()
  6.     if not handsup then
  7.         TaskHandsUp(GetPlayerPed(-1), -1, GetPlayerPed(-1), -1, true)
  8.         handsup = true
  9.     else
  10.         UpdateTaskHandsUpDuration(GetPlayerPed(-1), 2)
  11.     end
  12. end)
  13.  
  14. -- SERVER SIDE CODE --
  15. AddEventHandler("chatMessage", function(source, n, message)
  16.     if message == "/handsup" then
  17.         TriggerClientEvent("csrp_Handsup", source)
  18.     end
  19.     CancelEvent()
  20. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement