wie kann man machen das das supcar auch gelöscht wird wenn man nicht drin sitzt das ist es jetzt wer kann mir helfen es so zu machen das wenn man von weiter das supcar löschen kann
if(strcmp(cmd, "/supcar", true) == 0)
{
if(AdminDuty[playerid] == 1)
{
if(supmobil[playerid] == 0)
{
ShowPlayerDialog(playerid, supcar, DIALOG_STYLE_LIST, "{D200FF}Sup Cars", "Comet\nSultan\nWayfarer", "Auswählen", "Beenden");
}
else if(supmobil[playerid] == 1)
{
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return 1;
{
DestroyObject(sfl1[GetPlayerVehicleID(playerid)]);
DestroyObject(sfl2[GetPlayerVehicleID(playerid)]);
DestroyObject(sfl3[GetPlayerVehicleID(playerid)]);
DestroyObject(sfl4[GetPlayerVehicleID(playerid)]);
DestroyObject(sfl5[GetPlayerVehicleID(playerid)]);
DestroyObject(sfl6[GetPlayerVehicleID(playerid)]);
DestroyObject(GetPVarInt(playerid, "pink"));
DeletePVar(playerid, "neon");
DestroyObject(GetPVarInt(playerid, "pink1"));
DeletePVar(playerid, "neon");
DestroyVehicle(GetPlayerVehicleID(playerid));
RemovePlayerFromVehicle(playerid);
supmobil[playerid] = 0;
SendClientMessage(playerid,0x8C00FFFF, "Du hast dein Sup Car gelöscht");
Delete3DTextLabel( supcar3d[GetPlayerVehicleID(playerid)] );
SetVehicleHealth(playerid,1000);
return true;
}
}
}
else
SendClientMessage(playerid,rot, "Du bist nicht aduty");
return 1;
}
if(dialogid == supcar)
{
if(response)
{
if(listitem == 0)
{
new string[256];
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X,Y,Z);
new carid = CreateVehicle(480, X,Y,Z, 0.0, 149, 149, 60000);
CreatedCars[CreatedCar] = carid;
CreatedCar++;
SetVehicleNumberPlate(carid, "Sup Car");
SetVehicleToRespawn(carid);
PutPlayerInVehicle(playerid, carid, 0);
SetTimerEx("supmotoran",1,0, "i", playerid);
SetTimerEx("suplichtan",2,0, "i", playerid);
sfl5[GetPlayerVehicleID(playerid)] = CreateObject(18646,0,0,-1000,0,0,0,100);
AttachObjectToVehicle(sfl5[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.600000,-1.000000,0.700000,0.000000,0.000000,0.000000);
sfl6[GetPlayerVehicleID(playerid)] = CreateObject(18646,0,0,-1000,0,0,0,100);
AttachObjectToVehicle(sfl6[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.600000,-1.000000,0.700000,0.000000,0.000000,0.000000);
sfl1[GetPlayerVehicleID(playerid)] = CreateObject(19292,0,0,-1000,0,0,0,100);
sfl2[GetPlayerVehicleID(playerid)] = CreateObject(19292,0,0,-1000,0,0,0,100);
sfl3[GetPlayerVehicleID(playerid)] = CreateObject(19290,0,0,-1000,0,0,0,100);
sfl4[GetPlayerVehicleID(playerid)] = CreateObject(19290,0,0,-1000,0,0,0,100);
AttachObjectToVehicle(sfl1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.365000,2.200000,0.049999,0.000000,0.000000,0.000000);
AttachObjectToVehicle(sfl2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.405000,2.200000,0.049999,0.000000,0.000000,0.000000);
AttachObjectToVehicle(sfl3[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.270000,2.200000,0.019999,0.000000,0.000000,0.000000);
AttachObjectToVehicle(sfl4[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.304999,2.200000,0.019999,0.000000,0.000000,0.000000);
SetPVarInt(playerid, "neon", 1);
SetPVarInt(playerid, "pink", CreateObject(18651, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,100.0));
SetPVarInt(playerid, "pink1", CreateObject(18651, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,100.0));
AttachObjectToVehicle(GetPVarInt(playerid, "pink"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "pink1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
SetVehicleHealth(playerid,1000);
SendClientMessage(playerid,0x8C00FFFF, "Du hast ein Comet Sup Car erstellt");
supmobil[playerid] = 1;
new spname[MAX_PLAYER_NAME];
GetPlayerName(playerid, spname, sizeof(spname));
format(string,sizeof(string),"Sup Car von %s", spname);
supcar3d[carid] = Create3DTextLabel(string, 0x8C00FFFF, 0.0, 0.0, 0.0, 50.0, 0, 1 );
Attach3DTextLabelToVehicle( supcar3d[carid] , carid, 0.0, 0.0, 0.0);
return 1;
}
if(listitem == 1)
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X,Y,Z);
new carid = CreateVehicle(560, X,Y,Z, 0.0, 149, 149, 60000);
CreatedCars[CreatedCar] = carid;
CreatedCar++;
SetVehicleNumberPlate(carid, "Sup Car");
SetVehicleToRespawn(carid);
PutPlayerInVehicle(playerid, carid, 0);
SetTimerEx("supmotoran",1,0, "i", playerid);
SetTimerEx("suplichtan",1,0, "i", playerid);
SetPVarInt(playerid, "neon", 1);
SetPVarInt(playerid, "pink", CreateObject(18651, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,100.0));
SetPVarInt(playerid, "pink1", CreateObject(18651, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,100.0));
AttachObjectToVehicle(GetPVarInt(playerid, "pink"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "pink1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
sfl1[GetPlayerVehicleID(playerid)] = CreateObject(19292,0,0,-1000,0,0,0,100);
sfl2[GetPlayerVehicleID(playerid)] = CreateObject(19292,0,0,-1000,0,0,0,100);
sfl3[GetPlayerVehicleID(playerid)] = CreateObject(19290,0,0,-1000,0,0,0,100);
sfl4[GetPlayerVehicleID(playerid)] = CreateObject(19290,0,0,-1000,0,0,0,100);
sfl5[GetPlayerVehicleID(playerid)] = CreateObject(18646,0,0,-1000,0,0,0,100);
AttachObjectToVehicle(sfl1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.365000,2.250000,0.049999,0.000000,0.000000,0.000000);
AttachObjectToVehicle(sfl2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.405000,2.250000,0.049999,0.000000,0.000000,0.000000);
AttachObjectToVehicle(sfl3[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.270000,2.275000,0.019999,0.000000,0.000000,0.000000);
AttachObjectToVehicle(sfl4[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.304999,2.275000,0.019999,0.000000,0.000000,0.000000);
AttachObjectToVehicle(sfl5[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.589999,-0.069999,0.869999,0.000000,0.000000,0.000000);
SetVehicleHealth(playerid,1000);
SendClientMessage(playerid,0x8C00FFFF, "Du hast ein Sultan Sup Car erstellt");
supmobil[playerid] = 1;
new spname[MAX_PLAYER_NAME];
new string[256];
GetPlayerName(playerid, spname, sizeof(spname));
format(string,sizeof(string),"Sup Car von %s", spname);
supcar3d[carid] = Create3DTextLabel(string, 0x8C00FFFF, 0.0, 0.0, 0.0, 50.0, 0, 1 );
Attach3DTextLabelToVehicle( supcar3d[carid] , carid, 0.0, 0.0, 0.0);
return 1;
}
if(listitem == 2)
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X,Y,Z);
new carid = CreateVehicle(586, X,Y,Z, 0.0, 149, 149, 60000);
CreatedCars[CreatedCar] = carid;
CreatedCar++;
SetVehicleNumberPlate(carid, "Sup Car");
SetVehicleToRespawn(carid);
PutPlayerInVehicle(playerid, carid, 0);
SetTimerEx("supmotoran",1,0, "i", playerid);
SetTimerEx("suplichtan",1,0, "i", playerid);
sfl5[GetPlayerVehicleID(playerid)] = CreateObject(18646,0,0,-1000,0,0,0,100);
AttachObjectToVehicle(sfl5[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.000000,-1.200000,0.700000,0.000000,0.000000,0.000000);
SetVehicleHealth(playerid,1000);
SendClientMessage(playerid,0x8C00FFFF, "Du hast ein Wayfarer Sup Car erstellt");
supmobil[playerid] = 1;
new spname[MAX_PLAYER_NAME];
new string[256];
GetPlayerName(playerid, spname, sizeof(spname));
format(string,sizeof(string),"Sup Car von %s", spname);
supcar3d[carid] = Create3DTextLabel(string, 0x8C00FFFF, 0.0, 0.0, 0.0, 50.0, 0, 1 );
Attach3DTextLabelToVehicle( supcar3d[carid] , carid, 0.0, 0.0, 0.0);
return 1;
}
}
}
Sry kann nicht mit pwn das geht dann wieder in eine linie