
new Text3D:TEXT1[MAX_PLAYERS];
new Zstring[128];
public OnPlayerSpawn(playerid)
{
format(Zstring, sizeof(Zstring), "Matou %d || Morreu %d", pInfo[i][matou],pInfo[i][morreu]);
TEXT1[playerid] = Create3DTextLabel(Zstring,0x00FF00FF,0.0,0.0,5,10.0,0,0);
Attach3DTextLabelToPlayer(TEXT1[playerid], playerid, 0.0, 0.0, 0.42);
return 1;
}
[IMG]http://i1081.photobucket.com/albums/j350/marcos997gt/sa-mp-006.png[/IMG]
forward TextStats();
public TextStats()
{
for(new i; i < MAX_PLAYERS; ++i)
{
format(Zstring, sizeof(Zstring), "Matou %d || Morreu %d", pInfo[playerid][matou],pInfo[playerid][morreu]);
Update3DTextLabelText(TEXT1[i], 0x00FF00FF, Zstring);
}
return 1;
}
forward TextStats();
public TextStats()
{
for(new i; i < MAX_PLAYERS; ++i)
{
format(Zstring, sizeof(Zstring), "Matou %d || Morreu %d", pInfo[i][matou],pInfo[i][morreu]);
Update3DTextLabelText(TEXT1[i], 0x00FF00FF, Zstring);
}
return 1;
}
|
Nгo sei se isto resolverб, porйm vocк pode comeзar corrigindo a callback.
pawn Код:
|
ja editei
|
se nгo por sу pega pro id 0 '-'
#edit LOOL agora que eu reparei que tem uns player ids ja editei |
|
Se for para aparecer em todos os players do server deleta ela pra criaзao de outra! |
static
striger[60]
;
new
Text3D:TEXT1[MAX_PLAYERS] = {Text3D:-1, ...}
;
//Use um timer para atualizar essa callback!
forward TextStats();
public TextStats() {
for(new i = 0, y = GetMaxPlayers(); i != y; i++) {
format(striger, sizeof(striger), "Matou %d || Morreu %d", pInfo[i][matou], pInfo[i][morreu]);
if(TEXT1[i] != (Text3D:-1)) Delete3DTextLabel(TEXT1[i]);
TEXT1[i] = Create3DTextLabel(striger, 0x00FF00FF, 0.0, 0.0, 5, 10.0, 0, 0);
Attach3DTextLabelToPlayer(TEXT1[i], i, 0.0, 0.0, 0.42);
Update3DTextLabelText(TEXT1[i], 0x00FF00FF, striger);
}
return 1;
}
|
Vocк usa 'playerid' nesta callback sendo que o mesmo nгo estб declarado.
Й como eu fazer stock oi(i) { return SendClientMessage(playerid, -1, "oi"); } |
ja arrumei + mesmo com "i" ainda continua igual :S