if(strcmp(cmd, "/rollermieten", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new vehicleid = GetPlayerVehicleID(playerid);
new hirefee = HireCost(GetPlayerVehicleID(playerid));
if(IsANewbRoller(vehicleid))
{
if(SpielerInfo[playerid][pPbiskey] == 0)
{
GameTextForPlayer(playerid, "~w~Keine Gebuehren für den Chef", 5000, 3);
TogglePlayerControllable(playerid, 1);
return 1;
}
if (GetPlayerMoney(playerid) < SBizzInfo[33][sbEntranceCost])
{
SendClientMessage(playerid, COLOR_GRAD2, " Du hast nicht genug Geld!");
return 1;
}
PlayerMoney[playerid] = PlayerMoney[playerid]-SBizzInfo[33][sbEntranceCost];
SBizzInfo[33][sbTill] += SBizzInfo[33][sbEntranceCost];
ExtortionSBiz(33, SBizzInfo[33][sbEntranceCost]);
}
else { return SendClientMessage(playerid,COLOR_RED,"Du bist auf keinem Newbieroller."); }
HireCar[playerid] = GetPlayerVehicleID(playerid);
OnPropUpdate();
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "~w~Viel Spass damit ~n~um das Fahrzeug zu Schliessen~n~oder zu Oeffnen Nutze ~g~/lock~n~~w~Fahren Sie Bitte Vorsichtig",hirefee);
TogglePlayerControllable(playerid, 1);
GameTextForPlayer(playerid, string, 5000, 3);
}
}
So sollte es gehen
Und das:
if(IsANewbRoller(GetPlayerVehicleID(playerid)) || IsANewbBike(GetPlayerVehicleID(playerid)))
{
if (HireCar[playerid] != vehicleid)
{
format(string, sizeof(string), "~w~Du kannst das Fahrzeug mieten!~n~Kosten:~g~$%d~n~~w~Zum Mieten ~g~/rollermieten~w~~n~Zum Absteigen ~r~/exit",SBizzInfo[33][sbEntranceCost]);
TogglePlayerControllable(playerid, 0);
PlayerExitAble[playerid] = 1;
GameTextForPlayer(playerid, string, 5000, 3);
}
}