Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:fill(playerid, params [])
- {
- if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_DARKGRAY, "You're not in a vehicle.");
- if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, COLOR_DARKGRAY, "You're not the driver.");
- if(vVar[3][pInfo[playerid][aVar][1]] >= 100) return SendClientMessage(playerid, COLOR_DARKGRAY, "The vehicle has a full tank.");
- 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)
- || 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)
- || 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)
- || 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)
- || IsPlayerInRangeOfPoint(playerid, 30.0, -1472.5554,1864.1527,32.6328) || IsPlayerInRangeOfPoint(playerid, 20.0, 655.6916,-565.3945,16.3359)
- || IsPlayerInRangeOfPoint(playerid, 20.0, 1381.3810,459.2968,20.3452))))
- {
- if(vVar[3][pInfo[playerid][aVar][1]]+20 > 100) return SendClientMessage(playerid, COLOR_DARKGRAY, "Does not fit so much fuel in your tank.");
- vVar[3][pInfo[playerid][aVar][1]] += 20, pInfo[playerid][pGasCan] = 1, SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Vehicle filled up from Gas Can.");
- return 1;
- }
- 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)
- || 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)
- || 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)
- || 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)
- || IsPlayerInRangeOfPoint(playerid, 30.0, -1472.5554,1864.1527,32.6328) || IsPlayerInRangeOfPoint(playerid, 20.0, 655.6916,-565.3945,16.3359)
- || IsPlayerInRangeOfPoint(playerid, 20.0, 1381.3810,459.2968,20.3452)))
- return SendClientMessage(playerid, COLOR_DARKGRAY, "You are not at the Gas Station.");
- if(pInfo[playerid][aVar][3] == 1) return 1;
- GetVehicleParamsEx(pInfo[playerid][aVar][1], vParams[0], vParams[1], vParams[2], vParams[3], vParams[4], vParams[5], vParams[6]);
- if(vParams[0] != 0) return SendClientMessage(playerid, COLOR_DARKGRAY, "You must stop your engine in order to refuel your vehicle.");
- GameTextForPlayer(playerid, "~w~re-fueling vehicle, please wait...", 5000, 3), pInfo[playerid][aVar][95] = 100-vVar[3][pInfo[playerid][aVar][1]];
- pInfo[playerid][aVar][40] = SetTimerEx("Fillup", 13000, 0, "i", playerid), pInfo[playerid][aVar][3] = 1;
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement