Advertisement
Guest User

Untitled

a guest
Sep 19th, 2011
337
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.72 KB | None | 0 0
  1. //by BloodMaster
  2. //hvala Luki P. - Za pomoc oko hook-anja...
  3. //hvala ZicMortalu na prijavi buga
  4. #include <a_samp>
  5. new Text:nekitext[MAX_PLAYERS];
  6. new str56[24];
  7. new tajmer[MAX_PLAYERS];
  8. new bool:Postoji56[MAX_PLAYERS] = false;
  9. stock Novac56(playerid,koliko)
  10. {
  11. if(koliko == 0) return 1;
  12. if(Postoji56[playerid] == true) return 1;
  13. Postoji56[playerid]=true;
  14. nekitext[playerid] = TextDrawCreate(498.000000, 100.000000, ".");
  15. TextDrawBackgroundColor(nekitext[playerid], 255);
  16. TextDrawFont(nekitext[playerid], 3);
  17. TextDrawLetterSize(nekitext[playerid], 0.500000, 1.000000);
  18. TextDrawColor(nekitext[playerid], -1);
  19. TextDrawSetOutline(nekitext[playerid], 0);
  20. TextDrawSetProportional(nekitext[playerid], 1);
  21. TextDrawSetShadow(nekitext[playerid], 1);
  22. if(koliko < 0) format(str56,sizeof str56,"~r~-~g~$~r~%d",-koliko);
  23. if(koliko > 0) format(str56,sizeof str56,"~g~$~y~%d",koliko);
  24. if(koliko == 0) format(str56,sizeof str56,"~g~$~b~%d",koliko);
  25. TextDrawSetString(nekitext[playerid],str56);
  26. TextDrawShowForPlayer(playerid,nekitext[playerid]);
  27. tajmer[playerid] = SetTimerEx("removetd56",5000,false,"i",playerid);
  28. return 1;
  29. }
  30. forward removetd56(playerid);
  31. public removetd56(playerid)
  32. {
  33. Postoji56[playerid]=false;
  34. TextDrawDestroy(nekitext[playerid]);
  35. KillTimer(tajmer[playerid]);
  36. return 1;
  37. }
  38.  
  39. //hook
  40.  
  41. forward bloodmaster_GivePlayerMoney(playerid, pare);
  42. public bloodmaster_GivePlayerMoney(playerid, pare)
  43. {
  44. return GivePlayerMoney(playerid, pare);
  45. }
  46. forward _BM_GivePlayerMoney(playerid, pare);
  47. public _BM_GivePlayerMoney(playerid, pare)
  48. {
  49. Novac56(playerid,pare);
  50. return CallRemoteFunction("bloodmaster_GivePlayerMoney", "ii", playerid, pare);
  51. }
  52. #define GivePlayerMoney _BM_GivePlayerMoney
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement