HUD health/armor bar.
#1

Hello guys,

Here I am, again haha.

I'm editing a roleplay script but I want to hide the HUD health and armor bar to avoid metagamers into my gamemode.

I know how to remove it with:
Код:
ShowNameTags(false);
But I want the name still above the head is that possible?

Thanks!
Reply
#2

Add this under OnPlayerConnect

pawn Код:
new playername[24];
format(playername, sizeof(playername), "%s", GetPlayerName(playerid));
new Text3D:attachplayername = Create3DTextLabeL(playername, 0xFF9900FF, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(attachplayername, playerid, 0.0,0.0,0.2);
Reply
#3

I'm getting two warnings:

Код:
C:\Users\Nourdin\Desktop\Nourdin\SA-MP\LSC-RP - by Faff\gamemodes\sgrp.pwn(3949) : warning 202: number of arguments does not match definition
C:\Users\Nourdin\Desktop\Nourdin\SA-MP\LSC-RP - by Faff\gamemodes\sgrp.pwn(3949) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Warnings.
The lines:
Код:
format(playernamehud, sizeof(playernamehud), "%s", GetPlayerName(playerid));
I have changed the variable, because playername already exist in the gamemode.
Reply
#4

This.

pawn Код:
new playername[24];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(playername, sizeof(playername), "%s", name);
new Text3D:attachplayername = Create3DTextLabel(playername, 0xFF9900FF, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(attachplayername, playerid, 0.0,0.0,0.2);
Reply
#5

pawn Код:
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
format(string, sizeof(string), "%s",pName);
new Text3D:attachplayername = Create3DTextLabeL(pName, 0xFF9900FF, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(attachpName, playerid, 0.0,0.0,0.2);
Reply
#6

Quote:
Originally Posted by Ken97
Посмотреть сообщение
This.

pawn Код:
new playername[24];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(playername, sizeof(playername), "%s", name);
new Text3D:attachplayername = Create3DTextLabel(playername, 0xFF9900FF, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(attachplayername, playerid, 0.0,0.0,0.2);
Thanks for this.I was longing that someone make it x)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)