Park problem
#1

I wanna park my fam veh, but I can't. they said, the commad blablabla
here's my cmd
pawn Код:
CMD:park(playerid, params[])
{
    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not in a vehicle.");
    // Family Vehicles
    if(IsFamVehicle(GetPlayerVehicleID(playerid)) && Fam[GetPlayerVehicleID(playerid)] == PlayerInfo[playerid][pFam])
    {
        new idx = PlayerInfo[playerid][pFam], veh = GFVS(GetPlayerVehicleID(playerid));

        GetVehiclePos(GetPlayerVehicleID(playerid), FamInfo[idx][fVehCoX][veh], FamInfo[idx][fVehCoY][veh], FamInfo[idx][fVehCoZ][veh]);
        GetVehicleZAngle(GetPlayerVehicleID(playerid), FamInfo[idx][fVehRot][veh]);
        if(FamInfo[idx][fVehType][veh])
        {
            DestroyVehicle(FamInfo[idx][fVeh][veh]);
        }
        FamInfo[idx][fVeh][veh] = CreateVehicle(FamInfo[idx][fVehType][veh], FamInfo[idx][fVehCoX][veh], FamInfo[idx][fVehCoY][veh], FamInfo[idx][fVehCoZ][veh], FamInfo[idx][fVehRot][veh], FamInfo[idx][fVehCol1][veh], FamInfo[idx][fVehCol2][veh], 1200);
        ChangeVehicleColor(FamInfo[idx][fVeh][veh], FamInfo[idx][fVehCol1][veh], FamInfo[idx][fVehCol2][veh]);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, " You have parked your family vehicle, it will always spawn here until you park it somewhere else.");
        return 1;
    }
Reply
#2

Part of your command is missing (I assume the end). I believe your problem exists on this line:
pawn Код:
if(IsFamVehicle(GetPlayerVehicleID(playerid)) && Fam[GetPlayerVehicleID(playerid)] == PlayerInfo[playerid][pFam])
The conditions have to be met. Make sure that 'IsFamVehicle' is returning properly.
Reply
#3

I checked the scripts, and it's IsFamVehicle
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)