18.01.2015, 00:31
Barra Informacional
Uma barra que mostra quantos vocк matou, quantas vezes morreu, o score e o nъmero de players online.
Observaзхes
Nгo foi testado, fiz rapidamente pois estava sem nada pra fazer e o sistema de salvamento й por conta do usuбrio.
Imagem
Download
Se alguйm for testar, o que eu duvido, e encontrar algum erro me avise que tento corrigir.
Uma barra que mostra quantos vocк matou, quantas vezes morreu, o score e o nъmero de players online.
Observaзхes
Nгo foi testado, fiz rapidamente pois estava sem nada pra fazer e o sistema de salvamento й por conta do usuбrio.
Imagem
Download
pawn Код:
#include <a_samp>
new Text:Textdraw0;
new Text:Textdraw1;
new Text:Textdraw2;
new Text:Textdraw3[MAX_PLAYERS];
new Text:Textdraw6[MAX_PLAYERS];
new Text:Textdraw8[MAX_PLAYERS];
new PlayersOnline;
new Matou[MAX_PLAYERS];
new Morreu[MAX_PLAYERS];
public OnFilterScriptInit()
{
print("-----------------------------------");
print("------ Barra Informacional -------");
print("---- Feita por Jumper(Totola) -----");
print("-----------------------------------");
PlayersOnline = 0;
Textdraw0 = TextDrawCreate(660.000000, 436.000000, "box");
TextDrawBackgroundColor(Textdraw0, 255);
TextDrawFont(Textdraw0, 2);
TextDrawLetterSize(Textdraw0, 0.290000, 1.000000);
TextDrawColor(Textdraw0, -1);
TextDrawSetOutline(Textdraw0, 1);
TextDrawSetProportional(Textdraw0, 1);
TextDrawUseBox(Textdraw0, 1);
TextDrawBoxColor(Textdraw0, 128);
TextDrawTextSize(Textdraw0, 0.000000, 0.000000);
Textdraw1 = TextDrawCreate(465.000000, 435.000000, "0/100"); //playersonline
TextDrawAlignment(Textdraw1, 2);
TextDrawBackgroundColor(Textdraw1, 255);
TextDrawFont(Textdraw1, 1);
TextDrawLetterSize(Textdraw1, 0.300000, 1.100000);
TextDrawColor(Textdraw1, -1);
TextDrawSetOutline(Textdraw1, 1);
TextDrawSetProportional(Textdraw1, 1);
Textdraw2 = TextDrawCreate(7.000000, 435.000000, "matou: morreu: score: players online:");
TextDrawBackgroundColor(Textdraw2, 255);
TextDrawFont(Textdraw2, 2);
TextDrawLetterSize(Textdraw2, 0.400000, 1.000000);
TextDrawColor(Textdraw2, 478605055);
TextDrawSetOutline(Textdraw2, 1);
TextDrawSetProportional(Textdraw2, 1);
return 1;
}
public OnFilterScriptExit()
{
TextDrawHideForAll(Textdraw0);
TextDrawDestroy(Textdraw0);
TextDrawHideForAll(Textdraw1);
TextDrawDestroy(Textdraw1);
TextDrawHideForAll(Textdraw2);
TextDrawDestroy(Textdraw2);
return 1;
}
public OnPlayerConnect(playerid)
{
PlayersOnline ++;
new Str[10];
format(Str,sizeof(Str),"%d/100", PlayersOnline);
TextDrawSetString(Textdraw1, Str);
Textdraw3[playerid] = TextDrawCreate(84.000000, 435.000000, "0"); // matou
TextDrawAlignment(Textdraw3[playerid], 2);
TextDrawBackgroundColor(Textdraw3[playerid], 255);
TextDrawFont(Textdraw3[playerid], 1);
TextDrawLetterSize(Textdraw3[playerid], 0.300000, 1.100000);
TextDrawColor(Textdraw3[playerid], -1);
TextDrawSetOutline(Textdraw3[playerid], 1);
TextDrawSetProportional(Textdraw3[playerid], 1);
Textdraw6[playerid] = TextDrawCreate(188.000000, 435.000000, "0"); // morreu
TextDrawAlignment(Textdraw6[playerid], 2);
TextDrawBackgroundColor(Textdraw6[playerid], 255);
TextDrawFont(Textdraw6[playerid], 1);
TextDrawLetterSize(Textdraw6[playerid], 0.300000, 1.100000);
TextDrawColor(Textdraw6[playerid], -1);
TextDrawSetOutline(Textdraw6[playerid], 1);
TextDrawSetProportional(Textdraw6[playerid], 1);
Textdraw8[playerid] = TextDrawCreate(279.000000, 435.000000, "0"); // score
TextDrawAlignment(Textdraw8[playerid], 2);
TextDrawBackgroundColor(Textdraw8[playerid], 255);
TextDrawFont(Textdraw8[playerid], 1);
TextDrawLetterSize(Textdraw8[playerid], 0.300000, 1.100000);
TextDrawColor(Textdraw8[playerid], -1);
TextDrawSetOutline(Textdraw8[playerid], 1);
TextDrawSetProportional(Textdraw8[playerid], 1);
Matou[playerid] = 0; // SISTEMA DE SALVAMENTO FICA POR CONTA DO USUБRIO DO FS !!!!!!!!
Morreu[playerid] = 0; // SISTEMA DE SALVAMENTO FICA POR CONTA DO USUБRIO DO FS!!!!!!!!
TextDrawShowForPlayer(playerid, Textdraw0);
TextDrawShowForPlayer(playerid, Textdraw1);
TextDrawShowForPlayer(playerid, Textdraw2);
TextDrawShowForPlayer(playerid, Textdraw3[playerid]);
TextDrawShowForPlayer(playerid, Textdraw6[playerid]);
TextDrawShowForPlayer(playerid, Textdraw8[playerid]);
return 1;
}
public OnPlayerSpawn(playerid)
{
new Str[10];
format(Str,sizeof(Str),"%d", GetPlayerScore(playerid));
TextDrawSetString(Textdraw8[playerid], Str);
new Strr[10];
format(Strr,sizeof(Strr),"%d", Morreu[playerid]);
TextDrawSetString(Textdraw3[playerid], Strr);
new Strrr[10];
format(Strrr,sizeof(Strrr),"%d", Morreu[playerid]);
TextDrawSetString(Textdraw6[playerid], Strrr);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
PlayersOnline --;
new Str[10];
format(Str,sizeof(Str),"%d/100", PlayersOnline);
TextDrawSetString(Textdraw1, Str);
TextDrawDestroy(Textdraw3[playerid]);
TextDrawDestroy(Textdraw6[playerid]);
TextDrawDestroy(Textdraw8[playerid]);
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
Matou[killerid] ++;
Morreu[playerid] ++;
new Strr[10];
format(Strr,sizeof(Strr),"%d", Matou[killerid]);
TextDrawSetString(Textdraw3[killerid], Strr);
new Strrr[10];
format(Strrr,sizeof(Strrr),"%d", Morreu[playerid]);
TextDrawSetString(Textdraw6[playerid], Strrr);
return 1;
}