Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <msc>
- #define ABAIXO_DO_HUD
- new Text:money_info[MAX_PLAYERS];
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print("[fs] parice");
- print("--------------------------------------\n");
- for (new playerid; playerid < MAX_PLAYERS; playerid++)
- {
- #if defined ABAIXO_DO_HUD
- money_info[playerid] = TextDrawCreate(372.942626, 81.666694, "");
- 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);
- TextDrawTextSize(money_info[playerid], 606.000000, 0.000000);
- #endif
- #if defined ACIMA_DO_HUD
- money_info[playerid] = TextDrawCreate(372.942626, 81.666694, "");
- 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);
- 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 1000
- 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], "");
- }
Advertisement
Add Comment
Please, Sign In to add comment