//====================[Opark]=======================
if(strcmp(cmd,"/opark", true) == 0)
{
if(!PlayerInfo[playerid][pLeader] == 24 || !PlayerInfo[playerid][pMember] == 24) {
SendClientMessage(playerid,COLOR_GREY,"Du bist kein Mitglied des Ordnungsamtes.");
return 1;
}
if(!IsPlayerInAnyVehicle(playerid)) {
SendClientMessage(playerid,COLOR_GREY,"Du bist in keinem Fahrzeug.");
return 1;
}
new i;
while(i<MAX_PLAYERS)
{
new s;
while(MaxVeh)
{
if(!PlayerCar[i][s][CarId] == GetPlayerVehicleID(playerid))
{
SendClientMessage(playerid,COLOR_GREY,"Dieses Fahrzeug kannst du nicht sperren/parken.");
return 1;
}
if(PlayerCar[i][s][CarId] == GetPlayerVehicleID(playerid))
{
new vehicleid = GetPlayerVehicleID(playerid);
new Float:X,Float:Y,Float:Z;
new Float:z_rot;
GetPlayerPos(playerid, X,Y,Z);
GetVehicleZAngle(vehicleid, z_rot);
PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarPos_x] = X;
PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarPos_y] = Y;
PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarPos_z] = Z;
PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarRotate] = z_rot;
PlayerCar[pGesperrt] = 1;
SendClientMessage(playerid,COLOR_WHITE,"Du hast das Fahrzeug nun hier geparkt und gesperrt");
SendClientMessage(playerid,COLOR_WHITE,"Der besitzer muss es sich zuerst wieder freikaufen um es zu benutzen");
return true;
}
s++;
}
i++-;
}
return 2;
}