Hey,
ich habe ein Problem mit meinem Sirenen Befehl, ich möchte gerne das die Sirenen beim: OnVehicleDeath,OnVehicleSpawn & OnPlayerDisconnect
gelöscht werden nun aber Funktioniert es halt nicht ich habe gerade keine Ahnung mehr und bitte euch um Hilfe.
Ich danke euch/Ihnen schon im vorraus.
Sirenen Befehl
if(strcmp(cmd, "/sirene", true) == 0)
{
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pMember] == 22 || PlayerInfo[playerid][pLeader] == 22 && OnDuty[playerid]==1)
{
new vid = GetPlayerVehicleID(playerid);
if((IsACopCar(vid) || IsASWATCar(vid) ||IsAArmyCar(vid)|| IsAFbiCar(vid)) && IsPlayerInAnyVehicle(playerid))
{
if(hatsirene[playerid] == 0)
{
new Float:x,Float:y,Float:z;
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 411)
{
GetPlayerPos(playerid,x,y,z);
SetPVarInt(playerid, "sirene",CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene"), vid, -0.470000,0.139999,0.724999,1.439999,6.300001,67.500007);
SendClientMessage(playerid, COLOR_GRAD1, "Sirene Angebracht!");
hatsirene[playerid] = 1;
sirenenvehicle[GetPlayerVehicleID(playerid)] = playerid;
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 451)
{
GetPlayerPos(playerid,x,y,z);
SetPVarInt(playerid, "sirene",CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene"), vid, -0.460000,-0.349999,0.615000,0.000000,0.000000,0.000000);
SendClientMessage(playerid, COLOR_GRAD1, "Sirene Angebracht!");
hatsirene[playerid] = 1;
sirenenvehicle[GetPlayerVehicleID(playerid)] = playerid;
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 560)
{
GetPlayerPos(playerid,x,y,z);
SetPVarInt(playerid, "sirene",CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene"), vid, -0.599999,0.075000,0.875000,0.000000,0.000000,0.000000);
SendClientMessage(playerid, COLOR_GRAD1, "Sirene Angebracht!");
hatsirene[playerid] = 1;
sirenenvehicle[GetPlayerVehicleID(playerid)] = playerid;
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 421)
{
GetPlayerPos(playerid,x,y,z);
SetPVarInt(playerid, "sirene",CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene"), vid, -0.420000,0.159999,0.750000,0.000000,0.000000,0.000000);
SendClientMessage(playerid, COLOR_GRAD1, "Sirene Angebracht!");
hatsirene[playerid] = 1;
sirenenvehicle[GetPlayerVehicleID(playerid)] = playerid;
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 470)
{
GetPlayerPos(playerid,x,y,z);
SetPVarInt(playerid, "sirene",CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene"), vid, -0.689999,0.029999,1.135000,0.000000,0.000000,0.000000);
SendClientMessage(playerid, COLOR_GRAD1, "Sirene Angebracht!");
hatsirene[playerid] = 1;
sirenenvehicle[GetPlayerVehicleID(playerid)] = playerid;
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 402)
{
GetPlayerPos(playerid,x,y,z);
SetPVarInt(playerid, "sirene",CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene"), vid, -0.420000,-0.450000,0.809997,0.000000,0.000000,0.000000);
SendClientMessage(playerid, COLOR_GRAD1, "Sirene Angebracht!");
hatsirene[playerid] = 1;
sirenenvehicle[GetPlayerVehicleID(playerid)] = playerid;
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 541)
{
GetPlayerPos(playerid,x,y,z);
SetPVarInt(playerid, "sirene",CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene"), vid, -0.380000,0.000000,0.680000,0.000000,0.000000,0.000000);
SendClientMessage(playerid, COLOR_GRAD1, "Sirene Angebracht!");
hatsirene[playerid] = 1;
sirenenvehicle[GetPlayerVehicleID(playerid)] = playerid;
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 507)
{
GetPlayerPos(playerid,x,y,z);
SetPVarInt(playerid, "sirene",CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene"), vid, -0.599999,0.000000,0.830000,-3.239999,-0.000000,0.000000);
SendClientMessage(playerid, COLOR_GRAD1, "Sirene Angebracht!");
hatsirene[playerid] = 1;
sirenenvehicle[GetPlayerVehicleID(playerid)] = playerid;
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 433)
{
GetPlayerPos(playerid,x,y,z);
SetPVarInt(playerid, "sirene",CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene"),vid, 0.000000,1.350000,1.054999,0.000000,0.000000,0.000000);
SendClientMessage(playerid, COLOR_GRAD1, "Sirene Angebracht!");
hatsirene[playerid] = 1;
sirenenvehicle[GetPlayerVehicleID(playerid)] = playerid;
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 415)
{
GetPlayerPos(playerid,x,y,z);
SetPVarInt(playerid, "sirene",CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene"), vid, -0.400000,-0.150000,0.650000,-8.100001,-2.699999,-18.899980);
SendClientMessage(playerid, COLOR_GRAD1, "Sirene Angebracht!");
hatsirene[playerid] = 1;
sirenenvehicle[GetPlayerVehicleID(playerid)] = playerid;
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 427)
{
GetPlayerPos(playerid,x,y,z);
SetPVarInt(playerid, "sirene",CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene"), vid, -0.889999,0.150000,1.700000,0.000000,0.000000,0.000000);
SetPVarInt(playerid, "sirene1",CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene1"), vid, 0.899999,0.150000,1.700000,0.000000,0.000000,0.000000);
SetPVarInt(playerid, "sirene2",CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene2"),vid, 0.899999,-3.185001,1.700000,0.000000,0.000000,0.000000);
SetPVarInt(playerid, "sirene3",CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene3"), vid, -0.899999,-3.185001,1.700000,0.000000,0.000000,0.000000);
SendClientMessage(playerid, COLOR_GRAD1, "Sirene Angebracht!");
hatsirene[playerid] = 1;
sirenenvehicle[GetPlayerVehicleID(playerid)] = playerid;
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 426)
{
GetPlayerPos(playerid,x,y,z);
SetPVarInt(playerid, "sirene",CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene"),vid, -0.539999,0.000000,0.850000,0.000000,-2.700002,0.000000);
SendClientMessage(playerid, COLOR_GRAD1, "Sirene Angebracht!");
hatsirene[playerid] = 1;
sirenenvehicle[GetPlayerVehicleID(playerid)] = playerid;
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 528)
{
GetPlayerPos(playerid,x,y,z);
SetPVarInt(playerid, "sirene",CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene"),vid, 0.305000,0.739999,0.609999,0.000000,0.000000,-0.000001);
SendClientMessage(playerid, COLOR_GRAD1, "Sirene Angebracht!");
hatsirene[playerid] = 1;
sirenenvehicle[GetPlayerVehicleID(playerid)] = playerid;
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 428)
{
GetPlayerPos(playerid,x,y,z);
SetPVarInt(playerid, "sirene",CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene"),vid, 0.950000,1.069999,1.340000,0.000000,0.000000,0.000000);
SetPVarInt(playerid, "sirene1",CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene1"), vid, -0.934999,1.069999,1.340000,0.000000,0.000000,0.000000);
SendClientMessage(playerid, COLOR_GRAD1, "Sirene Angebracht!");
hatsirene[playerid] = 1;
sirenenvehicle[GetPlayerVehicleID(playerid)] = playerid;
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 601)
{
GetPlayerPos(playerid,x,y,z);
SetPVarInt(playerid, "sirene",CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene"),vid, 0.529999,-2.450000,1.439999,-3.960001,-5.940001,-234.719818);
SetPVarInt(playerid, "sirene1",CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene1"),vid, -0.539999,1.500000,1.540000,-3.960001,1.619993,-234.719818);
SendClientMessage(playerid, COLOR_GRAD1, "Sirene Angebracht!");
hatsirene[playerid] = 1;
sirenenvehicle[GetPlayerVehicleID(playerid)] = playerid;
}
return 1;
}
if(hatsirene[playerid] == 1)
{
if(!IsPlayerInAnyVehicle(playerid))
return SendClientMessage(playerid, COLOR_RED,"Du musst in deinem altem Auto sitzen um das zu machen!");
{
DestroyObject(GetPVarInt(playerid, "sirene"));
DestroyObject(GetPVarInt(playerid, "sirene1"));
DestroyObject(GetPVarInt(playerid, "sirene2"));
DestroyObject(GetPVarInt(playerid, "sirene3"));
SendClientMessage(playerid, COLOR_GRAD1, "Sirene Abgebaut!");
hatsirene[playerid] = 0;
}
return 1;
}
else
{
SendClientMessage(playerid,COLOR_YELLOW,"Du gehörst nicht der Fraktion LSPD,SWAT,FBI oder Army an");
return 1;
}
}
else
{
SendClientMessage(playerid,COLOR_YELLOW,"Du sitzt in keinem Staatsauto!");
return 1;
}
}
else
{
SendClientMessage(playerid,COLOR_YELLOW,"Du gehörst keiner Staatsfraktion an oder bist nicht Duty");
}
return 1;
}
if(strcmp(cmd, "/msirene", true) == 0)
{
if(PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4 && JobDuty[playerid] == 1)
{
new vid = GetPlayerVehicleID(playerid);
if(IsAMedicCar(vid) && IsPlayerInAnyVehicle(playerid))
{
if(hatsirene[playerid] == 0)
{
new Float:x,Float:y,Float:z;
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 560)
{
GetPlayerPos(playerid,x,y,z);
SetPVarInt(playerid, "sirene",CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene"), vid, -0.585000,0.000000,1.220000,0.000000,0.000000,0.000000);
SendClientMessage(playerid, COLOR_GRAD1, "Sirene Angebracht!");
hatsirene[playerid] = 1;
sirenenvehicle[GetPlayerVehicleID(playerid)] = playerid;
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 426)
{
GetPlayerPos(playerid,x,y,z);
SetPVarInt(playerid, "sirene",CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene"),vid, -0.539999,0.000000,0.850000,0.000000,-2.700002,0.000000);
SendClientMessage(playerid, COLOR_GRAD1, "Sirene Angebracht!");
hatsirene[playerid] = 1;
sirenenvehicle[GetPlayerVehicleID(playerid)] = playerid;
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 428)
{
GetPlayerPos(playerid,x,y,z);
SetPVarInt(playerid, "sirene",CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene"),vid, 0.950000,1.069999,1.340000,0.000000,0.000000,0.000000);
SetPVarInt(playerid, "sirene1",CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene1"), vid, -0.934999,1.069999,1.340000,0.000000,0.000000,0.000000);
SendClientMessage(playerid, COLOR_GRAD1, "Sirene Angebracht!");
hatsirene[playerid] = 1;
sirenenvehicle[GetPlayerVehicleID(playerid)] = playerid;
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 544)
{
GetPlayerPos(playerid,x,y,z);
SetPVarInt(playerid, "sirene", CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene"), vid, -0.939999,2.735000,1.480000,0.000000,0.000000,0.000000);
SetPVarInt(playerid, "sirene1", CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene1"), vid, 0.944999,2.735000,1.480000,0.000000,0.000000,0.000000);
SendClientMessage(playerid, COLOR_GRAD1, "Sirene Angebracht!");
hatsirene[playerid] = 1;
sirenenvehicle[GetPlayerVehicleID(playerid)] = playerid;
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 561)
{
GetPlayerPos(playerid,x,y,z);
SetPVarInt(playerid, "sirene", CreateObject(18646,0,0,-1000,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene"), vid, -0.449999,0.174999,0.764999,-3.239999,0.000000,0.000000);
SendClientMessage(playerid, COLOR_GRAD1, "Sirene Angebracht!");
hatsirene[playerid] = 1;
sirenenvehicle[GetPlayerVehicleID(playerid)] = playerid;
}
return 1;
}
if(hatsirene[playerid] == 1)
{
if(!IsPlayerInAnyVehicle(playerid))
return SendClientMessage(playerid, COLOR_RED,"Du musst in dem Auto sitzen wo du um das zu machen!");
{
DestroyObject(GetPVarInt(playerid, "sirene"));
DestroyObject(GetPVarInt(playerid, "sirene1"));
DestroyObject(GetPVarInt(playerid, "sirene2"));
DestroyObject(GetPVarInt(playerid, "sirene3"));
SendClientMessage(playerid, COLOR_GRAD1, "Sirene Abgebaut!");
hatsirene[playerid] = 0;
}
return 1;
}
else
{
SendClientMessage(playerid,COLOR_YELLOW,"Du bist nicht in der Fraktion der Medics oder bist Offduty!");
return 1;
}
}
else
{
SendClientMessage(playerid,COLOR_YELLOW,"Du sitzt in keinem Medicauto!");
return 1;
}
}
else
{
SendClientMessage(playerid,COLOR_YELLOW,"Du bist nicht in der Fraktion der Medics oder bist Offduty!");
}
return 1;
}if(strcmp(cmd, "/sirene", true) == 0)
{
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pMember] == 22 || PlayerInfo[playerid][pLeader] == 22 && OnDuty[playerid]==1)
{
new vid = GetPlayerVehicleID(playerid);
if((IsACopCar(vid) || IsASWATCar(vid) ||IsAArmyCar(vid)|| IsAFbiCar(vid)) && IsPlayerInAnyVehicle(playerid))
{
if(hatsirene[playerid] == 0)
{
new Float:x,Float:y,Float:z;
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 411)
{
GetPlayerPos(playerid,x,y,z);
SetPVarInt(playerid, "sirene",CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene"), vid, -0.470000,0.139999,0.724999,1.439999,6.300001,67.500007);
SendClientMessage(playerid, COLOR_GRAD1, "Sirene Angebracht!");
hatsirene[playerid] = 1;
sirenenvehicle[GetPlayerVehicleID(playerid)] = playerid;
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 451)
{
GetPlayerPos(playerid,x,y,z);
SetPVarInt(playerid, "sirene",CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene"), vid, -0.460000,-0.349999,0.615000,0.000000,0.000000,0.000000);
SendClientMessage(playerid, COLOR_GRAD1, "Sirene Angebracht!");
hatsirene[playerid] = 1;
sirenenvehicle[GetPlayerVehicleID(playerid)] = playerid;
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 560)
{
GetPlayerPos(playerid,x,y,z);
SetPVarInt(playerid, "sirene",CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene"), vid, -0.599999,0.075000,0.875000,0.000000,0.000000,0.000000);
SendClientMessage(playerid, COLOR_GRAD1, "Sirene Angebracht!");
hatsirene[playerid] = 1;
sirenenvehicle[GetPlayerVehicleID(playerid)] = playerid;
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 421)
{
GetPlayerPos(playerid,x,y,z);
SetPVarInt(playerid, "sirene",CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene"), vid, -0.420000,0.159999,0.750000,0.000000,0.000000,0.000000);
SendClientMessage(playerid, COLOR_GRAD1, "Sirene Angebracht!");
hatsirene[playerid] = 1;
sirenenvehicle[GetPlayerVehicleID(playerid)] = playerid;
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 470)
{
GetPlayerPos(playerid,x,y,z);
SetPVarInt(playerid, "sirene",CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene"), vid, -0.689999,0.029999,1.135000,0.000000,0.000000,0.000000);
SendClientMessage(playerid, COLOR_GRAD1, "Sirene Angebracht!");
hatsirene[playerid] = 1;
sirenenvehicle[GetPlayerVehicleID(playerid)] = playerid;
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 402)
{
GetPlayerPos(playerid,x,y,z);
SetPVarInt(playerid, "sirene",CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene"), vid, -0.420000,-0.450000,0.809997,0.000000,0.000000,0.000000);
SendClientMessage(playerid, COLOR_GRAD1, "Sirene Angebracht!");
hatsirene[playerid] = 1;
sirenenvehicle[GetPlayerVehicleID(playerid)] = playerid;
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 541)
{
GetPlayerPos(playerid,x,y,z);
SetPVarInt(playerid, "sirene",CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene"), vid, -0.380000,0.000000,0.680000,0.000000,0.000000,0.000000);
SendClientMessage(playerid, COLOR_GRAD1, "Sirene Angebracht!");
hatsirene[playerid] = 1;
sirenenvehicle[GetPlayerVehicleID(playerid)] = playerid;
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 507)
{
GetPlayerPos(playerid,x,y,z);
SetPVarInt(playerid, "sirene",CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene"), vid, -0.599999,0.000000,0.830000,-3.239999,-0.000000,0.000000);
SendClientMessage(playerid, COLOR_GRAD1, "Sirene Angebracht!");
hatsirene[playerid] = 1;
sirenenvehicle[GetPlayerVehicleID(playerid)] = playerid;
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 433)
{
GetPlayerPos(playerid,x,y,z);
SetPVarInt(playerid, "sirene",CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene"),vid, 0.000000,1.350000,1.054999,0.000000,0.000000,0.000000);
SendClientMessage(playerid, COLOR_GRAD1, "Sirene Angebracht!");
hatsirene[playerid] = 1;
sirenenvehicle[GetPlayerVehicleID(playerid)] = playerid;
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 415)
{
GetPlayerPos(playerid,x,y,z);
SetPVarInt(playerid, "sirene",CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene"), vid, -0.400000,-0.150000,0.650000,-8.100001,-2.699999,-18.899980);
SendClientMessage(playerid, COLOR_GRAD1, "Sirene Angebracht!");
hatsirene[playerid] = 1;
sirenenvehicle[GetPlayerVehicleID(playerid)] = playerid;
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 427)
{
GetPlayerPos(playerid,x,y,z);
SetPVarInt(playerid, "sirene",CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene"), vid, -0.889999,0.150000,1.700000,0.000000,0.000000,0.000000);
SetPVarInt(playerid, "sirene1",CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene1"), vid, 0.899999,0.150000,1.700000,0.000000,0.000000,0.000000);
SetPVarInt(playerid, "sirene2",CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene2"),vid, 0.899999,-3.185001,1.700000,0.000000,0.000000,0.000000);
SetPVarInt(playerid, "sirene3",CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene3"), vid, -0.899999,-3.185001,1.700000,0.000000,0.000000,0.000000);
SendClientMessage(playerid, COLOR_GRAD1, "Sirene Angebracht!");
hatsirene[playerid] = 1;
sirenenvehicle[GetPlayerVehicleID(playerid)] = playerid;
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 426)
{
GetPlayerPos(playerid,x,y,z);
SetPVarInt(playerid, "sirene",CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene"),vid, -0.539999,0.000000,0.850000,0.000000,-2.700002,0.000000);
SendClientMessage(playerid, COLOR_GRAD1, "Sirene Angebracht!");
hatsirene[playerid] = 1;
sirenenvehicle[GetPlayerVehicleID(playerid)] = playerid;
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 528)
{
GetPlayerPos(playerid,x,y,z);
SetPVarInt(playerid, "sirene",CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene"),vid, 0.305000,0.739999,0.609999,0.000000,0.000000,-0.000001);
SendClientMessage(playerid, COLOR_GRAD1, "Sirene Angebracht!");
hatsirene[playerid] = 1;
sirenenvehicle[GetPlayerVehicleID(playerid)] = playerid;
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 428)
{
GetPlayerPos(playerid,x,y,z);
SetPVarInt(playerid, "sirene",CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene"),vid, 0.950000,1.069999,1.340000,0.000000,0.000000,0.000000);
SetPVarInt(playerid, "sirene1",CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene1"), vid, -0.934999,1.069999,1.340000,0.000000,0.000000,0.000000);
SendClientMessage(playerid, COLOR_GRAD1, "Sirene Angebracht!");
hatsirene[playerid] = 1;
sirenenvehicle[GetPlayerVehicleID(playerid)] = playerid;
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 601)
{
GetPlayerPos(playerid,x,y,z);
SetPVarInt(playerid, "sirene",CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene"),vid, 0.529999,-2.450000,1.439999,-3.960001,-5.940001,-234.719818);
SetPVarInt(playerid, "sirene1",CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene1"),vid, -0.539999,1.500000,1.540000,-3.960001,1.619993,-234.719818);
SendClientMessage(playerid, COLOR_GRAD1, "Sirene Angebracht!");
hatsirene[playerid] = 1;
sirenenvehicle[GetPlayerVehicleID(playerid)] = playerid;
}
return 1;
}
if(hatsirene[playerid] == 1)
{
if(!IsPlayerInAnyVehicle(playerid))
return SendClientMessage(playerid, COLOR_RED,"Du musst in deinem altem Auto sitzen um das zu machen!");
{
DestroyObject(GetPVarInt(playerid, "sirene"));
DestroyObject(GetPVarInt(playerid, "sirene1"));
DestroyObject(GetPVarInt(playerid, "sirene2"));
DestroyObject(GetPVarInt(playerid, "sirene3"));
SendClientMessage(playerid, COLOR_GRAD1, "Sirene Abgebaut!");
hatsirene[playerid] = 0;
}
return 1;
}
else
{
SendClientMessage(playerid,COLOR_YELLOW,"Du gehörst nicht der Fraktion LSPD,SWAT,FBI oder Army an");
return 1;
}
}
else
{
SendClientMessage(playerid,COLOR_YELLOW,"Du sitzt in keinem Staatsauto!");
return 1;
}
}
else
{
SendClientMessage(playerid,COLOR_YELLOW,"Du gehörst keiner Staatsfraktion an oder bist nicht Duty");
}
return 1;
}
if(strcmp(cmd, "/msirene", true) == 0)
{
if(PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4 && JobDuty[playerid] == 1)
{
new vid = GetPlayerVehicleID(playerid);
if(IsAMedicCar(vid) && IsPlayerInAnyVehicle(playerid))
{
if(hatsirene[playerid] == 0)
{
new Float:x,Float:y,Float:z;
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 560)
{
GetPlayerPos(playerid,x,y,z);
SetPVarInt(playerid, "sirene",CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene"), vid, -0.585000,0.000000,1.220000,0.000000,0.000000,0.000000);
SendClientMessage(playerid, COLOR_GRAD1, "Sirene Angebracht!");
hatsirene[playerid] = 1;
sirenenvehicle[GetPlayerVehicleID(playerid)] = playerid;
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 426)
{
GetPlayerPos(playerid,x,y,z);
SetPVarInt(playerid, "sirene",CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene"),vid, -0.539999,0.000000,0.850000,0.000000,-2.700002,0.000000);
SendClientMessage(playerid, COLOR_GRAD1, "Sirene Angebracht!");
hatsirene[playerid] = 1;
sirenenvehicle[GetPlayerVehicleID(playerid)] = playerid;
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 428)
{
GetPlayerPos(playerid,x,y,z);
SetPVarInt(playerid, "sirene",CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene"),vid, 0.950000,1.069999,1.340000,0.000000,0.000000,0.000000);
SetPVarInt(playerid, "sirene1",CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene1"), vid, -0.934999,1.069999,1.340000,0.000000,0.000000,0.000000);
SendClientMessage(playerid, COLOR_GRAD1, "Sirene Angebracht!");
hatsirene[playerid] = 1;
sirenenvehicle[GetPlayerVehicleID(playerid)] = playerid;
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 544)
{
GetPlayerPos(playerid,x,y,z);
SetPVarInt(playerid, "sirene", CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene"), vid, -0.939999,2.735000,1.480000,0.000000,0.000000,0.000000);
SetPVarInt(playerid, "sirene1", CreateObject(18646,x,y,z,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene1"), vid, 0.944999,2.735000,1.480000,0.000000,0.000000,0.000000);
SendClientMessage(playerid, COLOR_GRAD1, "Sirene Angebracht!");
hatsirene[playerid] = 1;
sirenenvehicle[GetPlayerVehicleID(playerid)] = playerid;
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 561)
{
GetPlayerPos(playerid,x,y,z);
SetPVarInt(playerid, "sirene", CreateObject(18646,0,0,-1000,0,0,0,100));
AttachObjectToVehicle(GetPVarInt(playerid, "sirene"), vid, -0.449999,0.174999,0.764999,-3.239999,0.000000,0.000000);
SendClientMessage(playerid, COLOR_GRAD1, "Sirene Angebracht!");
hatsirene[playerid] = 1;
sirenenvehicle[GetPlayerVehicleID(playerid)] = playerid;
}
return 1;
}
if(hatsirene[playerid] == 1)
{
if(!IsPlayerInAnyVehicle(playerid))
return SendClientMessage(playerid, COLOR_RED,"Du musst in dem Auto sitzen wo du um das zu machen!");
{
DestroyObject(GetPVarInt(playerid, "sirene"));
DestroyObject(GetPVarInt(playerid, "sirene1"));
DestroyObject(GetPVarInt(playerid, "sirene2"));
DestroyObject(GetPVarInt(playerid, "sirene3"));
SendClientMessage(playerid, COLOR_GRAD1, "Sirene Abgebaut!");
hatsirene[playerid] = 0;
}
return 1;
}
else
{
SendClientMessage(playerid,COLOR_YELLOW,"Du bist nicht in der Fraktion der Medics oder bist Offduty!");
return 1;
}
}
else
{
SendClientMessage(playerid,COLOR_YELLOW,"Du sitzt in keinem Medicauto!");
return 1;
}
}
else
{
SendClientMessage(playerid,COLOR_YELLOW,"Du bist nicht in der Fraktion der Medics oder bist Offduty!");
}
return 1;
}
Function OnVehicleSpawn(vehicleid)
{
Gas[vehicleid] = GetGasMax(vehicleid);
DestroyObject(taxif[vehicleid]);
taxifan[vehicleid] =false;
DestroyObject(supsirene[vehicleid]);
DestroyObject(GetPVarInt(sirenenvehicle[vehicleid], "neon"));
DestroyObject(GetPVarInt(sirenenvehicle[vehicleid], "neon1"));
HatSchonNeon[sirenenvehicle[vehicleid]] = 0;
DestroyObject(GetPVarInt(sirenenvehicle[vehicleid], "sirene"));
DestroyObject(GetPVarInt(sirenenvehicle[vehicleid], "sirene1"));
DestroyObject(GetPVarInt(sirenenvehicle[vehicleid], "sirene2"));
DestroyObject(GetPVarInt(sirenenvehicle[vehicleid], "sirene3"));
hatsirene[sirenenvehicle[vehicleid]] = 0;
DestroyObject(GetPVarInt(sirenenvehicle[vehicleid], "gelblicht"));
DestroyObject(GetPVarInt(sirenenvehicle[vehicleid], "gelblicht1"));
gcl[sirenenvehicle[vehicleid]] = 0;
for(new playerid = 0; playerid < MAX_PLAYERS; playerid++)
{
for(new x = 0; x < MaxVeh; x++)
{
if(IsPlayerConnected(playerid) && Dtc_PlayerHaveCar[playerid][x])
{
if (vehicleid == PlayerCar[playerid][x][CarId])
{
SetTimerEx("CarTuning",700,0,"ii",playerid,x);
}
}
}
}
return 1;
}
Function OnVehicleDeath(vehicleid,killerid)
{
DestroyObject(taxif[vehicleid]);
taxifan[vehicleid] =false;
DestroyObject(supsirene[vehicleid]);
FRAC_OnVehicleDeath(vehicleid, killerid);
DestroyObject(GetPVarInt(sirenenvehicle[vehicleid], "neon"));
DestroyObject(GetPVarInt(sirenenvehicle[vehicleid], "neon1"));
HatSchonNeon[sirenenvehicle[vehicleid]] = 0;
DestroyObject(GetPVarInt(sirenenvehicle[vehicleid], "sirene"));
DestroyObject(GetPVarInt(sirenenvehicle[vehicleid], "sirene1"));
DestroyObject(GetPVarInt(sirenenvehicle[vehicleid], "sirene2"));
DestroyObject(GetPVarInt(sirenenvehicle[vehicleid], "sirene3"));
hatsirene[sirenenvehicle[vehicleid]] = 0;
DestroyObject(GetPVarInt(sirenenvehicle[vehicleid], "gelblicht"));
DestroyObject(GetPVarInt(sirenenvehicle[vehicleid], "gelblicht1"));
gcl[sirenenvehicle[vehicleid]] = 0;
for(new playerid = 0; playerid < MAX_PLAYERS; playerid++)
{
for(new x = 0; x < MaxVeh; x++)
{
if(IsPlayerConnected(playerid) && Dtc_PlayerHaveCar[playerid][x])
{
if (vehicleid == PlayerCar[playerid][x][CarId])
{
DestroyVehicle(PlayerCar[playerid][x][CarId]);
PlayerCarSpawn(playerid,x);
}
}
}
}
return 1;
}
Function OnPlayerDisconnect(playerid, reason)
{
//TextDrawHideForPlayer(playerid, Respekt[playerid]);
//TextDrawDestroy(Respekt[playerid]);
//PlayerTextDrawDestroy(playerid, Respekt[playerid]);
// ist auf dem desk
// if(Desktop_Timer_Started[playerid] == 1) { KillTimer(Desktop_Timer[playerid]); }
DestroyObject(GetPVarInt(playerid, "sirene"));
DestroyObject(GetPVarInt(playerid, "sirene1"));
DestroyObject(GetPVarInt(playerid, "sirene2"));
DestroyObject(GetPVarInt(playerid, "sirene3"));
hatsirene[playerid] = 0;
// ist auf dem desk ende
DestroyObject(taxif[GetPlayerVehicleID(playerid)]);
taxifan[GetPlayerVehicleID(playerid)] =false;
DestroyObject(GetPVarInt(playerid, "neon"));
DestroyObject(GetPVarInt(playerid, "neon1"));
HatSchonNeon[playerid] = 0;
DestroyObject(GetPVarInt(playerid, "gelblicht"));
DestroyObject(GetPVarInt(playerid, "gelblicht1"));