Advertisement
Guest User

RomCookies in Include Version! v1.0

a guest
Nov 4th, 2012
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Include version of RomCookies by Romel
  2.  
  3. #if defined _cookies_included
  4. #endinput
  5. #endif
  6.  
  7. #define _cookies_included
  8.  
  9. enum CookieInfo
  10. {
  11. Cookies,
  12. }
  13. new cokInfo[MAX_PLAYERS][CookieInfo];
  14.  
  15. /*
  16. native cookie_PlayerInit(playerid);
  17. native SetPlayerCookie(playerid, cookie);
  18. native ResetPlayerCookie(playerid);
  19. native AddPlayerCookie(playerid, cookie);
  20. native DecreasePlayerCookie(playerid, cookie);
  21. native GetPlayerCookie(playerid);
  22. */
  23.  
  24. stock cookie_PlayerInit(playerid)
  25. {
  26. cokInfo[playerid][Cookies] = 0;
  27. return 1;
  28. }
  29.  
  30. stock SetPlayerCookie(playerid, cookie = 0)
  31. {
  32. cokInfo[playerid][Cookies] = 0;
  33. cokInfo[playerid][Cookies] = cookie;
  34. return 1;
  35. }
  36.  
  37. stock ResetPlayerCookie(playerid)
  38. {
  39. cokInfo[playerid][Cookies] = 0;
  40. return 1;
  41. }
  42.  
  43. stock AddPlayerCookie(playerid, cookie = 0)
  44. {
  45. cokInfo[playerid][Cookies] += cookie;
  46. return 1;
  47. }
  48.  
  49. stock DecreasePlayerCookie(playerid, cookie = 0)
  50. {
  51. cokInfo[playerid][Cookies] -= cookie;
  52. return 1;
  53. }
  54.  
  55. stock GetPlayerCookie(playerid) return cokInfo[playerid][Cookies];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement