01.06.2012, 01:43
(
Последний раз редактировалось leonardo1434; 01.06.2012 в 02:29.
)
pawn Код:
new Pontos[MAX_PLAYERS],
Text:PontosTextDraw[MAX_PLAYERS]
;
//OnPlayerConnect
for(new i = 0; i< MAX_PLAYERS ; i++) // loops.. assim pra nгo precisar usar timer...
{
PontosTextDraw[i]= TextDrawCreate(315.0,390.0, "Pontos:0");
TextDrawLetterSize(PontosTextDraw[i],0.4,1.2);
TextDrawFont(PontosTextDraw[i],1);
TextDrawColor(PontosTextDraw[i], 0x00FFFFAA);
TextDrawBackgroundColor(PontosTextDraw[i],0x000000AA);
TextDrawSetOutline(PontosTextDraw[i], 1);
TextDrawAlignment(PontosTextDraw[i], 2);
TextDrawShowForPlayer(playerid, PontosTextDraw[i]);
}
//OnPlayerSpawn
TextDrawShowForPlayer(playerid, PontosTextDraw[playerid]);
public OnPlayerDeath(playerid, killerid, reason)
{
// invalid id desnecessбrio...
Pontos[killerid] ++; // nгo iria funcionar... +=, pois nгo existe isso na math... nem no samp
Pontos[playerid] --;// nгo iria funcionar... -=, pois nгo existe isso na math... nem no samp
new string[50];
format(string,sizeof(string),"Pontos:%s",Pontos[killerid]);
TextDrawSetString(PontosTextDraw[killerid], string);
return 1;
}