SA-MP Forums Archive
Name Overlap (Label) - 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: Name Overlap (Label) (/showthread.php?tid=629518)



Name Overlap (Label) - xRaffaelex - 27.02.2017

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;
}



Re: Name Overlap (Label) - xRaffaelex - 27.02.2017

Please help me.


Re: Name Overlap (Label) - Toroi - 27.02.2017

What was your problem again?


Respuesta: Name Overlap (Label) - Eloy - 28.02.2017

try

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




Re: Name Overlap (Label) - Sew_Sumi - 28.02.2017

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


Re: Respuesta: Name Overlap (Label) - xRaffaelex - 28.02.2017

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

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

try!


Re: Respuesta: Name Overlap (Label) - xRaffaelex - 01.03.2017

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...


Re: Name Overlap (Label) - xRaffaelex - 01.03.2017

UP.
Please.


Re: Name Overlap (Label) - SyS - 01.03.2017

Please give some details about your problem other than bumping.


Re: Name Overlap (Label) - xRaffaelex - 01.03.2017

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.