new Text:Stats[MAX_PLAYERS];
new Estadisticas[MAX_PLAYERS];
Estadisticas[playerid] = SetTimerEx("Actualizar",400,1,"e",playerid);
for(new playerid; playerid < MAX_PLAYERS; playerid++) {
Stats[playerid] = TextDrawCreate(.........................
}
forward Actualizar(playerid);
public Actualizar(playerid)
{
new strr[128];
TextDrawHideForPlayer(playerid,Stats[playerid]);
format(strr, sizeof(strr), " ~r~Score: ~w~%d ~g~Kills: ~w~%d ~b~Deaths: ~w~%d",PlayerInfo[playerid][Score],PlayerInfo[playerid][Kills],PlayerInfo[playerid][Deaths]);
TextDrawSetString(Stats[playerid],strr);
TextDrawShowForPlayer(playerid,Stats[playerid]);
return 1;
}
forward Actualizar(playerid);
public Actualizar(playerid)
{
new strr[128];
format(strr, sizeof(strr), " ~r~Score: ~w~%d ~g~Kills: ~w~%d ~b~Deaths: ~w~%d",PlayerInfo[playerid][Score],PlayerInfo[playerid][Kills],PlayerInfo[playerid][Deaths]);
TextDrawSetString(Stats[playerid],strr);
return 1;
}
Si pero, quiero que por ejemplo al matar a uno se actualize Kills, que no tenga que morir xD
|
public OnPlayerDeath(playerid, killerid, reason)
{
PlayerInfo[killerid][Kills] ++;
return 1;
}
[pawn]public OnPlayerDeath(playerid, killerid, reason)
{ PlayerInfo[killerid][Kills] ++; return 1; }[pawn] |