Code
Function OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
FRAC_OnPlayerEnterVehicle(playerid, vehicleid, ispassenger);
if(GetVehicleModel(vehicleid) == 456 && ispassenger != 1)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "*Mit diesem Fahrzeug kannst du Produkte ausliefern.");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "*Kaufen kannst du Produkte am LS Airport Eingang.");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "*Verkaufen kannst du sie an jedem Business, dass Produkte braucht.");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "*Befehl: /produkte, viel Spaß.");
}
if(IsANoTachoVehicle(vehicleid) || IsPlayerNPC(playerid))
{
new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vehicleid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
}
if(GetVehicleModel(vehicleid) == 548 && ispassenger == 1)
{
PutPlayerInVehicle(playerid, vehicleid, 1);
TogglePlayerControllable(playerid, 1);
InCargo[playerid] = vehicleid;
}
if(GetVehicleModel(vehicleid) == 417 && ispassenger == 1)
{
PutPlayerInVehicle(playerid, vehicleid, 1);
TogglePlayerControllable(playerid, 1);
InLevi[playerid] = vehicleid;
}
if(GetVehicleModel(vehicleid) == 427 && ispassenger == 1)
{
PutPlayerInVehicle(playerid, vehicleid, 1);
TogglePlayerControllable(playerid, 1);
InEnfo[playerid] = vehicleid;
}
if(PlayerInfo[playerid][pAdmin] == 0)
{
if(GetVehicleModel(vehicleid) == 432 || GetVehicleModel(vehicleid) == 425 || GetVehicleModel(vehicleid) == 520)
{
if(IsPlayerInFrac(playerid,3)|| PlayerInfo[playerid][pLeader] == 7) { }
else
{
SendClientMessage(playerid,COLOR_RED,"Du weißt nicht wie du in das Fahrzeug kommen sollst!");
TogglePlayerControllable(playerid,false);
TogglePlayerControllable(playerid,true);
}
}
if (IsACopCar(vehicleid) && !ispassenger)
{
if(IsACop(playerid) || IsPlayerInFrac(playerid,23)) {}
else
{
SendClientMessage(playerid,COLOR_RED,"Du hast keine Schlüssel");
TogglePlayerControllable(playerid,false);
TogglePlayerControllable(playerid,true);
}
}
if (IsAFbiCar(vehicleid) && !ispassenger)
{
if(IsACop(playerid) || IsPlayerInFrac(playerid,23)) {}
else
{
SendClientMessage(playerid,COLOR_RED,"Du hast keine Schlüssel");
TogglePlayerControllable(playerid,false);
TogglePlayerControllable(playerid,true);
}
}
if (IsAFahrschulVeh(vehicleid) && !ispassenger)
{
if(PlayerInfo[playerid][pLeader] == 11 || PlayerInfo[playerid][pMember]== 11 || TakingLesson[playerid] == 1)
{
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Du hast keinen Schlüssel!");
TogglePlayerControllable(playerid, 1); //Stoppt Betreten des Autos
}
}
if (IsACopCar(vehicleid) && !ispassenger)
{
if(IsACop(playerid) || IsPlayerInFrac(playerid,3)) {}
else
{
SendClientMessage(playerid,COLOR_RED,"Du hast keine Schlüssel");
TogglePlayerControllable(playerid,false);
TogglePlayerControllable(playerid,true);
}
}
if (IsAnAmbulance(vehicleid) && !ispassenger)
{
if(IsPlayerInFrac(playerid,4) || IsPlayerInFrac(playerid,22)) {}
else
{
SendClientMessage(playerid,COLOR_RED,"Du hast keine Schlüssel");
TogglePlayerControllable(playerid, 1); //Stoppt Betreten des Autos
}
}
}
if (IsASWATCar(vehicleid) && !ispassenger)
{
if(IsACop(playerid) || IsPlayerInFrac(playerid,23)) {}
else
{
SendClientMessage(playerid,COLOR_RED,"Du hast keine Schlüssel");
TogglePlayerControllable(playerid,false);
TogglePlayerControllable(playerid,true);
}
}
if(!IsANoTachoVehicle(vehicleid) && ispassenger != 1)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Wenn du dein Auto starten willst Tippe /motor um den Motor zu starten!");
SendClientMessage(playerid, COLOR_LIGHTBLUE, " ");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Und wenn du Coole Musik hören willst dann Tippe /Radio um es einzuschalten!");
}
if(GetVehicleModel(vehicleid) == 532 && ispassenger != 1 && PlayerInfo[playerid][pJob] == 6)
{
SendClientMessage(playerid, COLOR_GRAD1, "Um die Felder zu ernten, tippe /ernten.");
}
return 1;
}
Alles anzeigen