if(strcmp(cmd, "/rentcar", true) == 0) { if(IsPlayerConnected(playerid)) { new vehicleid = GetPlayerVehicleID(playerid); if(RentCars[vehicleid]) { if(SBizzInfo[11][sbProducts] == 0) { GameTextForPlayer(playerid, "~r~Ausverkauft", 5000, 1); return 1; } if (PlayerMoney[playerid] < SBizzInfo[11][sbEntranceCost]) { SendClientMessage(playerid, COLOR_GRAD2, "Du hast nicht genug Geld!"); return 1; } PlayerMoney[playerid] = PlayerMoney[playerid]-SBizzInfo[11][sbEntranceCost]; SBizzInfo[11][sbTill] += SBizzInfo[11][sbEntranceCost]; ExtortionSBiz(11, SBizzInfo[11][sbEntranceCost]); SBizzInfo[11][sbProducts]--; } if(RentCars[vehicleid]) { if(SBizzInfo[1][sbProducts] == 0) { GameTextForPlayer(playerid, "~r~Ausverkauft", 5000, 1); return 1; } if (PlayerMoney[playerid] < SBizzInfo[1][sbEntranceCost]) { SendClientMessage(playerid, COLOR_GRAD2, "Du hast nicht genug Geld!"); return 1; } PlayerMoney[playerid] = PlayerMoney[playerid]-SBizzInfo[1][sbEntranceCost]; SBizzInfo[1][sbTill] += SBizzInfo[1][sbEntranceCost]; ExtortionSBiz(1, SBizzInfo[1][sbEntranceCost]); SBizzInfo[1][sbProducts]--; } if(RentCars[vehicleid]) { if(SBizzInfo[2][sbProducts] == 0) { GameTextForPlayer(playerid, "~r~Ausverkauft", 5000, 1); return 1; } if (PlayerMoney[playerid] < SBizzInfo[1][sbEntranceCost]) { SendClientMessage(playerid, COLOR_GRAD2, "Du hast nicht genug Geld!"); return 1; } PlayerMoney[playerid] = PlayerMoney[playerid]-SBizzInfo[1][sbEntranceCost]; SBizzInfo[2][sbTill] += SBizzInfo[2][sbEntranceCost]; ExtortionSBiz(2, SBizzInfo[2][sbEntranceCost]); SBizzInfo[2][sbProducts]--; } if(HireCar[playerid] != 299) { gCarLock[HireCar[playerid]] = 0; UnLockCar(HireCar[playerid]); SendClientMessage(playerid, COLOR_GREY, "Du musst dein altes Fahrzeug/Boot/Flugzeug erst abmieten!"); } HireCar[playerid] = PlayerRentCar[playerid]; OnPropUpdate(); PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0); format(string, sizeof(string), "~w~Vergesse nicht: ~b~/unrentcar~n~~g~/lock ~w~um dein Fahrzeug abzuschlieЯen."); GameTextForPlayer(playerid, string, 5000, 3); TogglePlayerControllable(playerid, 1); } return 1; } |
~if(strcmp(cmd, "/rentcar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new vehicleid = GetPlayerVehicleID(playerid);
if(RentCars[vehicleid])
{
if(SBizzInfo[11][sbProducts] == 0)
{
GameTextForPlayer(playerid, "~r~Ausverkauft", 5000, 1);
return 1;
}
if (PlayerMoney[playerid] < SBizzInfo[11][sbEntranceCost])
{
SendClientMessage(playerid, COLOR_GRAD2, "Du hast nicht genug Geld!");
return 1;
}
PlayerMoney[playerid] = PlayerMoney[playerid]-SBizzInfo[11][sbEntranceCost];
SBizzInfo[11][sbTill] += SBizzInfo[11][sbEntranceCost];
ExtortionSBiz(11, SBizzInfo[11][sbEntranceCost]);
SBizzInfo[11][sbProducts]--;
}
if(RentCars[vehicleid])
{
if(SBizzInfo[1][sbProducts] == 0)
{
GameTextForPlayer(playerid, "~r~Ausverkauft", 5000, 1);
return 1;
}
if (PlayerMoney[playerid] < SBizzInfo[1][sbEntranceCost])
{
SendClientMessage(playerid, COLOR_GRAD2, "Du hast nicht genug Geld!");
return 1;
}
PlayerMoney[playerid] = PlayerMoney[playerid]-SBizzInfo[1][sbEntranceCost];
SBizzInfo[1][sbTill] += SBizzInfo[1][sbEntranceCost];
ExtortionSBiz(1, SBizzInfo[1][sbEntranceCost]);
SBizzInfo[1][sbProducts]--;
}
if(RentCars[vehicleid])
{
if(SBizzInfo[2][sbProducts] == 0)
{
GameTextForPlayer(playerid, "~r~Ausverkauft", 5000, 1);
return 1;
}
if (PlayerMoney[playerid] < SBizzInfo[1][sbEntranceCost])
{
SendClientMessage(playerid, COLOR_GRAD2, "Du hast nicht genug Geld!");
return 1;
}
PlayerMoney[playerid] = PlayerMoney[playerid]-SBizzInfo[1][sbEntranceCost];
SBizzInfo[2][sbTill] += SBizzInfo[2][sbEntranceCost];
ExtortionSBiz(2, SBizzInfo[2][sbEntranceCost]);
SBizzInfo[2][sbProducts]--;
}
if(HireCar[playerid] != 299)
{
gCarLock[HireCar[playerid]] = 0;
UnLockCar(HireCar[playerid]);
SendClientMessage(playerid, COLOR_GREY, "Du musst dein altes Fahrzeug/Boot/Flugzeug erst abmieten!");
}
HireCar[playerid] = PlayerRentCar[playerid];
OnPropUpdate();
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "~w~Vergesse nicht: ~b~/unrentcar~n~~g~/lock ~w~um dein Fahrzeug abzuschlieЯen.");
GameTextForPlayer(playerid, string, 5000, 3);
TogglePlayerControllable(playerid, 1);
}
return 1;
}
}