Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- new Text:Scores[MAX_PLAYERS];
- public OnFilterScriptInit()
- {
- for(new i; i != MAX_PLAYERS; ++i)
- {
- Scores[i] = TextDrawCreate(50.000000, 319.000000, "PONTOS: 999");
- TextDrawBackgroundColor(Scores[i], 255);
- TextDrawFont(Scores[i], 2);
- TextDrawLetterSize(Scores[i], 0.280000, 1.000000);
- TextDrawColor(Scores[i], -1);
- TextDrawSetOutline(Scores[i], 1);
- TextDrawSetProportional(Scores[i], 1);
- }
- return 1;
- }
- public OnFilterScriptExit()
- {
- for(new i; i != MAX_PLAYERS; ++i) TextDrawHideForAll(Scores[i]), TextDrawDestroy(Scores[i]);
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- TextDrawShowForPlayer(playerid, Scores[playerid]);
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- SetPlayerScore(playerid, GetPlayerScore(killerid)+ 1);
- new str[100];
- format(str, sizeof(str),"PONTOS: %d", GetPlayerScore(killerid));
- TextDrawSetString(Scores[killerid], str);
- TextDrawShowForPlayer(killerid, Scores[killerid]);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment