format(string3, sizeof(string3), " ~b~~h~~h~ID ~w~%d ~b~~h~~h~Level ~w~%d ~b~~h~~h~Nick ~w~%s",playerid , dini_Int(file, "Level"), aname);
TextDrawSetString(gText3[playerid], string3);
TextDrawShowForPlayer(playerid, gText3[playerid]);
Level_Update()
{
for(new i; i < MAX_PLAYERS; i++)
{
new string3[128];
format(string3, sizeof(string3), " ~b~~h~~h~ID ~w~%d ~b~~h~~h~Level ~w~%d ~b~~h~~h~Nick ~w~%s", i, dini_Int(file, "Level"), aname);
TextDrawSetString(gText3[i], string3);
}
}
public OnPlayerUpdate(playerid) {
format(string3, sizeof(string3), " ~b~~h~~h~ID ~w~%d ~b~~h~~h~Level ~w~%d ~b~~h~~h~Nick ~w~%s",playerid , dini_Int(file, "Level"), aname);
TextDrawSetString(gText3[playerid], string3);
TextDrawShowForPlayer(playerid, gText3[playerid]);
return true;
}
public OnPlayerUpdate(playerid) { new string3[80],nickplayer[MAX_PLAYER_NAME]; /*eu nгo criei a variavel file por que acho que no seu GM essa variavel e global Caso aparece que file nгo existe vocк coloca new file[aqui coloca o tamanho da sua string]; */ GetPlayerName(playerid,sizeof(nickplayer),nickplay er); format(file,sizeof(file),PASTA_CONTAS,nickplayer); format(string3, sizeof(string3), " ~b~~h~~h~ID ~w~%d ~b~~h~~h~Level ~w~%d ~b~~h~~h~Nick ~w~%s",playerid , dini_Int(file, "Level"), nickplayer); TextDrawSetString(gText3[playerid], string3); TextDrawShowForPlayer(playerid, gText3[playerid]); return 1; } |
forward AtualizarTextD();//Topo do GM SetTimer("AtualizarTextD",1000,true);// Em OnGameModeInit public AtualizarTextD()//Em qualquer lugar abaixo da farward { new string3[80],nickplayer[MAX_PLAYER_NAME]; for(new i; i < MAX_PLAYERS,i++) { if(IsPlayerConnected(i)) { GetPlayerName(i,sizeof(nickplayer),nickplayer); format(file,sizeof(file),PASTA_CONTAS,nickplayer); format(string3, sizeof(string3), " ~b~~h~~h~ID ~w~%d ~b~~h~~h~Level ~w~%d ~b~~h~~h~Nick ~w~%s", i, dini_Int(file, "Level"), nickplayer); TextDrawSetString(gText3[i], string3); TextDrawShowForPlayer(i, gText3[playerid]); } } return 1; } |
format(string3, sizeof(string3), " ~b~~h~~h~ID ~w~%d ~b~~h~~h~Level ~w~%d ~b~~h~~h~Nick ~w~%s", playerid, dini_Int(file, "Level"), nickplayer); TextDrawSetString(gText3[playerid], string3); |