Advertisement
Guest User

Untitled

a guest
Aug 10th, 2018
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.65 KB | None | 0 0
  1. CMD:fill(playerid, params [])
  2. {
  3. if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_DARKGRAY, "You're not in a vehicle.");
  4. if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, COLOR_DARKGRAY, "You're not the driver.");
  5. if(vVar[3][pInfo[playerid][aVar][1]] >= 100) return SendClientMessage(playerid, COLOR_DARKGRAY, "The vehicle has a full tank.");
  6. if(pInfo[playerid][pGasCan] == 2 && (!(IsPlayerInRangeOfPoint(playerid, 6.9, 1004.3961,-939.5698,42.1797) || IsPlayerInRangeOfPoint(playerid, 8.9, 1942.3723,-1772.9437,13.6406) || IsPlayerInRangeOfPoint(playerid, 10.9, -91.8198,-1169.6456,2.4338)
  7. || IsPlayerInRangeOfPoint(playerid, 30.0, -1606.7369,-2713.9268,48.5391) || IsPlayerInRangeOfPoint(playerid, 40.0, 2202.2053,2475.7173,10.8203) || IsPlayerInRangeOfPoint(playerid, 60.0, 614.4914,1692.8192,7.1875)
  8. || IsPlayerInRangeOfPoint(playerid, 45.0, 2114.2112,920.2231,10.8203) || IsPlayerInRangeOfPoint(playerid, 40.0, 2146.8569,2747.8384,10.8203) || IsPlayerInRangeOfPoint(playerid, 15.0, -2244.1155,-2560.7141,31.9219)
  9. || IsPlayerInRangeOfPoint(playerid, 30.0, -1328.4288,2677.9236,50.0625) || IsPlayerInRangeOfPoint(playerid, 40.0, 2639.5413,1106.5266,10.8203) || IsPlayerInRangeOfPoint(playerid, 40.0, 1596.5918,2198.9167,10.8203)
  10. || IsPlayerInRangeOfPoint(playerid, 30.0, -1472.5554,1864.1527,32.6328) || IsPlayerInRangeOfPoint(playerid, 20.0, 655.6916,-565.3945,16.3359)
  11. || IsPlayerInRangeOfPoint(playerid, 20.0, 1381.3810,459.2968,20.3452))))
  12. {
  13. if(vVar[3][pInfo[playerid][aVar][1]]+20 > 100) return SendClientMessage(playerid, COLOR_DARKGRAY, "Does not fit so much fuel in your tank.");
  14. vVar[3][pInfo[playerid][aVar][1]] += 20, pInfo[playerid][pGasCan] = 1, SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Vehicle filled up from Gas Can.");
  15. return 1;
  16. }
  17. if(!(IsPlayerInRangeOfPoint(playerid, 6.9, 1004.3961,-939.5698,42.1797) || IsPlayerInRangeOfPoint(playerid, 8.9, 1942.3723,-1772.9437,13.6406) || IsPlayerInRangeOfPoint(playerid, 10.9, -91.8198,-1169.6456,2.4338)
  18. || IsPlayerInRangeOfPoint(playerid, 30.0, -1606.7369,-2713.9268,48.5391) || IsPlayerInRangeOfPoint(playerid, 40.0, 2202.2053,2475.7173,10.8203) || IsPlayerInRangeOfPoint(playerid, 60.0, 614.4914,1692.8192,7.1875)
  19. || IsPlayerInRangeOfPoint(playerid, 45.0, 2114.2112,920.2231,10.8203) || IsPlayerInRangeOfPoint(playerid, 40.0, 2146.8569,2747.8384,10.8203) || IsPlayerInRangeOfPoint(playerid, 15.0, -2244.1155,-2560.7141,31.9219)
  20. || IsPlayerInRangeOfPoint(playerid, 30.0, -1328.4288,2677.9236,50.0625) || IsPlayerInRangeOfPoint(playerid, 40.0, 2639.5413,1106.5266,10.8203) || IsPlayerInRangeOfPoint(playerid, 40.0, 1596.5918,2198.9167,10.8203)
  21. || IsPlayerInRangeOfPoint(playerid, 30.0, -1472.5554,1864.1527,32.6328) || IsPlayerInRangeOfPoint(playerid, 20.0, 655.6916,-565.3945,16.3359)
  22. || IsPlayerInRangeOfPoint(playerid, 20.0, 1381.3810,459.2968,20.3452)))
  23. return SendClientMessage(playerid, COLOR_DARKGRAY, "You are not at the Gas Station.");
  24. if(pInfo[playerid][aVar][3] == 1) return 1;
  25. GetVehicleParamsEx(pInfo[playerid][aVar][1], vParams[0], vParams[1], vParams[2], vParams[3], vParams[4], vParams[5], vParams[6]);
  26. if(vParams[0] != 0) return SendClientMessage(playerid, COLOR_DARKGRAY, "You must stop your engine in order to refuel your vehicle.");
  27. GameTextForPlayer(playerid, "~w~re-fueling vehicle, please wait...", 5000, 3), pInfo[playerid][aVar][95] = 100-vVar[3][pInfo[playerid][aVar][1]];
  28. pInfo[playerid][aVar][40] = SetTimerEx("Fillup", 13000, 0, "i", playerid), pInfo[playerid][aVar][3] = 1;
  29. return 1;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement