07.07.2013, 11:26
Well, title says it all. This is the script for the command!
Any type of help is welcome
Any type of help is welcome
Код:
if(strcmp(cmd, "/rentcar", true) == 0) { if(IsPlayerConnected(playerid)) { new carid = GetPlayerVehicleID(playerid); if(IsARentCarLS(carid)) { if(CarRented[carid] == 1) { SendClientMessage(playerid, COLOR_GREY, "This car is already rented"); return 1; } if(BizzInfo[3][bProducts] == 0) { GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1); return 1; } if(PlayerInfo[playerid][pPbiskey] == 3) { GameTextForPlayer(playerid, "~w~No charge for the boss", 5000, 3); TogglePlayerControllable(playerid, 1); HireCar[playerid] = GetPlayerVehicleID(playerid); OnPropUpdate(); strmid(RentCarSystem[GetPlayerVehicleID(playerid)][RentOwner],Spielername(playerid),0,128,128); CarRented[GetPlayerVehicleID(playerid)] = 1; return 1; } if (PlayerInfo[playerid][pCash] < BizzInfo[3][bEntranceCost]) { SendClientMessage(playerid, COLOR_GRAD2, " You dont have that much cash !"); return 1; } if(HireCar[playerid] != 0) { SendClientMessage(playerid, COLOR_GREY, "You already have an vehicle"); return 1; } PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash] -BizzInfo[3][bEntranceCost]; BizzInfo[3][bTill] += BizzInfo[3][bEntranceCost]; BizzInfo[3][bProducts]--; HireCar[playerid] = GetPlayerVehicleID(playerid); OnPropUpdate(); PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0); TogglePlayerControllable(playerid, 1); GameTextForPlayer(playerid, "~w~We hope you enjoy ~n~the use of this car~n~To lock or unlock your car~n~type ~g~/lock~n~~w~please drive safely", 5000, 3); strmid(RentCarSystem[GetPlayerVehicleID(playerid)][RentOwner],Spielername(playerid),0,128,128); CarRented[GetPlayerVehicleID(playerid)] = 1; } if(IsARentCarSF(carid)) { if(CarRented[carid] == 1) { SendClientMessage(playerid, COLOR_GREY, "This car is already rented"); return 1; } if(BizzInfo[4][bProducts] == 0) { GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1); return 1; } if(PlayerInfo[playerid][pPbiskey] == 4) { GameTextForPlayer(playerid, "~w~No charge for the boss", 5000, 3); TogglePlayerControllable(playerid, 1); HireCar[playerid] = GetPlayerVehicleID(playerid); OnPropUpdate(); CarRented[GetPlayerVehicleID(playerid)] = 1; strmid(RentCarSystem[GetPlayerVehicleID(playerid)][RentOwner],Spielername(playerid),0,128,128); return 1; } if (PlayerInfo[playerid][pCash] < BizzInfo[4][bEntranceCost]) { SendClientMessage(playerid, COLOR_GRAD2, " You dont have that much cash !"); return 1; } if(HireCar[playerid] != 0) { SendClientMessage(playerid, COLOR_GREY, "You already have an vehicle"); return 1; } PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash] -BizzInfo[4][bEntranceCost]; BizzInfo[4][bTill] += BizzInfo[4][bEntranceCost]; BizzInfo[4][bProducts]--; HireCar[playerid] = GetPlayerVehicleID(playerid); OnPropUpdate(); PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0); TogglePlayerControllable(playerid, 1); GameTextForPlayer(playerid, "~w~We hope you enjoy ~n~the use of this car~n~To lock or unlock your car~n~type ~g~/lock~n~~w~please drive safely", 5000, 3); strmid(RentCarSystem[GetPlayerVehicleID(playerid)][RentOwner],Spielername(playerid),0,128,128); CarRented[GetPlayerVehicleID(playerid)] = 1; } if(IsARentCarLV(carid)) { if(CarRented[carid] == 1) { SendClientMessage(playerid, COLOR_GREY, "This car is already rented"); return 1; } if(BizzInfo[9][bProducts] == 0) { GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1); return 1; } if(PlayerInfo[playerid][pPbiskey] == 9) { GameTextForPlayer(playerid, "~w~No charge for the boss", 5000, 3); TogglePlayerControllable(playerid, 1); HireCar[playerid] = GetPlayerVehicleID(playerid); OnPropUpdate(); CarRented[GetPlayerVehicleID(playerid)] = 1; strmid(RentCarSystem[GetPlayerVehicleID(playerid)][RentOwner],Spielername(playerid),0,128,128); return 1; } if (PlayerInfo[playerid][pCash] < BizzInfo[9][bEntranceCost]) { SendClientMessage(playerid, COLOR_GRAD2, " You dont have that much cash !"); return 1; } if(HireCar[playerid] != 0) { SendClientMessage(playerid, COLOR_GREY, "You already have an vehicle"); return 1; } PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash] -BizzInfo[9][bEntranceCost]; BizzInfo[9][bTill] += BizzInfo[9][bEntranceCost]; BizzInfo[9][bProducts]--; HireCar[playerid] = GetPlayerVehicleID(playerid); OnPropUpdate(); PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0); TogglePlayerControllable(playerid, 1); GameTextForPlayer(playerid, "~w~We hope you enjoy ~n~the use of this car~n~To lock or unlock your car~n~type ~g~/lock~n~~w~please drive safely", 5000, 3); strmid(RentCarSystem[GetPlayerVehicleID(playerid)][RentOwner],Spielername(playerid),0,128,128); CarRented[GetPlayerVehicleID(playerid)] = 1; } } return 1; }