Guest User

http://forum.sa-mp.com/showthread.php?p=2286486#post2286486

a guest
Dec 24th, 2012
325
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 5.04 KB | None | 0 0
  1. // This is a FS made by phantomcraft on the sa-mp forums.
  2. // This FS may not be claimed by any other person without my permission.
  3. // Mechanic ©
  4.  
  5. #define FILTERSCRIPT
  6.  
  7. #include <a_samp>
  8.  
  9. #include <zcmd>
  10.  
  11. #if defined FILTERSCRIPT
  12.  
  13. public OnFilterScriptInit()
  14. {
  15.     CreateVehicle(525,2475.3677,-2114.7422,13.3108,2.6581,129,135,60); // mechcar1
  16.     CreateVehicle(525,2480.3181,-2114.5127,13.3162,2.6571,129,135,60); // mechcar2
  17.     CreateVehicle(525,2485.0183,-2114.2949,13.3213,2.6560,129,135,60); // mechcar3
  18.     CreateVehicle(525,2490.4072,-2114.0449,13.3223,2.6560,129,135,60); // mechcar4
  19.     CreateVehicle(525,2497.4038,-2113.7207,13.3236,2.6560,129,135,60); // mechcar5
  20.     CreateVehicle(525,2504.9688,-2113.3699,13.3250,2.6560,129,135,60); // mechcar6
  21.     CreateVehicle(525,2511.7051,-2113.0574,13.3262,2.6560,129,135,60); // mechcar7
  22.     CreatePickup(1239,1,2460.5691,-2118.7847,13.5530,0); // repair pickup
  23.     Create3DTextLabel("(( Repair your vehicle here for $175, /repairvehicle ))", 0xEB0C0FFF, 2460.5691,-2118.7847,13.5530, 30.0, 0, 0); //repair label
  24.     CreatePickup(1239,1,2451.0056,-2118.1301,13.5469,0); // startwork pickup
  25.     Create3DTextLabel("(( Start working as mechanic, /startmech ))", 0xEB0C0FFF, 2451.0056,-2118.1301,13.5469, 30.0, 0, 0); //startwork label
  26. }
  27.  
  28. public OnFilterScriptExit()
  29. {
  30.     return 1;
  31. }
  32.  
  33. #else
  34.  
  35. main()
  36. {
  37.     print("\n----------------------------------");
  38.     print(" Blank Gamemode by your name here");
  39.     print("----------------------------------\n");
  40. }
  41.  
  42. #endif
  43.  
  44. public OnPlayerDisconnect(playerid, reason)
  45. {
  46.     return 1;
  47. }
  48.  
  49. public OnPlayerSpawn(playerid)
  50. {
  51.     return 1;
  52. }
  53.  
  54. public OnPlayerDeath(playerid, killerid, reason)
  55. {
  56.     return 1;
  57. }
  58.  
  59. public OnVehicleSpawn(vehicleid)
  60. {
  61.     return 1;
  62. }
  63.  
  64. public OnVehicleDeath(vehicleid, killerid)
  65. {
  66.     return 1;
  67. }
  68.  
  69. public OnPlayerText(playerid, text[])
  70. {
  71.     return 1;
  72. }
  73.  
  74. public OnPlayerCommandText(playerid, cmdtext[])
  75. {
  76.     if (strcmp("/mycommand", cmdtext, true, 10) == 0)
  77.     {
  78.         // Do something here
  79.         return 1;
  80.     }
  81.     return 0;
  82. }
  83.  
  84. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  85. {
  86.     return 1;
  87. }
  88.  
  89. public OnPlayerExitVehicle(playerid, vehicleid)
  90. {
  91.     return 1;
  92. }
  93.  
  94. public OnPlayerStateChange(playerid, newstate, oldstate)
  95. {
  96.     return 1;
  97. }
  98.  
  99. public OnPlayerEnterCheckpoint(playerid)
  100. {
  101.   GivePlayerMoney(playerid, 180);
  102.   DisablePlayerCheckpoint(playerid);
  103.   SendClientMessage(playerid, 0x3524C9FF, "(( [Mechanic] You have delivered tires and received $180! ))");
  104. }
  105.  
  106. public OnPlayerLeaveCheckpoint(playerid)
  107. {
  108.     return 1;
  109. }
  110.  
  111. public OnPlayerEnterRaceCheckpoint(playerid)
  112. {
  113.     return 1;
  114. }
  115.  
  116. public OnPlayerLeaveRaceCheckpoint(playerid)
  117. {
  118.     return 1;
  119. }
  120.  
  121. public OnRconCommand(cmd[])
  122. {
  123.     return 1;
  124. }
  125.  
  126. public OnPlayerRequestSpawn(playerid)
  127. {
  128.     return 1;
  129. }
  130.  
  131. public OnObjectMoved(objectid)
  132. {
  133.     return 1;
  134. }
  135.  
  136. public OnPlayerObjectMoved(playerid, objectid)
  137. {
  138.     return 1;
  139. }
  140.  
  141. public OnPlayerPickUpPickup(playerid, pickupid)
  142. {
  143.     return 1;
  144. }
  145.  
  146. public OnVehicleMod(playerid, vehicleid, componentid)
  147. {
  148.     return 1;
  149. }
  150.  
  151. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  152. {
  153.     return 1;
  154. }
  155.  
  156. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  157. {
  158.     return 1;
  159. }
  160.  
  161. public OnPlayerSelectedMenuRow(playerid, row)
  162. {
  163.     return 1;
  164. }
  165.  
  166. public OnPlayerExitedMenu(playerid)
  167. {
  168.     return 1;
  169. }
  170.  
  171. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  172. {
  173.     return 1;
  174. }
  175.  
  176. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  177. {
  178.     return 1;
  179. }
  180.  
  181. public OnRconLoginAttempt(ip[], password[], success)
  182. {
  183.     return 1;
  184. }
  185.  
  186. public OnPlayerUpdate(playerid)
  187. {
  188.     return 1;
  189. }
  190.  
  191. public OnPlayerStreamIn(playerid, forplayerid)
  192. {
  193.     return 1;
  194. }
  195.  
  196. public OnPlayerStreamOut(playerid, forplayerid)
  197. {
  198.     return 1;
  199. }
  200.  
  201. COMMAND:repairvehicle(playerid, params[]) // repair vehicle for $175 at mechanic
  202. {
  203.   if(!IsPlayerInRangeOfPoint(playerid, 30.0,2460.5691,-2118.7847,13.5530))return SendClientMessage(playerid, 0xE0313AFF, "(( [Mechanic]You are not at the mechanic HQ! ))");
  204.   if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xE0313AFF, "(( [Mechanic] You are not in a vehicle! ))");
  205.   if(GetPlayerMoney(playerid) < 175) return SendClientMessage(playerid, 0xE0313AFF, "(( [Mechanic] You don't have the money to perform this action! ))");
  206.   SendClientMessage(playerid, 0x3524C9FF, "(( [Mechanic] Vehicle repaired for $175! ))");
  207.   GivePlayerMoney(playerid, -175);
  208.   RepairVehicle(GetPlayerVehicleID(playerid));
  209.   return 1;
  210. }
  211.  
  212. COMMAND:startmech(playerid, params[]) // work at mechanic and receive $180
  213. {
  214.   if(!IsPlayerInRangeOfPoint(playerid, 30.0,2451.0056,-2118.1301,13.5469))return SendClientMessage(playerid, 0xE0313AFF, "(( [Mechanic]You are not at the mechanic HQ! ))");
  215.   if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 525) return SendClientMessage(playerid, 0xE0313AFF, "(( [Mechanic] You are not in a mechanics vehicle! ))");
  216.   SendClientMessage(playerid, 0x3524C9FF, "(( [Mechanic] Deliver the tires to the checkpoint and receive your paycheck! ))");
  217.   SetPlayerCheckpoint(playerid, 848.1696,-1445.7803,13.5762, 5.0);
  218.   return 1;
  219. }
Add Comment
Please, Sign In to add comment