Platzsparend gehts auch so
public OnPlayerStateChange(playerid, newstate, oldstate)
{
for (new i=0; i< MAX_VEHICLES; i++)
{
if(i = AutoInfo[i][carid])
{
if(newstate==PLAYER_STATE_DRIVER)
{
if(PlayerInfo[playerid][pLeader] == AutoInfo[i][frakid] || PlayerInfo[playerid][pMember] == AutoInfo[i][frakid])
{
SendClientMessage(playerid,0xFF0000FF,"Du bist in der Fraktion");
return 1;
}
else
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid,0xFF0000FF,"Du bist nicht in der Fraktion");
return 1;
}
}
}
}
return 1;
}