Guten Tag Community,
ich habe gerade ein Problem und zwar egal in welches auto ich mich rein setze wird immer die bikeschein abfrage durchgeführt.
Ich möchte dies aber bei jedem Fahrzeug anders haben.
Das ist mein Code:
OnPlayerStateChange:
if(isBike(vehicleid))
{
if(sInfo[playerid][pBikeschein] == 0)
{
SendClientMessage(playerid,COLOR_GRAU,"Du hast kein Motorradschein.");
RemovePlayerFromVehicle(playerid);
return 1;
}
}
if(isBoot(vehicleid))
{
if(sInfo[playerid][pBootschein] == 0)
{
SendClientMessage(playerid,COLOR_GRAU,"Du hast kein Bootschein.");
RemovePlayerFromVehicle(playerid);
}
}
if(isFlugzeug(vehicleid))
{
if(sInfo[playerid][pFlugschein] == 0)
{
SendClientMessage(playerid,COLOR_GRAU,"Du hast kein Flugschein.");
RemovePlayerFromVehicle(playerid);
}
}
else
{
if(sInfo[playerid][pFuhrerschein] == 0)
{
SendClientMessage(playerid,COLOR_GRAU,"Du hast kein Führerschein.");
RemovePlayerFromVehicle(playerid);
return 1;
}
}
{
if(sInfo[playerid][pBikeschein] == 0)
{
SendClientMessage(playerid,COLOR_GRAU,"Du hast kein Motorradschein.");
RemovePlayerFromVehicle(playerid);
return 1;
}
}
if(isBoot(vehicleid))
{
if(sInfo[playerid][pBootschein] == 0)
{
SendClientMessage(playerid,COLOR_GRAU,"Du hast kein Bootschein.");
RemovePlayerFromVehicle(playerid);
}
}
if(isFlugzeug(vehicleid))
{
if(sInfo[playerid][pFlugschein] == 0)
{
SendClientMessage(playerid,COLOR_GRAU,"Du hast kein Flugschein.");
RemovePlayerFromVehicle(playerid);
}
}
else
{
if(sInfo[playerid][pFuhrerschein] == 0)
{
SendClientMessage(playerid,COLOR_GRAU,"Du hast kein Führerschein.");
RemovePlayerFromVehicle(playerid);
return 1;
}
}
IsBike, IsFlugzeug, IsBoot:
stock isBike(carid)
{
new model = GetVehicleModel(carid);
if(model == 448 || model == 461 || model == 463 || model == 468 || model == 471 || model == 521 || model == 522 || model == 523 || 581 || model == 586)
{
return 1;
}
return 0;
}
stock isFlugzeug(carid)
{
new model = GetVehicleModel(carid);
if(model == 417 || model == 425 || model == 460 || model == 487 || model == 488 || model == 497 || model == 519 || model == 520 || model == 548 || model == 563 || model == 593)
{
return 1;
}
return 0;
}
stock isBoot(carid)
{
new model = GetVehicleModel(carid);
if(model == 430 || model == 446 || model == 452 || model == 453 || model == 454 || model == 472 || model == 473 || model == 484 || model == 493 || model == 539 || model == 595)
{
return 1;
}
return 0;
}
{
new model = GetVehicleModel(carid);
if(model == 448 || model == 461 || model == 463 || model == 468 || model == 471 || model == 521 || model == 522 || model == 523 || 581 || model == 586)
{
return 1;
}
return 0;
}
stock isFlugzeug(carid)
{
new model = GetVehicleModel(carid);
if(model == 417 || model == 425 || model == 460 || model == 487 || model == 488 || model == 497 || model == 519 || model == 520 || model == 548 || model == 563 || model == 593)
{
return 1;
}
return 0;
}
stock isBoot(carid)
{
new model = GetVehicleModel(carid);
if(model == 430 || model == 446 || model == 452 || model == 453 || model == 454 || model == 472 || model == 473 || model == 484 || model == 493 || model == 539 || model == 595)
{
return 1;
}
return 0;
}
Ich hoffe jemand kann mir helfen
MfG
Master