Nein bringt leider nix, jetzt stürzt der Pawno ab /blcop
Hier nochmal der komplette Code
if(strcmp(cmdtext, "/blcop",true) == 0)
{
if(UCL[GetPlayerVehicleID(playerid)] == 0)
{
new tmpcar = GetPlayerVehicleID(playerid);
if(GetVehicleModel(tmpcar) == 560)
{
sirene[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
sirene1[GetPlayerVehicleID(playerid)] = CreateDynamicObject(18646,0,0,0,0,0,0,100);
sirene2[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
sirene3[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
sirene4[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19292,0,0,0,0,0,0,100);
AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0 ,2.6,0,0,0,0);//Vorne Mitte
AttachObjectToVehicle(sirene1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.5,0.0,0.85,0,0,0);//Dach sirene
AttachObjectToVehicle(sirene2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.7,2.6,0,0,0,0);//Vorne Licht Beifahrerseite
AttachObjectToVehicle(sirene3[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.7,2.6,0,0,0,0);//Vorne Licht Fahrerseite
AttachObjectToVehicle(sirene4[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0,0.9,0.4,0,0,0);//Mittig im Fenster
UCL[GetPlayerVehicleID(playerid)] = 1;
return 1;
}
else if(GetVehicleModel(tmpcar) == 415)
{
sirene[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
sirene1[GetPlayerVehicleID(playerid)] = CreateDynamicObject(18646,0,0,0,0,0,0,100);
sirene2[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
sirene3[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0 ,2.6,0,0,0,0);//Vorne Mitte
AttachObjectToVehicle(sirene1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.4,-0.2,0.65,0,0,0);//Dach sirene
AttachObjectToVehicle(sirene2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.7,2.6,0,0,0,0);//Vorne Licht Beifahrerseite
AttachObjectToVehicle(sirene3[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.7,2.6,0,0,0,0);//Vorne Licht Fahrerseite
UCL[GetPlayerVehicleID(playerid)] = 1;
return 1;
}
else if(GetVehicleModel(tmpcar) == 451)
{
sirene[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
sirene1[GetPlayerVehicleID(playerid)] = CreateDynamicObject(18646,0,0,0,0,0,0,100);
sirene2[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
sirene3[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0 ,2.6,0,0,0,0);//Vorne Mitte
AttachObjectToVehicle(sirene1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.45,-0.3,0.6,0,0,0);//Dach sirene
AttachObjectToVehicle(sirene2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.7,2.6,0,0,0,0);//Vorne Licht Beifahrerseite
AttachObjectToVehicle(sirene3[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.7,2.6,0,0,0,0);//Vorne Licht Fahrerseite
UCL[GetPlayerVehicleID(playerid)] = 1;
return 1;
}
else if(GetVehicleModel(tmpcar) == 541)
{
sirene[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
sirene1[GetPlayerVehicleID(playerid)] = CreateDynamicObject(18646,0,0,0,0,0,0,100);
sirene2[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
sirene3[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0 ,2.6,0,0,0,0);//Vorne Mitte
AttachObjectToVehicle(sirene1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.45,-0.1,0.65,0,0,0);//Dach sirene
AttachObjectToVehicle(sirene2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.7,2.6,0,0,0,0);//Vorne Licht Beifahrerseite
AttachObjectToVehicle(sirene3[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.7,2.6,0,0,0,0);//Vorne Licht Fahrerseite
UCL[GetPlayerVehicleID(playerid)] = 1;
return 1;
}
else if(GetVehicleModel(tmpcar) == 470)
{
sirene[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
sirene1[GetPlayerVehicleID(playerid)] = CreateDynamicObject(18646,0,0,0,0,0,0,100);
sirene2[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
sirene3[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0 ,2.6,0,0,0,0);//Vorne Mitte
AttachObjectToVehicle(sirene1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.6,0.2,1.1,0,0,0);//Dach sirene
AttachObjectToVehicle(sirene2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.7,2.6,0,0,0,0);//Vorne Licht Beifahrerseite
AttachObjectToVehicle(sirene3[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.7,2.6,0,0,0,0);//Vorne Licht Fahrerseite
UCL[GetPlayerVehicleID(playerid)] = 1;
return 1;
}
else if(GetVehicleModel(tmpcar) == 421)
{
sirene[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
sirene1[GetPlayerVehicleID(playerid)] = CreateDynamicObject(18646,0,0,0,0,0,0,100);
sirene2[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
sirene3[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0 ,2.6,0,0,0,0);//Vorne Mitte
AttachObjectToVehicle(sirene1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.4,0.2,0.72,0,0,0);//Dach sirene
AttachObjectToVehicle(sirene2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.7,2.6,0,0,0,0);//Vorne Licht Beifahrerseite
AttachObjectToVehicle(sirene3[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.7,2.6,0,0,0,0);//Vorne Licht Fahrerseite
UCL[GetPlayerVehicleID(playerid)] = 1;
return 1;
}
else if(GetVehicleModel(tmpcar) == 405)
{
sirene[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
sirene1[GetPlayerVehicleID(playerid)] = CreateDynamicObject(18646,0,0,0,0,0,0,100);
sirene2[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
sirene3[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0 ,2.6,0,0,0,0);//Vorne Mitte
AttachObjectToVehicle(sirene1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.4,0,0.78,0,0,0);//Dach sirene
AttachObjectToVehicle(sirene2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.7,2.6,0,0,0,0);//Vorne Licht Beifahrerseite
AttachObjectToVehicle(sirene3[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.7,2.6,0,0,0,0);//Vorne Licht Fahrerseite
UCL[GetPlayerVehicleID(playerid)] = 1;
return 1;
}
else if(GetVehicleModel(tmpcar) == 426)
{
sirene[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
sirene1[GetPlayerVehicleID(playerid)] = CreateDynamicObject(18646,0,0,0,0,0,0,100);
sirene2[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
sirene3[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0 ,2.6,0,0,0,0);//Vorne Mitte
AttachObjectToVehicle(sirene1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.5,0,0.88,0,0,0);//Dach sirene
AttachObjectToVehicle(sirene2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.7,2.6,0,0,0,0);//Vorne Licht Beifahrerseite
AttachObjectToVehicle(sirene3[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.7,2.6,0,0,0,0);//Vorne Licht Fahrerseite
UCL[GetPlayerVehicleID(playerid)] = 1;
return 1;
}
else if(GetVehicleModel(tmpcar) == 517)
{
sirene[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
sirene1[GetPlayerVehicleID(playerid)] = CreateDynamicObject(18646,0,0,0,0,0,0,100);
sirene2[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
sirene3[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0 ,2.6,0,0,0,0);//Vorne Mitte
AttachObjectToVehicle(sirene1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.6,0,0.85,0,0,0);//Dach sirene
AttachObjectToVehicle(sirene2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.7,2.6,0,0,0,0);//Vorne Licht Beifahrerseite
AttachObjectToVehicle(sirene3[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.7,2.6,0,0,0,0);//Vorne Licht Fahrerseite
UCL[GetPlayerVehicleID(playerid)] = 1;
return 1;
}
else if(GetVehicleModel(tmpcar) == 598)
{
sirene[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
sirene2[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
sirene3[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0 ,2.6,0,0,0,0);//Vorne Mitte
AttachObjectToVehicle(sirene2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.7,2.6,0,0,0,0);//Vorne Licht Beifahrerseite
AttachObjectToVehicle(sirene3[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.7,2.6,0,0,0,0);//Vorne Licht Fahrerseite
UCL[GetPlayerVehicleID(playerid)] = 1;
return 1;
}
else if(GetVehicleModel(tmpcar) == 597)
{
sirene[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
sirene2[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
sirene3[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0 ,2.6,0,0,0,0);//Vorne Mitte
AttachObjectToVehicle(sirene2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.7,2.6,0,0,0,0);//Vorne Licht Beifahrerseite
AttachObjectToVehicle(sirene3[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.7,2.6,0,0,0,0);//Vorne Licht Fahrerseite
UCL[GetPlayerVehicleID(playerid)] = 1;
return 1;
}
else if(GetVehicleModel(tmpcar) == 596)
{
sirene[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
sirene2[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
sirene3[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0 ,2.6,0,0,0,0);//Vorne Mitte
AttachObjectToVehicle(sirene2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.7,2.6,0,0,0,0);//Vorne Licht Beifahrerseite
AttachObjectToVehicle(sirene3[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.7,2.6,0,0,0,0);//Vorne Licht Fahrerseite
UCL[GetPlayerVehicleID(playerid)] = 1;
return 1;
}
else if(GetVehicleModel(tmpcar) == 411)
{
sirene[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
sirene1[GetPlayerVehicleID(playerid)] = CreateDynamicObject(18646,0,0,0,0,0,0,100);
sirene2[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
sirene3[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0 ,2.6,0,0,0,0);//Vorne Mitte
AttachObjectToVehicle(sirene1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.44,0.3,0.7,0,0,0);//Dach sirene
AttachObjectToVehicle(sirene2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.7,2.6,0,0,0,0);//Vorne Licht Beifahrerseite
AttachObjectToVehicle(sirene3[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.7,2.6,0,0,0,0);//Vorne Licht Fahrerseite
UCL[GetPlayerVehicleID(playerid)] = 1;
return 1;
}
else if(GetVehicleModel(tmpcar) == 561)
{
sirene[GetPlayerVehicleID(playerid)] = CreateDynamicObject(18646,0,0,0,0,0,0,100);
sirene1[GetPlayerVehicleID(playerid)] = CreateDynamicObject(18646,0,0,0,0,0,0,100);
AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.4,0.1,0.85,0,0,0);//Dach Beifahrer
AttachObjectToVehicle(sirene1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.4,0.1,0.85,0,0,0);//Dach Fahrer
UCL[GetPlayerVehicleID(playerid)] = 1;
return 1;
}
}
else if(UCL[GetPlayerVehicleID(playerid)] == 1)
{
DestroyObject(sirene[GetPlayerVehicleID(playerid)]);
DestroyObject(sirene1[GetPlayerVehicleID(playerid)]);
DestroyObject(sirene2[GetPlayerVehicleID(playerid)]);
DestroyObject(sirene3[GetPlayerVehicleID(playerid)]);
DestroyObject(sirene4[GetPlayerVehicleID(playerid)]);
UCL[GetPlayerVehicleID(playerid)] = 0;
return 1;
}
}
Jetzt weiß ich gar nix mehr, jetzt stürzt komplett Pawno ab, sobald ich den Befehl rausnehmen, geht es wieder also muss es ja an dem /hack liegen
if(strcmp(cmd, "/hack", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (IsACopCar(carid))
{
SendClientMessage(playerid,0xFEFEFEFF,"Du bist nicht in einem Copcar!");
return 1;
}
if(IsACop(playerid) && OnDuty[playerid] == 1)onduty++;
}
if(onduty<1)return SendClientMessage(playerid,0x0000FFFF,"Es sind keine 2 Cops Im Dienst!");
}
FreezePlayer(playerid);
SetTimer("HACK", 60000, 0);
SendClientMessage(playerid,0xFFFF00FF,"Du hackst dich in den Polizeicomputer!");
SendClientMessage(playerid,0xFFFF00FF,"DU HAST EINEN FEHLER BEGANGEN UND DIE COPS WURDEN ALARMIERT");
SendClientMessage(playerid,0xFFFF00FF,"ERFOLGREICH EINGEHACKT !");
TogglePlayerControllable(playerid, 0);
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsACop(i) && OnDuty[i] == 1)
{
SendClientMessage(i,TEAM_BLUE_COLOR,"HQ: Achtung Alle Einheiten! Ein Copcar wurde gehackt!");
SendClientMessage(i,TEAM_BLUE_COLOR,"HQ: Verbrechen: Hacking, Gesuchter: Unbekannt");
SendClientMessage(i,TEAM_BLUE_COLOR,"HQ: Begeben sie sich sofort zum Copcar!");
SetPlayerCheckpoint(i, X, Y, Z-5, 3.0);
}
}
}
return 1;
}
//Edit Frage wegen Absturz hinzugefügt