public OnPlayerStateChange(playerid, newstate, oldstate)
{
for(new i=0;i <MAX_VEHICLES; i++)
{
if(newstate == PLAYER_STATE_DRIVER) //buggy dont finnish
{
if(GetPlayerVehicleID(playerid))
{
if(!strcmp(AutoInfo[i][frakname],"zivi",true))
{
if(PlayerInfo[playerid][pLeader] == 0 || PlayerInfo[playerid][pMember] == 0)
{
}
else
{
}
}
else if(!strcmp(AutoInfo[i][frakname],"lspd",true))
{
if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 1)
{
SendClientMessage(playerid,ROT,"DEBUG: RICHTIG !");
}
else
{
SendClientMessage(playerid,ROT,"DEBUG: FALSCH !");
RemovePlayerFromVehicle(playerid);
}
}
else if(!strcmp(AutoInfo[i][frakname],"lcn",true))
{
if(PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pMember] == 5)
{
SendClientMessage(playerid,ROT,"DEBUG: RICHTIG !");
}
else
{
SendClientMessage(playerid,ROT,"DEBUG: FALSCH !");
RemovePlayerFromVehicle(playerid);
}
}
}
}
}
return 1;
}
Da bitte