making ferry move to SF
#1

Hello I have downloaded the ferry filterscript but I was wondering how can I make it go from Los Santos to San Fierro instead of requiring a custom map? the pwn code is


Код:
#include <a_samp>
//#if defined FILTERSCRIPT
new ferryI;
new ferry;
new FerryObject[30];

#define grey                                                          0xB4B4B4FF
#define yellow                                                        0xF5FF00FF

forward FerryLS(playerid);
forward FerryIS(playerid);

public OnFilterScriptInit()
{
    SetTimer("FerryIS", 240000, true);
    ferry = CreateObject(10771, 2650.21191, -2291.62915, -0.03891,   0.00000, 0.00000, 0.00000);
	FerryObject[0] = CreateObject(10770, 2653.45239, -2299.15625, 33.11850,   0.00000, 0.00000, 0.00000);
    FerryObject[1] = CreateObject(3115, 2551.23779, -2291.54199, 11.43030,   0.00000, 0.00000, 0.00000);
    FerryObject[2] = CreateObject(3114, 2593.44946, -2279.50488, 11.10060,   0.00000, 0.00000, 0.00000);
    FerryObject[3] = CreateObject(3113, 2541.05908, -2291.58105, -0.43180,   0.00000, 0.00000, 0.00000);
    FerryObject[4] = CreateObject(11237, 2653.42407, -2299.16797, 33.07820,   0.00000, 0.00000, 0.00000);
    FerryObject[5] = CreateObject(982, 2737.92529, -2304.55811, 12.18130,   0.00000, 0.00000, 269.98810);
    FerryObject[6] = CreateObject(982, 2738.54590, -2278.74390, 12.18130,   0.00000, 0.00000, 269.96811);
    FerryObject[7] = CreateObject(982, 2579.17554, -2304.55566, 12.18130,   0.00000, 0.00000, 269.98810);
    FerryObject[8] = CreateObject(982, 2604.79248, -2304.57153, 12.18130,   0.00000, 0.00000, 269.98810);
    FerryObject[9] = CreateObject(982, 2630.41089, -2304.57861, 12.18130,   0.00000, 0.00000, 269.98810);
    FerryObject[10] = CreateObject(982, 2699.49683, -2304.55591, 12.18130,   0.00000, 0.00000, 269.98810);
    FerryObject[11] = CreateObject(982, 2725.11450, -2304.56787, 12.18130,   0.00000, 0.00000, 269.98810);
    FerryObject[12] = CreateObject(982, 2553.57861, -2304.57202, 12.18130,   0.00000, 0.00000, 269.96811);
    FerryObject[13] = CreateObject(982, 2553.48291, -2278.68335, 12.18130,   0.00000, 0.00000, 269.96811);
    FerryObject[14] = CreateObject(982, 2571.09448, -2278.69165, 12.18130,   0.00000, 0.00000, 269.96811);
    FerryObject[15] = CreateObject(982, 2616.88354, -2278.68091, 12.18130,   0.00000, 0.00000, 269.96811);
    FerryObject[16] = CreateObject(982, 2642.50684, -2278.68872, 12.18130,   0.00000, 0.00000, 269.96811);
    FerryObject[17] = CreateObject(982, 2668.10840, -2278.70776, 12.18130,   0.00000, 0.00000, 269.96811);
    FerryObject[18] = CreateObject(982, 2693.72607, -2278.71411, 12.18130,   0.00000, 0.00000, 269.96811);
    FerryObject[19] = CreateObject(982, 2719.34570, -2278.73071, 12.18130,   0.00000, 0.00000, 269.96811);
    FerryObject[20] = CreateObject(984, 2540.73901, -2285.06348, 12.11590,   0.00000, 0.00000, 0.00000);
    FerryObject[21] = CreateObject(984, 2540.75684, -2298.14844, 12.11590,   0.00000, 0.00000, 0.00000);
    FerryObject[22] = CreateObject(2944, 2642.11792, -2278.73169, 6.24590,   0.00000, 0.00000, -90.00000);
    FerryObject[23] = CreateObject(2944, 2660.75854, -2293.67480, 13.19060,   0.00000, 0.00000, -90.00000);
    FerryObject[24] = CreateObject(3294, 2586.31860, -2277.31201, 6.43400,   0.00000, 0.00000, 89.22000);
    FerryObject[25] = CreateObject(3294, 2683.50342, -2277.63574, 6.91400,   0.00000, 0.00000, 89.00000);
    FerryObject[26] = CreateObject(3294, 2600.55542, -2277.50562, 6.43400,   0.00000, 0.00000, 89.22000);
    FerryObject[27] = CreateObject(3294, 2593.41943, -2277.41919, 6.43400,   0.00000, 0.00000, 89.22000);
    FerryObject[28] = CreateObject(3294, 2672.87451, -2305.52734, 6.60470,   0.00000, 0.00000, 89.88000);
	return 1;
}

