Hallo ich habe gerade Fraktions Fahrzeuge erstellt wenn ich zivi bin werde ich rausgeworfen aber wenn ich lspd Leader bin auch ?
//Fraktions Cars
new policeCars[14];
policeCars[0] = AddStaticVehicle(596,1535.7977,-1667.5051,13.1040,359.4606,0,1);
policeCars[1] = AddStaticVehicle(596,1535.7909,-1677.7257,13.1040,0.3027,0,1);
policeCars[2] = AddStaticVehicle(523,1587.6310,-1680.0526,5.4563,270.0000,86,86);
policeCars[3] = AddStaticVehicle(523,1587.6613,-1678.3800,5.4560,270.0454,86,86);
policeCars[4] = AddStaticVehicle(523,1587.6171,-1676.6191,5.4560,270.0634,86,86);
policeCars[5] = AddStaticVehicle(523,1587.6373,-1674.9209,5.4484,270.1465,86,86);
policeCars[6] = AddStaticVehicle(596,1601.2157,-1684.2124,5.6119,90.0000,255,1);
policeCars[7] = AddStaticVehicle(596,1601.1688,-1688.3414,5.6119,90.0000,255,1);
policeCars[8] = AddStaticVehicle(596,1601.1740,-1692.1057,5.6119,89.9999,255,1);
policeCars[9] = AddStaticVehicle(596,1601.1311,-1696.3038,5.6119,89.9998,255,1);
policeCars[10] = AddStaticVehicle(596,1600.8956,-1700.4865,5.6119,89.9999,255,1);
policeCars[11] = AddStaticVehicle(596,1600.9106,-1703.9642,5.6119,89.9998,255,1);
policeCars[12] = AddStaticVehicle(528,1568.3005,-1694.0850,5.9342,217.1329,255,1);
policeCars[13] =AddStaticVehicle(528,1559.9973,-1693.8103,5.9374,224.1833,255,1);
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate==PLAYER_STATE_DRIVER)
{
for(new i=0; i<sizeof(policeCars); i++)
{
if(GetPlayerVehicleID(playerid)==policeCars[i])
{
if(GetPVarInt(playerid,"Fraktion")!=1)
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid,ROT,"Du darfst dieses Fahrzeug nicht fahren.");
}
}
}
}