[ ] Textdraws
#1

Hi, i'm using font "2" in my textdraws, but the problem is when one player has "[ or ]" in his name, and it show as stars, i don't want change the font, їany solution?
Reply
#2

use ( Small brackets ) in font 2 they look like [ Square Brackets ]
Reply
#3

Thanks gurmani, but i'm showing player name's in the textdraw, how can i change their names?
Reply
#4

Explain more BazeN
Reply
#5

Never tried/tested it i hope it works
PHP код:

// format(str, sizeof(str),"Welcome %s", TDName(playerid)); // thats how you will use it
stock TDName(playerid)
{
    new 
Name[128];
    
GetPlayerName(playeridNamesizeof(Name));
    new 
string[64];
    
format(string64"%s (%d)"Nameplayerid);
    new    
pos 0;
    while ((
pos strfind(string"[", .pos pos)) != -1// we will find any matches with [
    
{
        
strdel(stringpospos); // now its time to delete it [ << this one
        
strins(string"("possizeof(string)); // Lets put our desired bracket instead of that because [ opening bracket is the one show The stars not the ] closing bracket
    
}
    return 
string// Return the edited string and voila

Reply
#6

Quote:
Originally Posted by gurmani11
Посмотреть сообщение
Never tried/tested it i hope it works
PHP код:

// format(str, sizeof(str),"Welcome %s", TDName(playerid)); // thats how you will use it
stock TDName(playerid)
{
    new 
Name[128];
    
GetPlayerName(playeridNamesizeof(Name));
    new 
string[64];
    
format(string64"%s (%d)"Nameplayerid);
    new    
pos 0;
    while ((
pos strfind(string"[", .pos pos)) != -1// we will find any matches with [
    
{
        
strdel(stringpospos); // now its time to delete it [ << this one
        
strins(string"("possizeof(string)); // Lets put our desired bracket instead of that because [ opening bracket is the one show The stars not the ] closing bracket
    
}
    return 
string// Return the edited string and voila

Thanks!, but not works :/ textdraw not displayed
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)