Sziasztok. Próbáltam megírni egy parkolási parancsot de sehogy nem jön össze, már megannyiszor nekifutottam de semmi.
CMD:vpark(playerid)
{
new pName[MAX_PLAYER_NAME],Float:x,Float:y,Float:z,Float:a;
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
if(PlayerInfo[playerid][VehP]!=1) return SendClientMessage(playerid,COLOR_ERROR,\"You have not car!\");
for(new vehid=0;vehid<MAX_BVEHICLES;vehid++)
{
if(IsPlayerInVehicle(playerid,PlayerInfo[playerid][pVehicleID]))
{
if(PlayerInfo[playerid][pVehicleID] != GetPlayerVehicleID(playerid)) return SendClientMessage(playerid,COLOR_ERROR,\"This is not your car!\");
GetVehiclePos(GetPlayerVehicleID(playerid),x,y,z);
GetVehicleZAngle(GetPlayerVehicleID(playerid),a);
VehicleInfo[vehid][vSpawnX]=x;
VehicleInfo[vehid][vSpawnY]=y;
VehicleInfo[vehid][vSpawnZ]=z;
VehicleInfo[vehid][vAngle]=a;
SaveVehicles(vehid);
SendClientMessage(playerid,COLOR_GREEN,\"You parked your vehicle\");
printf(\" %s parked the car to X: %f Y: %f Z: %f, ID: %d\",pName,VehicleInfo[vehid][vSpawnX], VehicleInfo[vehid][vSpawnY], VehicleInfo[vehid][vSpawnZ],vehid);
}
}
return 1;
}