Hands-up Hotkey [Server-Side]

Hello, i woundered my self if it would be possible to make a .lua script which triggers an event (animation) to a player when you press a certain defined key. I would try it on my own, but the Fivereborn wiki is down and I am really bad at lua. Can someone maybe help me with it?

At first you have to know that it isn’t the servers job to handel playercontrols or something like this.
So it is simple as I tell others in some posts of myself - you have to do this client side.

And this isn’t that hard take a look at the chat resource, there is a function right at the end of the file which handles the “I press the t-button”.
You have to modify this in your script with the button you want to use it for your hands up animation.

Then take a look at the nativedb and the Konijima Wiki
There you find all you need for create such a thing you want to do.

Do not understand me wrong, I’m a very helpfull person but help some one don’t mean here is the full code if you know what I mean.
If you need help in your Code just post I right under this topic, because for your future plans it gives you nothing if you only copy and paste stuff and do not understand everything of it.

Lua isn’t that hard and everyone is able to learn Lua with a lot of ambition. :slight_smile:

@Yashiku Thank you for your help, really appreciate it. I can fully understand you, so I will try it on my own and if I need any help with it, I will let you know :slight_smile:

You’re welcome :slight_smile:

https://www.gta5-mods.com/scripts/policemenu-v - If you install this script, when you hit F7 navigate to the fivereborn menu on the bottom, and you will see hands up (or something like that). I have used this before and it is server side.

@Yashiku Something like this when you press letter T? make hands go up?

Citizen.CreateThread(function()
if IsControlPressed(0, 245) --[[ INPUT_MP_TEXT_CHAT_ALL ]] then
pedPlayer.Task.HandsUp(2000);
end

No clue, Im so new to this and lack of information on it makes it a little harder. I have no clue if this script works or not It prob doesn’t but I hope Im on the right track here. Can’t seem to find anything that will make a animation begin on key press.

it is very very possible and all u gotta do is assign a key to an animation

Well yes of-course thats as simple as it gets thats exactly what the concept is but going “yea just assign a button to do a action” is pretty self explanatory but he is asking for help, and I tried to help you commenting “Just do this” with no insight or help is just a big middle finger to him and thats not helpful at all…

1 Like

@KrizFrost Thank you very much, you are the first person who was really helpful at all, this forum needs more people like you.

@Benni0902 said in Hands-up Hotkey [Server-Side]:

@KrizFrost Thank you very much, you are the first person who was really helpful at all, this forum needs more people like you.

Did it actually work if so please message me the script you got it working cause seriously I didn’t know that would actually work

@KrizFrost tried it but had no luck with it, but i will keep on and try it by myself

Here you go:
http://forum.fivereborn.com/topic/2070/handsup-script-by-kanersps

awesome kaner much appreciated