Guest User

Lukonic pirmas fs, alkio sistema v0.4

a guest
Mar 29th, 2013
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.26 KB | None | 0 0
  1. // This is a comment
  2. // uncomment the line below if you want to write a filterscript
  3. //#define FILTERSCRIPT
  4. #define MAX_PLAYERS (500)
  5. new pica[MAX_PLAYERS];
  6. #define DIALOG_Valgis 1
  7. #define COLOR_GREEN 0x33AA33AA
  8. #define COLOR_RED 0xAA3333AA
  9.  
  10. #include <a_samp>
  11. #include <zcmd>
  12. #include <sscanf2> //if your using new version it should be like this
  13. #if defined FILTERSCRIPT
  14.  
  15. public OnFilterScriptInit()
  16. {
  17. return 1;
  18. }
  19.  
  20. public OnFilterScriptExit()
  21. {
  22. return 1;
  23. }
  24.  
  25. #else
  26.  
  27. main()
  28. {
  29. print("\n----------------------------------");
  30. print(" Blank Gamemode by your name here");
  31. print("----------------------------------\n");
  32. }
  33.  
  34. #endif
  35. public OnPlayerConnect(playerid)
  36. {
  37. SetTimerEx("Lolas",60000,true,"e",playerid);
  38. return 1;
  39. }
  40. forward Lolas(playerid);
  41. public Lolas(playerid)
  42. {
  43. AtimamGyv(playerid,5);
  44. return 1;
  45. }
  46. stock AtimamGyv(playerid,value)
  47. {
  48. new Float:health;
  49. GetPlayerHealth(playerid,health);
  50. SetPlayerHealth(playerid,health - value);
  51. }
  52. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  53. {
  54. if(dialogid == DIALOG_Valgis)
  55. {
  56. if(response)
  57. {
  58. SendClientMessage(playerid, COLOR_GREEN, "Pavalgei uz 15LT!");
  59. new Float:health;
  60. GetPlayerHealth(playerid,health);
  61. SetPlayerHealth(playerid,health +20);
  62. GivePlayerMoney(playerid, -15);
  63. ApplyAnimation(playerid,"FOOD","EAT_Burger",4.1,0,1,1,1,1,1);
  64. SetPlayerAttachedObject(playerid, 1, 2702, 6,0.1,0,0,45,135);
  65. pica[playerid]=true;
  66. }
  67. else
  68. {
  69. SendClientMessage(playerid, COLOR_RED, "Nepavalgei.");
  70. }
  71. return 1;
  72. }
  73.  
  74. return 0;
  75. }
  76. CMD:valgyti(playerid, params[])
  77. {
  78. ShowPlayerDialog(playerid, DIALOG_Valgis, DIALOG_STYLE_MSGBOX, "Valgis", "Nori pavalgyti? Kaina 15LT", "Noriu", "Nenoriu");
  79. return 1;
  80. }
  81. CMD:imp(playerid, params[])
  82. {
  83. if(!pica[playerid])
  84. {
  85. SendClientMessage(playerid,-1,"Neturi ko ismesti");
  86. return 1;
  87. }
  88. SendClientMessage(playerid, COLOR_GREEN, "Ismetei picos gabaliuka!");
  89. ApplyAnimation(playerid,"BSKTBALL","BBALL_def_jump_shot",4.1,0,1,1,1,1,1);
  90. if(IsPlayerAttachedObjectSlotUsed(playerid, 1)) RemovePlayerAttachedObject(playerid, 1);
  91. pica[playerid]=false;
  92. return 1;
  93. }
Advertisement
Add Comment
Please, Sign In to add comment