Wenn ich /sirene eingebe, sollte die Sirene am Auto sein, dass funktioniert auch alles. Wenn ich aber dann noch mal /sirene eingebe, dann soll die wieder weggehen, aber es geht nicht:
stock Sirene(playerid)
{
new sirene[MAX_PLAYERS],siren[MAX_VEHICLES],vehicleid = GetPlayerVehicleID(playerid);
if(sirene[playerid] == 0)
{
siren[vehicleid] = CreateObject(18646,0.0,0.0,0.0,0.0,0.0,0.0);
AttachObjectToVehicle(siren[vehicleid],vehicleid,0.0,0.100,0.750,0.0,0.1,0.0);
siren[vehicleid] = 1;
return 1;
}
if(sirene[playerid] == 1)
{
DestroyObject(siren[vehicleid]);
siren[vehicleid] = 0;
return 1;
}
return 1;
}
if(GetPlayerVehicleID(playerid) == sultan[0] || sultan[1])
{
Sirene(playerid);
}