Moin Moin
So habe ein kleines Problem bei den Frak Cars von mir..
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate==PLAYER_STATE_DRIVER)
{
for(new i=0; i<sizeof(lspdcar); i++)
{
if(GetPlayerVehicleID(playerid)==lspdcar[i])
{
if(GetPVarInt(playerid,"Fraktion")!=1)
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid,ROT,"Nicht Für dich.");
}
}
}
}
if(newstate==PLAYER_STATE_DRIVER)
{
for(new i=0; i<sizeof(fbicar); i++)
{
if(GetPlayerVehicleID(playerid)==fbicar[i])
{
if(GetPVarInt(playerid,"Fraktion")!=2)
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid,ROT,"Nicht Für dich.");
}
}
}
}
if(newstate==PLAYER_STATE_DRIVER)
{
for(new i=0; i<sizeof(armycar); i++)
{
if(GetPlayerVehicleID(playerid)==armycar[i])
{
if(GetPVarInt(playerid,"Fraktion")!=3)
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid,ROT,"Nicht Für dich.");
}
}
}
}
if(newstate==PLAYER_STATE_DRIVER)
{
for(new i=0; i<sizeof(sesecar); i++)
{
if(GetPlayerVehicleID(playerid)==sesecar[i])
{
if(GetPVarInt(playerid,"Fraktion")!=4)
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid,ROT,"Nicht Für dich.");
}
}
}
}
if(newstate==PLAYER_STATE_DRIVER)
{
for(new i=0; i<sizeof(oamtcar); i++)
{
if(GetPlayerVehicleID(playerid)==oamtcar[i])
{
if(GetPVarInt(playerid,"Fraktion")!=5)
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid,ROT,"Nicht Für dich.");
}
}
}
}
if(newstate==PLAYER_STATE_DRIVER)
{
for(new i=0; i<sizeof(newscar); i++)
{
if(GetPlayerVehicleID(playerid)==newscar[i])
{
if(GetPVarInt(playerid,"Fraktion")!=6)
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid,ROT,"Nicht Für dich.");
}
}
}
}
if(newstate==PLAYER_STATE_DRIVER)
{
for(new i=0; i<sizeof(mafiacar); i++)
{
if(GetPlayerVehicleID(playerid)==mafiacar[i])
{
if(GetPVarInt(playerid,"Fraktion")!=7)
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid,ROT,"Nicht Für dich.");
}
}
}
}
return 1;
}
Das Problem ist Ich kann in Jedes fahrzeug rein.. obwohl ich LSPD oder Zivi bin das ist egal.. ich kann Trozdem überall in den fahrzeugen Rein ?.. Falls einer den Fehler weiß bitte Melden
MFG Equ