Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Money Info (Infomação quando há alteração no dinheiro do jogador)
- Esse Filterscript contém códigos de:
- Vit0r, Dragonsaurus (msc.inc)
- (Favor não remover os créditos)
- */
- #include <a_samp>
- #include <msc>
- #define ABAIXO_DO_HUD
- new Text:money_info[MAX_PLAYERS];
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print("[fs] bf_money.amx carregado");
- print("--------------------------------------\n");
- for (new playerid; playerid < MAX_PLAYERS; playerid++)
- {
- #if defined ABAIXO_DO_HUD
- money_info[playerid] = TextDrawCreate(498.000000, 103.000000, "");
- TextDrawBackgroundColor(money_info[playerid], 255);
- TextDrawFont(money_info[playerid], 3);
- TextDrawLetterSize(money_info[playerid], 0.409999, 1.699998);
- TextDrawColor(money_info[playerid], -1);
- TextDrawSetOutline(money_info[playerid], 1);
- TextDrawSetProportional(money_info[playerid], 1);
- TextDrawUseBox(money_info[playerid], 1);
- TextDrawBoxColor(money_info[playerid], -11324638);
- TextDrawTextSize(money_info[playerid], 606.000000, 0.000000);
- #endif
- #if defined ACIMA_DO_HUD
- money_info[playerid] = TextDrawCreate(498.000000, 4.000000, "");
- TextDrawBackgroundColor(money_info[playerid], 255);
- TextDrawFont(money_info[playerid], 3);
- TextDrawLetterSize(money_info[playerid], 0.409999, 1.699998);
- TextDrawColor(money_info[playerid], -1);
- TextDrawSetOutline(money_info[playerid], 1);
- TextDrawSetProportional(money_info[playerid], 1);
- TextDrawUseBox(money_info[playerid], 1);
- TextDrawBoxColor(money_info[playerid], -11324638);
- TextDrawTextSize(money_info[playerid], 606.000000, 0.000000);
- #endif
- }
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- TextDrawShowForPlayer(playerid, money_info[playerid]);
- return 1;
- }
- public OnPlayerMoneyStateChange(playerid, newmoney, oldmoney, bool:scripted)
- {
- #define time 3000
- new ganho = newmoney - oldmoney, string[128];
- if(ganho > 0) format(string, sizeof(string), "~g~+ $%d", ganho);
- if(ganho < 0) format(string, sizeof(string), "~r~$%d", ganho);
- TextDrawSetString(money_info[playerid], string), SetTimerEx("hide_txt", time, false, "d", playerid);
- return 1;
- }
- forward hide_txt(playerid);
- public hide_txt(playerid)
- {
- TextDrawSetString(money_info[playerid], "");
- }
Add Comment
Please, Sign In to add comment