Name Overlap (Label)
#1

Please help, i have this bug.
The code:
Код:
new Text3D:namelabel[MAX_PLAYERS];
Disconnect:
Код:
Delete3DTextLabel(namelabel[playerid]);
Creation of label
Код:
namelabel[playerid] = Create3DTextLabel(removeunderscore(playerid), COLOR_WHITE, 0, 0, 0, DRAWDISTANCE, 0, 1);
    Attach3DTextLabelToPlayer(namelabel[playerid],playerid, 0.0, 0.0, 0.2);
Creation of stock
Код:
stock removeunderscore(playerid)
{
	new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    for(new i = 0; i < MAX_PLAYER_NAME; i++)
    {
    if(name[i] == '_') name[i] = ' ';
	}
	return name;
}
Reply
#2

Please help me.
Reply
#3

What was your problem again?
Reply
#4

try

PHP код:
stock removeunderscore(playerid)
{
    new 
name[MAX_PLAYER_NAME];
    
GetPlayerName(playeridnamesizeof(name));
    
name[strfind(name,"_")] = ' ';
    return 
name;

Reply
#5

Would be a good idea to put up the compiler error... That'd make help a lot more forthcoming.
Reply
#6

Quote:
Originally Posted by Eloy
Посмотреть сообщение
try

PHP код:
stock removeunderscore(playerid)
{
    new 
name[MAX_PLAYER_NAME];
    
GetPlayerName(playeridnamesizeof(name));
    
name[strfind(name,"_")] = ' ';
    return 
name;

try!
Reply
#7

Quote:
Originally Posted by Eloy
Посмотреть сообщение
try

PHP код:
stock removeunderscore(playerid)
{
    new 
name[MAX_PLAYER_NAME];
    
GetPlayerName(playeridnamesizeof(name));
    
name[strfind(name,"_")] = ' ';
    return 
name;

Don't work...
Reply
#8

UP.
Please.
Reply
#9

Please give some details about your problem other than bumping.
Reply
#10

Quote:
Originally Posted by Sreyas
Посмотреть сообщение
Please give some details about your problem other than bumping.
Player1 has Player2 name, but Player2 has Player1 name overlapped to his name.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)