Dzsozi (h03) Posted March 10, 2014 Share Posted March 10, 2014 Hey guys! I decided to make an AFK system which is put an image above your head if you not move for example 2 minutes. The problem is that I don't know how to start it and how to make a "3D" image above people's head. Maybe some chat icon system could help but I don't know how. So could anyone help me in this please? So a little picture above players head if they don't move or if they enable the main menu (press escape). I would be grateful if anyone could help me in this. Thank you! Link to comment
Hell-Mate Posted March 11, 2014 Share Posted March 11, 2014 Here is the functions u can go with > --Server isElementMoving -- to check if the element is moving --Client dxDrawImage -- to draw an image on the player's head isElementMoving : Click here dxDrawImage : Click here Link to comment
xXMADEXx Posted March 11, 2014 Share Posted March 11, 2014 Use a timer (server-side) that loops threw the players every, ohh, let's say 10 seconds, and then it check their idle time (using getPlayerIdleTime), and if the idle time is bigger than like 2 minutes, it will insert the player to a table. Once all of the players have been looped threw, and checked if they're AFK then it will send a client event to all players, and then on the client side, you make a global variable, and using onClientRender, you use dxDrawImage, and getScreenFromWorldPosition. Sorry, it's kinda long and extensive, but it does make since. Just don't be shy on asking for help.; Link to comment
Noki Posted March 11, 2014 Share Posted March 11, 2014 I recommend using: isLineOfSightClear dxDrawText getPlayerIdleTime isMTAMainWindowActive Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now