Textdraw Player Names
#1

Hey guys
i have created a textdraw which is meant to set up the players name on it
it only sets up the first player name
example
Eastony Hernandes
and not others
which is meant to be like
Eastony Hernandes
Hernandes Estony and so on

here is the code

Код:
for(new i; i < MAX_PLAYERS; i++)
        {
            if(!IsPlayerConnected(i)) continue;
            if(!IsPlayerInRangeOfPoint(i, 20.0, rPos[0], rPos[1], rPos[2])) continue;
            if(rCount == 2) player2 = i;
				new lotString[300];
				format(lotString, sizeof(lotString), "~y~Robbers:~n~~w~%s~n~%s",RPName(i));
        TextDrawSetString(tds, lotString);
        TextDrawShowForPlayer(i,tds);
        }
Reply
#2

PHP код:
for(new iMAX_PLAYERSi++)
        {
            if(!
IsPlayerConnected(i)) continue;
            if(!
IsPlayerInRangeOfPoint(i20.0rPos[0], rPos[1], rPos[2])) continue;
            if(
rCount == 2player2 i;
                new 
lotString[300];
                
format(lotStringsizeof(lotString), "~y~Robbers:~n~~w~%s",RPName(i));
        
TextDrawSetString(tdslotString);
        
TextDrawShowAll(tds);
        } 
Try that
Reply
#3

i have but still doesnt work
Reply
#4

Quote:
Originally Posted by Loinal
Посмотреть сообщение
Try that
What you did, did nothing... Stop guessing and throwing up random code in vain attempts to "help".



OP: What is it you are anticipating in this scenario?

Just looking at your code, you've got a string, defined at 300, when not even 120 would even do. Even lower than that, more like 70, or even 60 might do.

That won't be the cause of this, but as usual, just noting a slight excess, and mentioning.

What is this segment of code hooked into? Timer or a callback?

I think you should bring up a bit more code in here.
Reply
#5

Lets see this. RPName
Reply
#6

Код:
stock RPName(playerid)
{
    new string[24];
    GetPlayerName(playerid,string,24);
    new str[24];
    strmid(str,string,0,strlen(string),24);
    for(new i = 0; i < MAX_PLAYER_NAME; i++)
    {
        if (str[i] == '_') str[i] = ' ';
    }
    return str;
}
Reply
#7

What's it under, a callback or a function hooked to a timer?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)