[FilterScript] Mostra a vida em nъmero
#1

Olб galera do fуrum sa-mp, vim trazer um FS, simples mas ъtil para server de dm

Nova versгo 2.0

Print:




Config:
Код:
#define COR_TEXTDRAW00 0xE6E6FAFF   //aqui vocк vai colocar a cor do textdraw em hexadecimal.
#define COR_TEXTDRAW01 0xE6E6FAFF //aqui vocк vai colocar a cor do textdraw em hexadecimal.
Cуdigo:
Код:
//=========================== [ Includes ] =====================================
#include <a_samp>

#define COR_TEXTDRAW00 0xE6E6FAFF   //aqui vocк vai colocar a cor do textdraw em hexadecimal.
#define COR_TEXTDRAW01 0xE6E6FAFF //aqui vocк vai colocar a cor do textdraw em hexadecimal.

//========================== [ News ] ==========================================
new PlayerText:vida[MAX_PLAYERS];
new PlayerText:colete[MAX_PLAYERS];
new Total[6];
new Total2[6];


public OnFilterScriptInit()
{
print("FilterScript de mostra vida/colete em nъmeros feito por Marllun");
return 1;
}


public OnPlayerConnect(playerid)
{
vida[playerid] = CreatePlayerTextDraw(playerid,562.000000, 67.000000, " ");
PlayerTextDrawBackgroundColor(playerid,vida[playerid], 255);
PlayerTextDrawFont(playerid,vida[playerid], 1);
PlayerTextDrawLetterSize(playerid,vida[playerid], 0.290000, 0.899999);
PlayerTextDrawColor(playerid,vida[playerid], COR_TEXTDRAW00);
PlayerTextDrawSetOutline(playerid,vida[playerid], 0);
PlayerTextDrawSetProportional(playerid,vida[playerid], 1);
PlayerTextDrawSetShadow(playerid,vida[playerid], 1);
PlayerTextDrawSetString(playerid,vida[playerid],Total);

colete[playerid] = CreatePlayerTextDraw(playerid,562.000000, 44.000000, " ");
PlayerTextDrawBackgroundColor(playerid,colete[playerid], 255);
PlayerTextDrawFont(playerid,colete[playerid], 1);
PlayerTextDrawLetterSize(playerid,colete[playerid], 0.290000, 0.899999);
PlayerTextDrawColor(playerid,colete[playerid], COR_TEXTDRAW01);
PlayerTextDrawSetOutline(playerid,colete[playerid], 0);
PlayerTextDrawSetProportional(playerid,colete[playerid], 1);
PlayerTextDrawSetShadow(playerid,colete[playerid], 1);
PlayerTextDrawSetString(playerid,colete[playerid],Total2);
return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
PlayerTextDrawHide(playerid,vida[playerid]);
PlayerTextDrawHide(playerid,colete[playerid]);
return 1;
}

public OnPlayerSpawn(playerid)
{
PlayerTextDrawShow(playerid,vida[playerid]);
PlayerTextDrawShow(playerid,colete[playerid]);
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
PlayerTextDrawHide(playerid,vida[playerid]);
PlayerTextDrawHide(playerid,colete[playerid]);
return 1;
}

public OnPlayerUpdate(playerid)
{
new Float:vida2;
new Float:colete2;
for(new i; i < MAX_PLAYERS; i++)
{
GetPlayerArmour(i,colete2);
if(colete2 < 1) PlayerTextDrawHide(playerid,colete[playerid]);
if(colete2 > 0) PlayerTextDrawShow(playerid,colete[playerid]);
GetPlayerHealth(i,vida2);
format(Total, sizeof(Total), "%0.1f",vida2);
GetPlayerArmour(i,colete2);
format(Total2, sizeof(Total2), "%0.1f",colete2);
//Textdrawstrings
PlayerTextDrawSetString(i,vida[i],Total);
PlayerTextDrawSetString(i,colete[i],Total2);
return 1;
}
return 1;
}
Aceito sugestхes para melhorar o script.

download
caso queira outro lugar para pegar o cуdigo:

pastebin:http://pastebin.com/rvHjq8Cs

mediafire:http://www.mediafire.com/file/c60emy...a+e+colete.rar
Reply


Messages In This Thread
Mostra a vida/colete em nъmero 2.0 - by Marllun - 02.12.2016, 21:06
Re: Mostra a vida em nъmero - by HeisenGiromB - 02.12.2016, 21:23
Re: Mostra a vida em nъmero - by Marllun - 02.12.2016, 21:26
Re: Mostra a vida em nъmero - by HeisenGiromB - 02.12.2016, 21:36
Re: Mostra a vida em nъmero - by Marllun - 02.12.2016, 23:53
Re: Mostra a vida em nъmero - by MBJ - 03.12.2016, 01:44
Re: Mostra a vida em nъmero - by Marllun - 03.12.2016, 16:35
Respuesta: Mostra a vida em nъmero - by NobiZinhoBR - 03.12.2016, 18:53
Re: Mostra a vida em nъmero - by Marllun - 03.12.2016, 19:23
Re: Mostra a vida em nъmero - by Rhayziin - 03.12.2016, 19:56

Forum Jump:


Users browsing this thread: 1 Guest(s)