also ich habe im adminsystem ein carspawn-system. und wenn ein admin aus einem spawnauto aussteigt soll das auto verschwinden. funktioniert alles wunderbar, nur sobald das erste auot gespawnt wurde verschwinden die restlichen autos auch. die sollen aber trotzdem da beleibe es sollen nur die spawn autos verschwinden sobald man aussteig.
Ich hoffe mir kann jemand helfen. Danke schon im voraus
new Veh1[MAX_VEHICLES];
new Veh2[MAX_VEHICLES];
new Veh3[MAX_VEHICLES];
new Veh4[MAX_VEHICLES];
new Veh5[MAX_VEHICLES];
new Veh6[MAX_VEHICLES];
new Veh7[MAX_VEHICLES];
new Veh8[MAX_VEHICLES];
new Veh9[MAX_VEHICLES];
new Veh10[MAX_VEHICLES];
new Veh11[MAX_VEHICLES];
new Veh12[MAX_VEHICLES];
new Veh13[MAX_VEHICLES];
new Veh14[MAX_VEHICLES];
if(dialogid == CARCRE)
{
if(response)
{
new Float:ax,Float:ay,Float:az,Float:ZRot;
GetPlayerPos(playerid,ax,ay,az);
GetPlayerFacingAngle(playerid,ZRot);
if(listitem ==0)
{
Veh1[200] = CreateVehicle(402,ax,ay,az,ZRot,1,1,0);
SendClientMessage(playerid,BLAU,"Auto gespawnt");
}
else if(listitem == 1)
{
Veh2[201] = CreateVehicle(415,ax,ay,az,ZRot,1,1,-1);
SendClientMessage(playerid,BLAU,"Auto gespawnt");
}
else if(listitem == 2)
{
Veh3[202] = CreateVehicle(429,ax,ay,az,ZRot,1,1,-1);
SendClientMessage(playerid,BLAU,"Auto gespawnt");
}
else if(listitem == 3)
{
Veh4[203] = CreateVehicle(541,ax,ay,az,ZRot,1,1,-1);
SendClientMessage(playerid,BLAU,"Auto gespawnt");
}
else if(listitem == 4)
{
Veh5[204] = CreateVehicle(587,ax,ay,az,ZRot,1,1,-1);
SendClientMessage(playerid,BLAU,"Auto gespawnt");
}
else if(listitem == 5)
{
Veh6[205] = CreateVehicle(411,ax,ay,az,ZRot,1,1,-1);
SendClientMessage(playerid,BLAU,"Auto gespawnt");
}
else if(listitem == 6)
{
Veh7[206] = CreateVehicle(559,ax,ay,az,ZRot,1,1,-1);
SendClientMessage(playerid,BLAU,"Auto gespawnt");
}
else if(listitem == 7)
{
Veh8[207] = CreateVehicle(306,ax,ay,az,ZRot,1,1,-1);
SendClientMessage(playerid,BLAU,"Auto gespawnt");
}
else if(listitem == 8)
{
Veh9[208] = CreateVehicle(535,ax,ay,az,ZRot,1,1,-1);
SendClientMessage(playerid,BLAU,"Auto gespawnt");
}
else if(listitem == 9)
{
Veh10[209] = CreateVehicle(560,ax,ay,az,ZRot,1,1,-1);
SendClientMessage(playerid,BLAU,"Auto gespawnt");
}
else if(listitem == 10)
{
Veh11[210] = CreateVehicle(506,ax,ay,az,ZRot,1,1,-1);
SendClientMessage(playerid,BLAU,"Auto gespawnt");
}
else if(listitem == 11)
{
Veh12[211] = CreateVehicle(451,ax,ay,az,ZRot,1,1,-1);
SendClientMessage(playerid,BLAU,"Auto gespawnt");
}
else if(listitem == 12)
{
Veh13[212] = CreateVehicle(477,ax,ay,az,ZRot,1,1,-1);
SendClientMessage(playerid,BLAU,"Auto gespawnt");
}
else if(listitem == 13)
{
Veh14[213] = CreateVehicle(495,ax,ay,az,ZRot,1,1,-1);
SendClientMessage(playerid,BLAU,"Auto gespawnt");
}
}
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
if(Veh1[200]||Veh2[201]||Veh3[202]||Veh4[203]||Veh5[204]||Veh6[205]||Veh7[206]||Veh8[207]||Veh9[208]||Veh10[209]||Veh11[210]||Veh12[211]||Veh13[212]||Veh14[213])
{
DestroyVehicle(vehicleid);
}
return 1;
}