03.11.2010, 05:22
(
Last edited by Deal-or-die; 03/11/2010 at 06:04 AM.
)
when a person enter a car that can be rent, he can just do /engine or SHIFT to be unfroze instead of doing /rentcar.
im not quite sure what part of my script id place here. Please ask if i place the wrong bit.
im not quite sure what part of my script id place here. Please ask if i place the wrong bit.
Code:
if(strcmp(cmd, "/rentcar", true) == 0) { if(IsPlayerConnected(playerid)) { if(GetPlayerVehicleID(playerid) >= 135 && GetPlayerVehicleID(playerid) <= 154) { new hirefee = HireCost(GetPlayerVehicleID(playerid)); if(SBizzInfo[1][sbProducts] == 0) { GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1); return 1; } if (GetPlayerMoney(playerid) < SBizzInfo[1][sbEntranceCost]) { SendClientMessage(playerid, COLOR_GRAD2, " You dont have that much cash !"); return 1; } if(HireCar[playerid] != 299) { gCarLock[HireCar[playerid]] = 0; UnLockCar(HireCar[playerid]); SendClientMessage(playerid, COLOR_GREY, "You need unrent your current car/bike/boat first !"); return 1; } for(new i=0; i<MAX_PLAYERS; i++) { if(HireCar[i] == GetPlayerVehicleID(playerid)) { SendClientMessage(playerid, COLOR_GREY, " Someone already rents this car !"); return 1; } } /*if(PlayerInfo[playerid][pPbiskey] == 1) { GameTextForPlayer(playerid, "~w~No charge for the boss", 5000, 3); TogglePlayerControllable(playerid, 1); return 1; }*/ SafeGivePlayerMoney(playerid,-SBizzInfo[1][sbEntranceCost]); SBizzInfo[1][sbTill] += SBizzInfo[1][sbEntranceCost]; ExtortionSBiz(1, SBizzInfo[1][sbEntranceCost]); SBizzInfo[1][sbProducts]--; HireCar[playerid] = GetPlayerVehicleID(playerid); OnPropUpdate(3); PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0); format(string, sizeof(string), "~w~Don't forget to ~r~/unrentcar~n~~g~/lock ~w~to lock your car.",hirefee); SendClientMessage(playerid, COLOR_YELLOW2, "You can start the engine up now !"); gEngine[playerid] = 0; engineOn[GetPlayerVehicleID(playerid)] = false; //TogglePlayerControllable(playerid, 1); GameTextForPlayer(playerid, string, 5000, 3); new y, m, d; new h,mi,s; getdate(y,m,d); gettime(h,mi,s); format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /rentcar",d,m,y,h,mi,s,sendername); CommandLog(string); } } return 1; }