Advertisement
Guest User

Untitled

a guest
Sep 19th, 2010
666
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.97 KB | None | 0 0
  1. //////////////////////////////////////////////////
  2. /////////////XP Experience FS By Kitten///////////
  3. /////////////Easy To Edit////////////////////////
  4. /////////////////////////////////////////////////
  5.  
  6. #include <a_samp>
  7. #define COLOR_GREEN 0x20B2AAAA
  8. new Text:XP[MAX_PLAYERS];
  9.  
  10. public OnFilterScriptInit()
  11. {
  12. print("\n--------------------------------------");
  13. print(" XP Experience FS by kitten");
  14. print("--------------------------------------\n");
  15.  
  16.  
  17. for(new playerid = 0; playerid < MAX_PLAYERS; playerid++)
  18. {
  19. XP[playerid] = TextDrawCreate(545.000000, 23.000000, "XP: 0/50");
  20. TextDrawBackgroundColor(XP[playerid], 255);
  21. TextDrawFont(XP[playerid], 1);
  22. TextDrawLetterSize(XP[playerid], 0.400000, 1.700000);
  23. TextDrawColor(XP[playerid], -1);
  24. TextDrawSetOutline(XP[playerid], 0);
  25. TextDrawSetProportional(XP[playerid], 1);
  26. TextDrawSetShadow(XP[playerid], 1);
  27. }
  28.  
  29. return 1;
  30. }
  31.  
  32. public OnFilterScriptExit()
  33. {
  34. for(new playerid = 0; playerid < MAX_PLAYERS; playerid++)
  35. {
  36. TextDrawHideForAll(XP[playerid]);
  37. TextDrawDestroy(XP[playerid]);
  38. }
  39. return 1;
  40. }
  41. public OnPlayerSpawn(playerid)
  42. {
  43. TextDrawShowForPlayer(playerid,XP[playerid]);
  44. return 1;
  45. }
  46. public OnPlayerDeath(playerid, killerid, reason)
  47. {
  48.  
  49. new msg[64];
  50. new score = GetPlayerScore(killerid);
  51. SetPlayerScore(killerid, score+1);
  52. format(msg, sizeof(msg),"XP: %d/50",score+1);
  53. TextDrawSetString(XP[killerid],msg);
  54. GivePlayerMoney(killerid, 12000);
  55. GameTextForPlayer(killerid, "~p~1+ ~w~XP Experience! ~n~~g~+$12000!!",6000,4);
  56.  
  57. if(GetPlayerScore(killerid) == 10)
  58. {
  59. GivePlayerWeapon(killerid,31,1000);
  60. GameTextForPlayer(killerid,"~r~ XP AWARDS ~n~ ~w~ M4 Unlocked",6000,3);
  61. new name[MAX_PLAYER_NAME], string[100];
  62. GetPlayerName(playerid, name, sizeof(name));
  63. format(string, sizeof(string), "Player * %s Has Been XP Awared 10 Kills ** m4 unlocked for him", name);
  64. SendClientMessageToAll(COLOR_GREEN, string);
  65. }
  66. if(GetPlayerScore(killerid) == 20)
  67. {
  68. GivePlayerWeapon(killerid,30,1000);
  69. GameTextForPlayer(killerid,"~r~ XP AWARDS ~n~ ~w~ AK47 Unlocked",6000,3);
  70. new name[MAX_PLAYER_NAME], string[100];
  71. GetPlayerName(playerid, name, sizeof(name));
  72. format(string, sizeof(string), "Player * %s Has Been XP Awared 20 Kills ** ak47 unlocked for him", name);
  73. SendClientMessageToAll(COLOR_GREEN, string);
  74. }
  75. if(GetPlayerScore(killerid) == 30)
  76. {
  77. GivePlayerWeapon(killerid,27,1000);
  78. GameTextForPlayer(killerid,"~r~ XP AWARDS ~n~ ~w~ Combat Shotgun Unlocked",6000,3);
  79. new name[MAX_PLAYER_NAME], string[100];
  80. GetPlayerName(playerid, name, sizeof(name));
  81. format(string, sizeof(string), "Player * %s Has Been XP Awared 30 Kills ** Combat Shotgun unlocked for him", name);
  82. SendClientMessageToAll(COLOR_GREEN, string);
  83. }
  84. if(GetPlayerScore(killerid) == 40)
  85. {
  86. GivePlayerWeapon(killerid,24,1000);
  87. GameTextForPlayer(killerid,"~r~ XP AWARDS ~n~ ~w~ Desert Eagle Unlocked",6000,3);
  88. new name[MAX_PLAYER_NAME], string[100];
  89. GetPlayerName(playerid, name, sizeof(name));
  90. format(string, sizeof(string), "Player * %s Has Been XP Awared 40 Kills ** Desert Eagle unlocked for him", name);
  91. SendClientMessageToAll(COLOR_GREEN, string);
  92. }
  93. if(GetPlayerScore(killerid) == 50)
  94. {
  95. GivePlayerWeapon(killerid,32,1000);
  96. GameTextForPlayer(killerid,"~r~ XP AWARDS ~n~ ~w~ Tec 9 Unlocked",6000,3);
  97. new name[MAX_PLAYER_NAME], string[100];
  98. new name2[MAX_PLAYER_NAME], string2[100];
  99. GetPlayerName(playerid, name, sizeof(name));
  100. format(string, sizeof(string), "Player * %s Has Been XP Awared 50 Kills ** Tec 9 unlocked for him", name);
  101. format(string2, sizeof(string2), "~y~ Player %s Has Finshed XP Experience 50 kills",name2);
  102. GameTextForAll(string2,6000,3);
  103. SendClientMessageToAll(COLOR_GREEN, string);
  104. }
  105. return 1;
  106. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement