Hallo
Mein Linie befehl geht nur wenn ich die cars mit CreateVehicle erstelle aber nicht mit CreateVehicleEx aber wieso ?
p.s nicht Mein Script
das habe ich im einem Filterscript Stehen
new bus[16];
new Text3D:Busl[sizeof(bus)];
stock CreateVehicleEx(vehicletype, Float:x, Float:y, Float:z, Float:rotation, color1, color2, respawn_delay, bool:reset=false)
{
return CallRemoteFunction("ext_CreateVehicleEx", "dffffdddd",vehicletype, x, y, z, rotation, color1, color2, respawn_delay, reset);
}
public OnFilterScriptInit()
{
bus[0] = CreateVehicleEx(431, 1748.0267, -1800.7855, 12.5372, -13.0000, 226, 226, 180, true);
bus[1] = CreateVehicleEx(431, 1743.8179, -1799.8168, 12.5372, -13.0000, 226, 226, 180, true);
bus[2] = CreateVehicleEx(431, 1740.0341, -1798.8628, 12.5372, -15.0000, 226, 226, 180, true);
bus[3] = CreateVehicleEx(431, 1736.1354, -1797.7816, 12.5372, -15.0000, 226, 226, 180, true);
bus[4] = CreateVehicleEx(431, 1732.1914, -1796.7300, 12.5372, -15.0000, 226, 226, 180, true);
bus[5] = CreateVehicleEx(431, 1728.0614, -1795.6019, 12.5372, -15.0000, 226, 226, 180, true);
bus[6] = CreateVehicleEx(431, 1723.7610, -1794.4852, 12.5372, -15.0000, 226, 226, 180, true);
bus[7] = CreateVehicleEx(431, 1715.3442, -1792.7511, 12.5372, 0.0000, 226, 226, 180, true);
bus[8] = CreateVehicleEx(431, 1710.4001, -1792.7511, 12.5372, 0.0000, 226, 226, 180, true);
bus[9] = CreateVehicleEx(431, 1705.3392, -1792.7511, 12.5372, 0.0000, 226, 226, 180, true);
bus[10] = CreateVehicleEx(437, 1725.2415, -1753.1591, 12.5474, 180.0000, 226, 226, 180, true);
bus[11] = CreateVehicleEx(437, 1720.2415, -1753.1591, 12.5474, 180.0000, 226, 226, 180, true);
bus[12] = CreateVehicleEx(437, 1715.2415, -1753.1591, 12.5474, 180.0000, 226, 226, 180, true);
bus[13] = CreateVehicleEx(437, 1710.2415, -1753.1591, 12.5474, 180.0000, 226, 226, 180, true);
bus[14] = CreateVehicleEx(437, 1705.2415, -1753.1591, 12.5474, 180.0000, 226, 226, 180, true);
bus[15] = CreateVehicleEx(431, 1752.5229, -1801.5945, 13.6621, 347.6127, 226, 226, 180, true);
for(new i=0;i<sizeof(bus);i++)
{
Busl[i] = Create3DTextLabel("Leerfahrt",Blau, 0.0, 0.0, 0.0, 15.0, 0,1);
Attach3DTextLabelToVehicle(Busl[i],bus[i], 0.0, 0.0, 2.0);
}
return 1;
}
befehl
CMD:linie(playerid)
{
new veh = GetPlayerVehicleID(playerid);
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0x33CCFFAA,"Du bist in Keinem Fahrzeug!");
for(new i = 0; i<sizeof(bus); i++)
{
if(veh == bus[i])
{
if(GetCurrentStat(0,playerid) == 3)
{
if(Busfahrer[playerid][bus_Aktiv]==true)
{
Update3DTextLabelText(Busl[i], Blau, "Leerfahrt");
Busfahrer[playerid][bus_Aktiv]=false;
DisablePlayerCheckpoint(playerid);
return 1;
}
else
{
return ShowPlayerDialog(playerid,DIALOG_BUSFAHRER,DIALOG_STYLE_LIST,"Busfahrplan","Route 1\nRoute 2","Wählen","Abbrechen");
}
}
}
}
return 1;
}
funktion aus dem GM
forward ext_CreateVehicleEx(vehicletype, Float:x, Float:y, Float:z, Float:rotation, color1, color2, respawn_delay, bool:reset);
public ext_CreateVehicleEx(vehicletype, Float:x, Float:y, Float:z, Float:rotation, color1, color2, respawn_delay, bool:reset) return CreateVehicleEx(vehicletype, x, y, z, rotation, color1, color2, respawn_delay, reset);
stock CreateVehicleEx(vehicletype, Float:x, Float:y, Float:z, Float:rotation, color1, color2, respawn_delay, bool:reset=false)
{
new vehicleid;
if(vehicletype < 400 || vehicletype > 611)return 0;
vehicleid = CreateVehicle(vehicletype, x, y, z, rotation, color1, color2, respawn_delay);
if(Vehicle[vehicleid][vehMotor])KillTimer(Vehicle[vehicleid][VehicleTimer]);
Vehicle[vehicleid][vehMotor] = false;
Vehicle[vehicleid][vehLicht] = false;
Vehicle[vehicleid][vehHaube] = false;
Vehicle[vehicleid][vehKRaum] = false;
Vehicle[vehicleid][vehPosX2] = x;
Vehicle[vehicleid][vehPosY2] = y;
Vehicle[vehicleid][vehPosZ2] = z;
Vehicle[vehicleid][vehText] = CreateDynamic3DTextLabel(" ", COLOR_WHITE, 50.0, 60.0, 110.0, 20.0, INVALID_PLAYER_ID, vehicleid, 0, -1, -1, -1, 100.0);
if(reset == true)
{
Vehicle[vehicleid][vehTankKM] = 0;
Vehicle[vehicleid][vehKMStandCount] = 0;
Vehicle[vehicleid][vehKMStand] = 0;
Vehicle[vehicleid][vehFuel] = VehicleData[vehicletype-400][vehMaxTank];
Vehicle[vehicleid][vehNeonID] = 0;
DestroyDynamicObject(Vehicle[vehicleid][vehNeon1]);
DestroyDynamicObject(Vehicle[vehicleid][vehNeon2]);
Vehicle[vehicleid][vehNeon1] = INVALID_OBJECT_ID;
Vehicle[vehicleid][vehNeon2] = INVALID_OBJECT_ID;
}
return vehicleid;
}