Hallo Breadfisher.
Ich habe hier so cars erstellt
new policecar[23];
policecar[0] = AddStaticVehicleEx(497,-1679.4922,712.8502,30.7782,90.8441,1,86,120); // Police Maverick //
policecar[1] = AddStaticVehicleEx(497,-1679.6609,699.1047,30.7791,88.4598,1,86,120); // Police Maverick
policecar[2] = AddStaticVehicleEx(490,-1632.4399,693.0427,-6.1152,178.7706,1,86,120); // FBI Ranger
policecar[3] = AddStaticVehicleEx(490,-1628.7793,693.0427,-6.1143,179.2127,1,86,120); // FBI Ranger
policecar[4] = AddStaticVehicleEx(490,-1624.8285,693.0427,-6.1148,181.7789,1,86,120); // FBI Ranger
policecar[5] = AddStaticVehicleEx(490,-1620.7037,693.0427,-6.1135,180.6329,1,86,120); // FBI Ranger //
policecar[6] = AddStaticVehicleEx(470,-1623.1862,649.5843,-5.2463,90.2505,1,86,120); // Patriot
policecar[7] = AddStaticVehicleEx(470,-1623.1862,653.7045,-5.2512,91.0673,1,86,120); // Patriot
policecar[8] = AddStaticVehicleEx(470,-1640.4189,649.7290,-5.2491,269.8438,1,86,120); // Patriot
policecar[9] = AddStaticVehicleEx(470,-1640.4189,653.8616,-5.2473,270.1785,1,86,120); // Patriot //
policecar[10] = AddStaticVehicleEx(523,-1600.4772,693.0427,-6.1104,179.5813,1,86,120); // HPV-1000
policecar[11] = AddStaticVehicleEx(523,-1604.5778,693.0427,-6.1034,179.8792,1,86,120); // HPV-1000 //
policecar[12] = AddStaticVehicleEx(523,-1608.4570,693.0427,-6.0872,179.1897,1,86,120); // HPV-1000
policecar[13] = AddStaticVehicleEx(523,-1612.4811,693.0427,-6.1000,181.1917,1,86,120); // HPV-1000
policecar[14] = AddStaticVehicleEx(447,-1610.5566,671.5421,7.3638,91.3163,1,86,120); // sparrow
policecar[15] = AddStaticVehicleEx(447,-1593.3519,671.5200,7.3661,91.5293,1,86,120); // sparrow
policecar[16] = AddStaticVehicleEx(597,-1572.1472,718.6272,-5.4765,89.9670,1,86,120); // Copcar SF 77
policecar[17] = AddStaticVehicleEx(597,-1572.1472,722.3386,-5.4719,91.1193,1,86,120); // Copcar SF
policecar[18] = AddStaticVehicleEx(597,-1572.1472,726.4766,-5.4724,89.4934,1,86,120); // Copcar SF
policecar[19] = AddStaticVehicleEx(597,-1572.1472,730.8532,-5.4715,88.5915,1,86,120); // Copcar SF
policecar[20] = AddStaticVehicleEx(597,-1572.1472,734.9302,-5.4738,89.4898,1,86,120); // Copcar SF
policecar[21] = AddStaticVehicleEx(597,-1572.1472,738.8535,-5.4732,89.0372,1,86,120); // Copcar SF
policecar[22] = AddStaticVehicleEx(597,-1572.1472,743.0928,-5.4743,88.8292,1,86,120); // Copcar SF
Jetzt wollte ich so Abfragen, ob der Spieler in das Auto darf
if(newstate == PLAYER_STATE_DRIVER)
{
// Police
for(new pol = 0;pol<27;pol++)
if(GetPlayerVehicleID(playerid) == policecar[pol])
{
if(gTeam[playerid] == TEAM_POLICE || adminlebencheck[playerid] == 1)
{
return 1;
}
else
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid,rot,"Fehler: Du bist nicht Teil der Polizei");
return 1;
}
}
}
Allerdings funktioniert es nicht.Jeder kann in das Auto. Weiß vllt jemand wie es funktionieren könnte ?