Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //==============================================================================
- // ,---. ,--. ,--.
- // / O \ | |,-. ,--,--,--. ,--,--.| |
- // | .-. || / | |' ,-. || |
- // | | | || \ \ | | | |\ '-' || |
- // `--' `--'`--'`--'`--`--`--' `--`--'`--'
- //==============================================================================
- // ,------. ,--. ,--. ,--.
- // | .--. '`--',-' '-.| ,---.
- // | '--'.',--.'-. .-'| .-. |
- // | |\ \ | | | | | | | |
- // `--' '--'`--' `--' `--' `--'
- //==============================================================================
- #include <a_samp>
- public OnFilterScriptInit()
- {
- print("\n ------------------------------------------------- ");
- print(" - Stats TextDraw System by [A]kmal & [H]arith - ");
- print(" ------------------------------------------------- \n");
- return 1;
- }
- new PlayerText:remix[MAX_PLAYERS];
- new pKills[MAX_PLAYERS], pDeaths[MAX_PLAYERS];
- public OnFilterScriptExit()
- {
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- SendClientMessage(playerid, -1, "{00FFFF}Info: Stats TextDraw System by [A]kmal & [H]arith");
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- //=======================================================================
- remix[playerid] = CreatePlayerTextDraw(playerid, 120.0, 415.0, "Score: - ~>~ Money: $- ~>~ Kill: - ~>~ Death: - ~>~ Skin: -");
- PlayerTextDrawColor(playerid, remix[playerid], 0xFFFFFFFF);
- PlayerTextDrawSetShadow(playerid, remix[playerid], 1);
- PlayerTextDrawSetOutline(playerid, remix[playerid], 1);
- PlayerTextDrawLetterSize(playerid, remix[playerid], 0.19, 0.89);
- PlayerTextDrawBackgroundColor(playerid, remix[playerid], 0x000000FF);
- PlayerTextDrawFont(playerid, remix[playerid], 2);
- PlayerTextDrawAlignment(playerid, remix[playerid], 0);
- PlayerTextDrawSetProportional(playerid, remix[playerid], 1);
- PlayerTextDrawShow(playerid, remix[playerid]);
- //=======================================================================
- SetTimerEx("IsPlayerStats", 2000, true, "i", playerid);
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- pDeaths[playerid]++;
- pKills[killerid]++;
- return 1;
- }
- forward IsPlayerStats(playerid);
- public IsPlayerStats(playerid)
- {
- //=======================================================================
- new string[MAX_PLAYERS];
- PlayerTextDrawHide(playerid, remix[playerid]);
- PlayerTextDrawShow(playerid, remix[playerid]);
- format(string, sizeof(string), "Score: %d ~>~ Money: $%d ~>~ Kill: %d ~>~ Death: %d ~>~ Skin: %d", GetPlayerScore(playerid), GetPlayerMoney(playerid), pKills[playerid], pDeaths[playerid], GetPlayerSkin(playerid));
- PlayerTextDrawSetString(playerid, remix[playerid], string);
- //=======================================================================
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement