Advertisement
Guest User

Untitled

a guest
May 26th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None | 0 0
  1. #include <a_samp>
  2. new Text:AlivePeople;
  3. new Alives;
  4. new WasKilled[MAX_PLAYERS];
  5.  
  6. public OnFilterScriptInit()
  7. {
  8. AlivePeople = TextDrawCreate(430, 350.0, "People Alive:");
  9. TextDrawTextSize(AlivePeople,629.000000,2.000000);
  10. TextDrawAlignment(AlivePeople,0);
  11. TextDrawFont(AlivePeople,1);
  12. TextDrawLetterSize(AlivePeople,0.75,2.1);
  13. TextDrawColor(AlivePeople,0x0000FFFF);
  14. TextDrawSetOutline(AlivePeople,1);
  15. TextDrawSetProportional(AlivePeople,1);
  16. TextDrawSetShadow(AlivePeople,1);
  17. return 1;
  18. }
  19.  
  20. public OnPlayerConnect(playerid)
  21. {
  22. TextDrawShowForPlayer(playerid, AlivePeople);
  23. WasKilled[playerid]=0;
  24. return 1;
  25. }
  26.  
  27. public OnPlayerDisconnect(playerid, reason)
  28. {
  29. TextDrawHideForPlayer(playerid, AlivePeople);
  30. WasKilled[playerid]=0;
  31. return 1;
  32. }
  33.  
  34. public OnPlayerSpawn(playerid)
  35. {
  36. if(WasKilled[playerid]==0)
  37. {
  38. Alives++;
  39. new newtext[50];
  40. format(newtext, sizeof(newtext), "People Alive: %d", Alives);
  41. TextDrawSetString(AlivePeople, newtext);
  42. }
  43. else
  44. {
  45. return 1;// Hier dann noch das hin, was du hast, um den spawn zu blocken.
  46. }
  47. return 1;
  48. }
  49.  
  50. public OnPlayerDeath(playerid, killerid, reason)
  51. {
  52. WasKilled[playerid]=1;
  53. Alives--;
  54. new newtext[50];
  55. format(newtext, sizeof(newtext), "People Alive: %d", Alives);
  56. TextDrawSetString(AlivePeople, newtext);
  57. if(Alives==1)
  58. {
  59. // Hier dann deine Mission enden lassen.
  60. }
  61. return 1;
  62. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement