Trevit Posted February 16, 2011 Posted February 16, 2011 Hi, If you look at any Player ingame, you see his name and health. I want to change the position of the player's name to his head and I want to make a seperate bar for his armor. How can i do this?
Castillo Posted February 16, 2011 Posted February 16, 2011 You can't move the default health bars, name, you must create your own using DX drawing functions. https://wiki.multitheftauto.com/wiki/Cli ... _functions
Trevit Posted February 16, 2011 Author Posted February 16, 2011 But if I create them clientside, only the player see them. I want that every player can see the bar, expect the player himself.
Castillo Posted February 16, 2011 Posted February 16, 2011 that's not right, if i'm right every should see them, and about that you shouldn't see yours, there is a way but i don't know it.
Aibo Posted February 16, 2011 Posted February 16, 2011 well every player will see it, because client scripts run for every player. loop through players onClientRender event, and draw a bar for every one, if player ~= getLocalPlayer().
Castillo Posted February 16, 2011 Posted February 16, 2011 so with that check, won't show for the local player, right? ( i suposed was like this )
50p Posted February 16, 2011 Posted February 16, 2011 Check this resource or the video if you don't want to download it: https://community.multitheftauto.com/index.php?p= ... ils&id=234 It was made as an example for people to learn about ped controls, there is also a health bar for the peds, check how it was made.
Trevit Posted February 17, 2011 Author Posted February 17, 2011 THANK YOU! Now i want to draw the players name over his head. Wich function is right for that?
Castillo Posted February 17, 2011 Posted February 17, 2011 to draw his name use https://wiki.multitheftauto.com/wiki/DxDrawText combined with getPlayerName.
12p Posted February 17, 2011 Posted February 17, 2011 MetalGear14, you know he won't be able to do that only by using those 2 functions, and very few days on MTA Server Developing level I suggest you use this resource: https://community.multitheftauto.com/index.php?p=resources&s=details&id=734 When you know how to script, you will be able to do it by yourself.
Trevit Posted February 18, 2011 Author Posted February 18, 2011 Thanks for the link. I have another little problem at the moment: Always when a player enters a vehicle, he starts the engine. I tried to solve it with "onPlayerVehicleEnter" and "onVehicleEnter", but if i use that, he tries to start the engine, but the process gets interrupted. I want that he doesn't try it. Do you know any way for that?
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