garfield

[FS]: Textdraw de pontos..

Jan 20th, 2012
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.99 KB | None | 0 0
  1.  
  2. #include <a_samp>
  3.  
  4. new Text:Scores[MAX_PLAYERS];
  5.  
  6. public OnFilterScriptInit()
  7. {
  8.     for(new i; i != MAX_PLAYERS; ++i)
  9.     {
  10.         Scores[i] = TextDrawCreate(50.000000, 319.000000, "PONTOS: 999");
  11.         TextDrawBackgroundColor(Scores[i], 255);
  12.         TextDrawFont(Scores[i], 2);
  13.         TextDrawLetterSize(Scores[i], 0.280000, 1.000000);
  14.         TextDrawColor(Scores[i], -1);
  15.         TextDrawSetOutline(Scores[i], 1);
  16.         TextDrawSetProportional(Scores[i], 1);
  17.     }
  18.     return 1;
  19. }
  20.  
  21. public OnFilterScriptExit()
  22. {
  23.     for(new i; i != MAX_PLAYERS; ++i) TextDrawHideForAll(Scores[i]), TextDrawDestroy(Scores[i]);
  24.     return 1;
  25. }
  26.  
  27.  
  28. public OnPlayerSpawn(playerid)
  29. {
  30.     TextDrawShowForPlayer(playerid, Scores[playerid]);
  31.     return 1;
  32. }
  33.  
  34. public OnPlayerDeath(playerid, killerid, reason)
  35. {
  36.     SetPlayerScore(playerid, GetPlayerScore(killerid)+ 1);
  37.     new str[100];
  38.     format(str, sizeof(str),"PONTOS: %d", GetPlayerScore(killerid));
  39.     TextDrawSetString(Scores[killerid], str);
  40.     TextDrawShowForPlayer(killerid, Scores[killerid]);
  41.     return 1;
  42. }
Advertisement
Add Comment
Please, Sign In to add comment