09.12.2011, 21:02
Hi, im trying to show a textdraw for each player, but i can't get it to show the correct value to the correct player... this is what i've done :
at the top :
Code:
new Text:TextDrawsd[MAX_PLAYERS];
and above :
Code:
public OnPlayerConnect(playerid) {
TextDrawsd[playerid] = TextDrawCreate(549.0,310.0," ");
TextDrawShowForPlayer(playerid,TextDrawsd[playerid]);
return 1;
}
public OnPlayerDisconnect(playerid, reason) {
TextDrawDestroy(TextDrawsd[playerid]);
return 1;
}
im updating the textdraw with :
Code:
TextDrawSetString(TextDrawsd[playerid], "Some text here");
But all the textdraw show to the same player and all others players don't see any textdraw. how can i fix this?
Thank you for your help
at the top :
Code:
new Text:TextDrawsd[MAX_PLAYERS];
and above :
Code:
public OnPlayerConnect(playerid) {
TextDrawsd[playerid] = TextDrawCreate(549.0,310.0," ");
TextDrawShowForPlayer(playerid,TextDrawsd[playerid]);
return 1;
}
public OnPlayerDisconnect(playerid, reason) {
TextDrawDestroy(TextDrawsd[playerid]);
return 1;
}
im updating the textdraw with :
Code:
TextDrawSetString(TextDrawsd[playerid], "Some text here");
But all the textdraw show to the same player and all others players don't see any textdraw. how can i fix this?
Thank you for your help