17.05.2013, 06:51
I wanna park my fam veh, but I can't. they said, the commad blablabla
here's my cmd
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;
}