public FerryIS(playerid)
{
	if(ferryI == 1)
	{
		SendClientMessage(playerid, 0xFF000000, "** Ferry docked to island!");
		return 1;
	}
	MoveObject(ferry, 2650.21191, -2291.62915, -0.03891, 11.0,   0.00000, 0.00000, 0.00000);
	AttachObjectToObject(FerryObject[0], ferry, 3.24048,-7.5271,33.15641,0.0000000,0.0000000,0.0000000, 1);
    AttachObjectToObject(FerryObject[1], ferry, -98.97412, 0.08716, 11.39139,   0.0, 0.0, 0.0, 1); // This will attach VehicleObject[1] to veh. And now, we got 2 objects attached to your vehicle!
    AttachObjectToObject(FerryObject[2], ferry, -56.76245, 12.12427, 11.06169,   0.0, 0.0, 0.0, 1);
    AttachObjectToObject(FerryObject[3], ferry,-109.15283, 0.0481, 0.3928,   0.0, 0.0,0.0, 1);
    AttachObjectToObject(FerryObject[4], ferry, 3.21216, -7.53882, 33.03929,   0.0, 0.0, 0.0, 1);
    AttachObjectToObject(FerryObject[5], ferry, 87.71338, -12.92896, 12.14239,   0.0, 0.0, 269.98810, 1);
    AttachObjectToObject(FerryObject[6], ferry,88.33399, 12.88525, 12.14239,   0.0, 0.0, 269.96811, 1);
    AttachObjectToObject(FerryObject[7], ferry,-71.03637, -12.92651, 12.14239,   0.0, 0.0, 269.98810, 1);
    AttachObjectToObject(FerryObject[8], ferry, -45.41943, -12.94238, 12.14239,   0.0, 0.0, 269.98810, 1);
    AttachObjectToObject(FerryObject[9], ferry, -12.94946, -13.6997, 12.14239,   0.0, 0.0, 269.98810, 1);
    AttachObjectToObject(FerryObject[10], ferry, 49.28492, -12.92676, 12.14239,   0.0, 0.0, 269.98810, 1);
    AttachObjectToObject(FerryObject[11], ferry, 74.90259, -12.93872,12.14239,   0.0, 0.0, 269.98810, 1);
    AttachObjectToObject(FerryObject[12], ferry, -96.6333, -12.94287, 12.14239,   0.0, 0.0, 269.96811, 1);
    AttachObjectToObject(FerryObject[13], ferry, -96.729, 12.9458, 12.14239,   0.0, 0.0, 269.96811, 1);
    AttachObjectToObject(FerryObject[14], ferry, -79.11743, 12.9375, 12.14239,   0.0, 0.0, 269.96811, 1);
    AttachObjectToObject(FerryObject[15], ferry, -33.32837, 12.94824, 12.14239,   0.0, 0.0, 269.96811, 1);
    AttachObjectToObject(FerryObject[16], ferry, -7.70507, 12.94043, 12.14239,   0.0, 0.0, 269.96811, 1);
    AttachObjectToObject(FerryObject[17], ferry,17.89649, 12.92139, 12.14239,   0.0, 0.0, 269.96811, 1);
    AttachObjectToObject(FerryObject[18], ferry, 43.51416, 12.91504, 12.14239,   0.0, 0.0, 269.96811, 1);
    AttachObjectToObject(FerryObject[19], ferry, 69.13379, 12.89844, 12.14239,   0.0, 0.0, 269.96811, 1);
    AttachObjectToObject(FerryObject[20], ferry,-109.4729, 6.56567, 12.07699,   0.0, 0.0, 0.0, 1);
    AttachObjectToObject(FerryObject[21], ferry, -109.45507, -6.51929, 12.07699,   0.0, 0.0, 0.0, 1);
    AttachObjectToObject(FerryObject[22], ferry,-8.09399, 12.89746,  6.28481,   0.0, 0.0, -90.00000, 1);
    AttachObjectToObject(FerryObject[23], ferry, 10.54663, -2.04565, 13.15169,   0.0, 0.0, -90.00000, 1);
    AttachObjectToObject(FerryObject[24], ferry, -63.89331, 14.31714, 6.39509,   0.0, 0.0, 89.22000, 1);
    AttachObjectToObject(FerryObject[25], ferry,33.29151, 13.99341, 6.87509,  0.0, 0.0, 89.00000, 1);
    AttachObjectToObject(FerryObject[26], ferry, -49.65649, 14.12353, 6.39509,   0.0, 0.0, 89.22000, 1);
    AttachObjectToObject(FerryObject[27], ferry, -56.79248, 14.20996, 6.39509,   0.0, 0.0, 89.22000, 1);
    AttachObjectToObject(FerryObject[28], ferry,22.6626, -13.89819, 6.56579,   0.0, 0.0, 89.88000, 1);
   	SendClientMessage(playerid, 0xFF000000,"The ferry is moving back.");
	SetTimer("FerryLS", 120000, 0);
	return 0;
}

