JaGv
2
So for your case, it may be good to have both a client & server script.
FiveM resources use a client-server model of programming, and you have access to certain native functions based on which scope you are in. Client only deals with things registered by the player while server handles other things.
The RegisterCommand native is shared, meaning commands can be registered in either the client or the server. From there, you would probably want to trigger a server event that takes the target players ID as an argument. Then, call a client event to that player with the SetEntityHealth function setting their health to zero.
1 Like