16.10.2014, 09:43
Hello guys, today I code a Player3DTextLabel NameTag System..
But nobody help me to test it.
Do you wanna test it or give me a better one?
Thanks.
But nobody help me to test it.
Do you wanna test it or give me a better one?
Thanks.
pawn Код:
#define FILTERSCRIPT
#include <a_samp>
#define COLOR_OF_TAG 0x008080FF
static PlayerText3D:NameTag[MAX_PLAYERS][MAX_PLAYERS],
PlayerName[MAX_PLAYERS][MAX_PLAYER_NAME];
public OnGameModeInit() {
ShowNameTags(false);
return 1;
}
public OnPlayerConnect(playerid) {
GetPlayerName(playerid, PlayerName[playerid],MAX_PLAYER_NAME);
for(new i = 0; i < MAX_PLAYER_NAME; i++) {
if (PlayerName[playerid][i] == '_') {
PlayerName[playerid][i] = ' ';
}
}
return 1;
}
public OnPlayerStreamIn(playerid, forplayerid) {
NameTag[forplayerid][playerid] = CreatePlayer3DTextLabel(forplayerid, PlayerName[playerid], COLOR_OF_TAG, 0.0, 0.0, 0.2, 50.0, true);
return 1;
}
public OnPlayerStreamOut(playerid, forplayerid) {
DeletePlayer3DTextLabel(forplayerid, NameTag[forplayerid][playerid]);
return 1;
}