Hi ich habe das carsystem von Kaliber
ich brauche einen /opark system aber ich weiss nicht wie ich das anstellen soll....
der /parken befehl
if(strcmp(cmd, "/parken", true) == 0)
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, rot,"Du befindest dich in keinem Auto !");
if(CarInfo[playerid][pKey] == 0) return SendClientMessage(playerid, rot,"Du besitzt noch kein Auto !");
if(GetPlayerVehicleID(playerid) == CarInfo[playerid][pKey])
{
new Float: X, Float: Y, Float: Z, Float: A;
GetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z);
GetVehicleZAngle(GetPlayerVehicleID(playerid), A);
CarInfo[playerid][pX] = X;
CarInfo[playerid][pY] = Y;
CarInfo[playerid][pZ] = Z;
CarInfo[playerid][pA] = A;
CarInfo[playerid][pModel] = GetVehicleModel(GetPlayerVehicleID(playerid));
new color1, color2;
GetVehicleColor(GetPlayerVehicleID(playerid), color1, color2);
CarInfo[playerid][pFarbe1] = color1;
CarInfo[playerid][pFarbe2] = color2;
format(carstring, sizeof(carstring),"%f, %f, %f, %f, %d, %d, %d, %d",X,Y,Z,A,color1,color2,GetVehicleModel(GetPlayerVehicleID(playerid)),CarInfo[playerid][pPreis]);
SaveVehicles(carstring,playerid);
DestroyVehicle(GetPlayerVehicleID(playerid));
CarInfo[playerid][pKey] = AddStaticVehicleEx(CarInfo[playerid][pModel],CarInfo[playerid][pX],CarInfo[playerid][pY],CarInfo[playerid][pZ],CarInfo[playerid][pA],CarInfo[playerid][pFarbe1],CarInfo[playerid][pFarbe2],-1);
PutPlayerInVehicle(playerid, CarInfo[playerid][pKey], 0);
SendClientMessage(playerid, blau,"Du hast dein Auto erfolgreich geparkt !");
SendClientMessage(playerid,blau,"Du wirst es in zukunft hier wieder finden.");
return 1;
}
else
{
return SendClientMessage(playerid, rot,"Dieses Auto gehört nicht dir !");
}
}