public FerryLS(playerid)
{
    MoveObject(ferry,3852.02222, -2291.66577, -0.01940, 11.0,   0.00000, 0.00000, 0.00000);
    PlayerPlaySound(playerid, 1153, 2650.21191, -2291.62915, -0.03891);
    ferryI = 0;
    return 1;
}
Reply
#2

you need save coord and use OnObjectMove Callback to make ferrys travel
Reply
#3

when I load this fs into game there is no dock to ferry or anything to drive on
Reply
#4

look Pirateship filterscript, is easy.
Reply
#5

yea but I want this for a trucking server as well as not needing a command
Reply
#6

you could also create a vehicle and attach the ship to the vehicle, then npc it how you want, I suppose
Reply
#7

wouldnt that be harder?
Reply
#8

Just one question.. why are the values for 'grey' and 'yellow' miles away from the definitions? It's going to get confusing when you have hundreds of colours when you want to know which value is for which definition.

Also, it's standard practise to define colors as 'COLOR_X', e.g. 'COLOR_GREY'. You should stick to standards.

EDIT: Just noticed YOU didn't make this..
Reply
#9

Quote:
Originally Posted by MP2
Посмотреть сообщение
Just one question.. why are the values for 'grey' and 'yellow' miles away from the definitions? It's going to get confusing when you have hundreds of colours when you want to know which value is for which definition.

Also, it's standard practise to define colors as 'COLOR_X', e.g. 'COLOR_GREY'. You should stick to standards.

EDIT: Just noticed YOU didn't make this..
I know I didnt make it I was asking for help to tweak it and help make it go to SF found it under ferry on fliterscripts I also have another question how do I spawn a train with more then 2 cars?
Reply
#10

You can't.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)