Hallo Community,
hab mal wieder ein Problem,
das Problem ist, egal welchen schein ich nachher habe kann alle Cars fahren...
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER) //buggy dont finnish
{
new newcar = GetPlayerVehicleID(playerid);
if(IsABoat(newcar))
{
if(SInfo[playerid][pBoatLic] < 1)
{
SendClientMessage(playerid, Blau, " Du hast kein Bootschein");
RemovePlayerFromVehicle(playerid);
}
}
else if(IstEinFlugzeug(newcar))
{
if(SInfo[playerid][pFlyLic] < 1)
{
if(Fahrstunde[playerid] == 1) { }
else
{
SendClientMessage(playerid, Blau, "Du hast keinen Flugschein !");
RemovePlayerFromVehicle(playerid);
}
}
}
else if(IsABike(newcar))
{
if(SInfo[playerid][pMotoLic] < 1)
{
if(Fahrstunde[playerid] == 1) { }
else
{
SendClientMessage(playerid, Blau, " Du hast kein Motorrad Schein !");
RemovePlayerFromVehicle(playerid);
}
}
}
else if(IsALKW(newcar))
{
if(SInfo[playerid][pLKWLic] == 0)
{
if(Fahrstunde[playerid] == 0)
{
SendClientMessage(playerid, Blau, "Du hast kein LKW Schein !");
RemovePlayerFromVehicle(playerid);
}
}
}
else if(DasCarbrauchtkeineLic(newcar)) { }
else
{
if(SInfo[playerid][pCarLic] < 1)
{
if((Fahrstunde[playerid] == 1) || IsPlayerNPC(playerid))
{
}
else
{
SendClientMessage(playerid, Blau, "Du hast noch keinen Führerschein !");
RemovePlayerFromVehicle(playerid);
return 1;
}
}
}
}
return 1;
}
forward IstEinFlugzeug(carid);
public IstEinFlugzeug(carid)
{
new model = GetVehicleModel(carid);
if(model == 425 || model == 497 || model == 520)
{
return 1;
}
return 0;
}
forward DasFahrzeugbrauchtkeinTacho(carid);
public DasFahrzeugbrauchtkeinTacho(carid)
{
new model = GetVehicleModel(carid);
{
if(model == 481 || model == 509 || model == 510)
{
return 1;
}
}
return 0;
}
forward DasCarbrauchtkeineLic(carid);
public DasCarbrauchtkeineLic(carid)
{
new modelid = GetVehicleModel(carid);
if(modelid == 462 || modelid == 509 || modelid == 481 || modelid == 510 || modelid == 473 || modelid == 462)
{
return 1;
}
return 0;
}
forward IsALKW(carid);
public IsALKW(carid)
{
new model = GetVehicleModel(carid);
if(model==403||model==406||model==486||model==514||model==515||model==573||model==578)
{
return 1;
}
return 0;
}
forward IsABike(carid);
public IsABike(carid)
{
new model = GetVehicleModel(carid);
if(model==461||model==463||model==468||model==521||model==522||model==581||model==586)
{
return 1;
}
return 0;
}
Also es ist irgendwie komisch...
LG