Player Name(3d Text) doesn't show at all! -_- - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Player Name(3d Text) doesn't show at all! -_- (
/showthread.php?tid=526994)
Player Name(3d Text) doesn't show at all! -_- -
TheSimpleGuy - 20.07.2014
I've tried very many various methods such as SetPlayerChatBubble etc etc and I've followed a FILTERSCRIPT(credits to whom who made this):
pawn Код:
#define FILTERSCRIPT
#include <a_samp>
new Text3D:NameTag[MAX_PLAYERS];
new playerName[MAX_PLAYER_NAME];
#if defined FILTERSCRIPT
stock GetName(playerid)
{
new name1[MAX_PLAYER_NAME];
GetPlayerName(playerid, name1, sizeof(name1));
return name1;
}
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Blank Filterscript by your name here");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}
#endif
public OnGameModeInit()
{
// Don't use these lines if it's a filterscript
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerConnect(playerid)
{
playerName = GetName(playerid);
NameTag[playerid] = Create3DTextLabel(playerName,GetPlayerColor(playerid), 0, 0, 0, 250.0, 0, 1 );
Attach3DTextLabelToPlayer(NameTag[playerid], playerid, 0.0, 0.0, 0.3);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
Delete3DTextLabel(NameTag[playerid]);
return 1;
}
It still doesn't work!! Help!
Re: Player Name(3d Text) doesn't show at all! -_- -
IceBilizard - 20.07.2014
try on
pawn Код:
public OnPlayerSpawn(playerid)
{
playerName = GetName(playerid);
NameTag[playerid] = Create3DTextLabel(playerName,GetPlayerColor(playerid),30.0, 40.0, 50.0, 40.0, 0 );
Attach3DTextLabelToPlayer(NameTag[playerid], playerid, 0.0, 0.0, 0.3);
return 1;
}
Re: Player Name(3d Text) doesn't show at all! -_- -
MattTucker - 20.07.2014
I don't really know about the solution but I think I can help.
The variable named playerName[MAX_PLAYER_NAME]; is normally a string, and to change strings/edit them you don't use the = sign.
Try using
pawn Код:
format(playerName,sizeof(playerName), "%s",GetName(playerid));
Re: Player Name(3d Text) doesn't show at all! -_- -
TheSimpleGuy - 26.07.2014
I tried both but it didn't work, bump, help, TIA.