Advertisement
Guest User

Untitled

a guest
Apr 13th, 2018
502
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.89 KB | None | 0 0
  1. // Quest
  2.  
  3.  
  4. #include <a_samp>
  5. #include <foreach>
  6.  
  7. //#if defined FILTERSCRIPT
  8.  
  9. #define COLOR_YELLOW 0xFFFF00AA
  10. forward verificare();
  11.  
  12. new quest[MAX_PLAYERS], questcar[MAX_PLAYERS] ;
  13.  
  14. new questactor;
  15.  
  16.  
  17. public OnFilterScriptInit()
  18. {
  19. print("\n--------------------------------------");
  20. print(" ");
  21. print("--------------------------------------\n");
  22. return 1;
  23. }
  24.  
  25. public OnFilterScriptExit()
  26. {
  27. return 1;
  28. }
  29.  
  30.  
  31.  
  32. public OnGameModeInit()
  33. {
  34. questactor = CreateActor(79,-2637.8562,-2187.9712,2.6725,112.6931);
  35. SetActorHealth(questactor, 100.000000);
  36. ApplyActorAnimation(questactor,"DEALER", "DEALER_DEAL" , 4.0, 1, 0, 0, 0, 0);
  37. Create3DTextLabel("{FFFFFF}Special Quest\n{3e82ef}Hello buddy, do you want to have an adventure at sea?\n{3e82ef}Then go to the water and type the command {FFFFFF}/startquest\n{3e82ef}Reward:{FFFFFF}100.000$ and 1 respect points",0xEC3E00FF,-2638.7407,-2188.2573,2.6447,15.0,0, 0);
  38. SetTimer("verificare", 1000, 1);
  39.  
  40.  
  41.  
  42. return 1;
  43. }
  44. public OnPlayerConnect(playerid)
  45. {
  46. SendClientMessage(playerid,COLOR_YELLOW,"Quest basic , /startquest");
  47. quest[playerid] = 0;
  48. SetPlayerMapIcon(playerid, 1,-2638.7407,-2188.2573,2.6447,9, COLOR_YELLOW);//quest iconita
  49. return 1;
  50. }
  51.  
  52.  
  53.  
  54. public OnPlayerCommandText(playerid, cmdtext[])
  55. {
  56.  
  57. if (strcmp("/startquest", cmdtext, true, 10) == 0)
  58. {
  59. if (quest[playerid] == 1) return SendClientMessage(playerid, COLOR_YELLOW, "You have already done this mission!");
  60. if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_YELLOW, "Get off the vehicle");
  61. if(IsPlayerInRangeOfPoint(playerid,7.0, -2662.8071,-2183.3416,-0.5975))
  62. {
  63. questcar[playerid] = CreateVehicle(453,-2657.4333,-2180.7783,-0.2054,71.8543,1,1,100);
  64. PutPlayerInVehicle(playerid,questcar[playerid],0);
  65. DisablePlayerCheckpoint(playerid);
  66. SetPlayerCheckpoint(playerid,-4113.1929,-1599.7961,-0.6495, 9.0);
  67. SendClientMessage(playerid, COLOR_YELLOW, "Follow the red dot.");
  68.  
  69. }
  70. else
  71. {
  72. SetPlayerCheckpoint(playerid, -2637.8562,-2187.9712,2.6725, 5.0);
  73. return 1;
  74. }
  75. return 1;
  76. }
  77.  
  78.  
  79.  
  80. return 0;
  81. }
  82.  
  83.  
  84.  
  85. public verificare()// verifica 1.0 secunde
  86. {
  87. foreach(new i : Player)
  88. {
  89. if(IsPlayerConnected(i))
  90. {
  91. if(IsPlayerInRangeOfPoint(i, 5, -4113.1929,-1599.7961,-0.6495) )
  92. {
  93. if (quest[i] == 0)
  94. {
  95. if(GetVehicleModel(GetPlayerVehicleID(i)) == 453)
  96. {
  97. DisablePlayerCheckpoint(i);
  98. DestroyVehicle(questcar[i]);
  99. quest[i] = 1;
  100. GivePlayerMoney(i, 100000);
  101. SetPlayerPos(i, -2645.4902,-2187.4409,4.0054);
  102. SendClientMessage(i,COLOR_YELLOW,"_________________________________________________________________________");
  103. SendClientMessage(i,COLOR_YELLOW,"Special Quest:{FFFFFF}Congratulations shipwrecked! You're done!");
  104. SendClientMessage(i,COLOR_YELLOW,"Reward Quest:{FFFFFF} 100.000$");
  105. }
  106. }
  107. }
  108. }
  109. }
  110. return 1;
  111. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement