Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- new Text:Score[MAX_PLAYERS];
- forward Scores();
- public OnFilterScriptInit()
- {
- SetTimer("Scores", 1000, true);
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- Score[i] = TextDrawCreate(50.000000, 322.000000, " ");
- TextDrawBackgroundColor(Score[i], 255);
- TextDrawFont(Score[i], 1);
- TextDrawLetterSize(Score[i], 0.549999, 1.300000);
- TextDrawColor(Score[i], -16776961);
- TextDrawSetOutline(Score[i], 0);
- TextDrawSetProportional(Score[i], 1);
- TextDrawSetShadow(Score[i], 1);
- }
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- TextDrawShowForPlayer(playerid, Score[playerid]);
- return 1;
- }
- public Scores()
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- new string[48];
- format(string, sizeof(string), "Score: %d", GetPlayerScore(i));
- TextDrawSetString(Score[i], string);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment