Textdraw Player Names -
ThatFag - 18.08.2016
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);
}
Re: Textdraw Player Names -
Loinal - 18.08.2016
PHP код:
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",RPName(i));
TextDrawSetString(tds, lotString);
TextDrawShowAll(tds);
}
Try that
Re: Textdraw Player Names -
ThatFag - 18.08.2016
i have but still doesnt work
Re: Textdraw Player Names -
Sew_Sumi - 18.08.2016
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.
Re: Textdraw Player Names - WhiteGhost - 18.08.2016
Lets see this. RPName
Re: Textdraw Player Names -
ThatFag - 18.08.2016
Код:
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;
}
Re: Textdraw Player Names -
Sew_Sumi - 18.08.2016
What's it under, a callback or a function hooked to a timer?