Advertisement
Guest User

Untitled

a guest
Apr 24th, 2018
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.84 KB | None | 0 0
  1. #include <a_samp>//îs băgate
  2. #include <foreach>//îs băgate
  3.  
  4.  
  5. #define COLOR_YELLOW 0xFFFF00AA
  6. forward verificare();
  7.  
  8. new quest[MAX_PLAYERS], questcar[MAX_PLAYERS] ;
  9.  
  10. new questactor;
  11.  
  12.  
  13.  
  14.  
  15.  
  16. //la ongamemodeinit asta
  17. questactor = CreateActor(79,-2637.8562,-2187.9712,2.6725,112.6931);
  18. SetActorHealth(questactor, 100.000000);
  19. ApplyActorAnimation(questactor,"DEALER", "DEALER_DEAL" , 4.0, 1, 0, 0, 0, 0);
  20. 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);
  21. SetTimer("verificare", 1000, 1);
  22.  
  23.  
  24.  
  25.  
  26. //la OnPlayerConnect bagi asta
  27. quest[playerid] = 0;
  28. SetPlayerMapIcon(playerid, 1,-2638.7407,-2188.2573,2.6447,9, COLOR_YELLOW);//quest iconita
  29.  
  30.  
  31.  
  32. //la comandă bagi asta
  33. CMD:startquest(playerid, params[])
  34. {
  35. if (quest[playerid] == 1) return SendClientMessage(playerid, COLOR_YELLOW, "You have already done this mission!");
  36. if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_YELLOW, "Get off the vehicle");
  37. if(IsPlayerInRangeOfPoint(playerid,7.0, -2662.8071,-2183.3416,-0.5975))
  38. {
  39. questcar[playerid] = CreateVehicle(453,-2657.4333,-2180.7783,-0.2054,71.8543,1,1,100);
  40. PutPlayerInVehicle(playerid,questcar[playerid],0);
  41. DisablePlayerCheckpoint(playerid);
  42. SetPlayerCheckpoint(playerid, -4113.1929,-1599.7961,-0.6495, 4.0);
  43. SendClientMessage(playerid, COLOR_YELLOW, "Follow the red dot.");
  44.  
  45. }
  46. else
  47. {
  48. SetPlayerCheckpoint(playerid, -2637.8562,-2187.9712,2.6725, 5.0);
  49. return 1;
  50. }
  51. return 1;
  52. }
  53.  
  54.  
  55.  
  56. return 0;
  57. }
  58.  
  59. //la public bagi asta
  60. public verificare()// verifica 1.0 secunde
  61. {
  62. foreach(new i : Player)
  63. {
  64. if(IsPlayerConnected(i))
  65. {
  66. if(IsPlayerInRangeOfPoint(i, 5, -4113.1929,-1599.7961,-0.6495) )
  67. {
  68. if (quest[i] == 0)
  69. {
  70. if(GetVehicleModel(GetPlayerVehicleID(i)) == 453)
  71. {
  72. DisablePlayerCheckpoint(i);
  73. DestroyVehicle(questcar[i]);
  74. quest[i] = 1;
  75. GivePlayerMoney(i, 100000);
  76. SetPlayerPos(i, -2645.4902,-2187.4409,4.0054);
  77. SendClientMessage(i,COLOR_YELLOW,"_________________________________________________________________________");
  78. SendClientMessage(i,COLOR_YELLOW,"Special Quest:{FFFFFF}Congratulations shipwrecked! You're done!");
  79. SendClientMessage(i,COLOR_YELLOW,"Reward Quest:{FFFFFF} 100.000$");
  80. }
  81. }
  82. }
  83. }
  84. }
  85. return 1;
  86. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement