26.03.2017, 22:10
okay so basicly what i was doing is trying to show all players name that are in table to a textdraw but it seems to be mixed up or it shows only one name anyway heres my code
RoleName
Код:
for(new i, j=GetPlayerPoolSize(); i<=j; i++)
{
if(GetPVarInt(i,"ontable") == GetPVarInt(playerid,"ontable"))
{
new string[50];
format(string,sizeof(string),"%s",RoleName(i));
TextDrawSetString(Textdraw0[i],string);
TextDrawShowForPlayer(i,Textdraw0[i]);
}
}
Код:
stock RoleName(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;
}

