ich kann als medic nicht die staatsfrak cars aufschliessen aber als cop
kann ich es ich weis nicht wo der feheler liegt kann mir da einer helfen ?
if(strcmp(cmdtext,"/coplock",true)==0)
{
if(IsPlayerACopAndMedic(playerid))
{
new Float:vx,Float:vy,Float:vz;
for(new fc;fc<sizeof(StateFactionCars);fc++)
{
GetVehiclePos(StateFactionCars[fc][sfCarid],vx,vy,vz);
if(IsPlayerInRangeOfPoint(playerid,4.0,vx,vy,vz) && IsAllowedFactionToBuyState(GetPlayerFaction(playerid)))
{
PlayerPlaySound(playerid,1145,0.0,0.0,0.0);
if(StateFactionCars[fc][sfLock] == true)
{
StateFactionCars[fc][sfLock] = false;
GameTextForPlayer(playerid,"~w~Fahrzeug~n~~g~Aufgeschlossen",5000,3);
return true;
}
else if(StateFactionCars[fc][sfLock] == false)
{
StateFactionCars[fc][sfLock] = true;
GameTextForPlayer(playerid,"~w~Fahrzeug~n~~r~Abgeschlossen",5000,3);
return true;
}
}
}
SendClientMessage(playerid,FACTION_COL_GREY,"Du bist bei keinem Fraktionsfahrzeuge!");
}
else SendClientMessage(playerid,FACTION_COL_GREY,"Du bist kein Beamter!");
return true;
}
hier der stock
stock IsPlayerACopAndMedic(playerid)
{
new Member = PlayerInfo[playerid][pMember];
new Leader = PlayerInfo[playerid][pLeader];
if(Member == 1 || Member == 2 || Member == 3 || Member == 21 || Member == 10 || Member == 7|| Member == 4) return true;
if(Leader == 1 || Leader == 2 || Leader == 3 || Leader == 21 || Leader == 10 || Leader == 7 || Leader == 4) return true;
return false;
}
MFG @TimeLine
vllt kann @Jeffry auch mit helfen