Need Help
#1

Sorry for posting about ferry again. But i've been working for a whole day on this and still couldn't figure out what the hell is going on on this FS -.-

It is only showing a message "The ferry is moving back." every 4 minutes but the ferry isn't moving. I have set the coord for LS(Start point) to an island(Where the ferry goes) but it is not moving, only showing that one message per 4 minutes. Can someone help me to fix this issue? I'd add +rep to the person who can help me :/

FS
pawn Код:
#include <a_samp>
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, 599.08081, -2296.55640, 0.85350,   0.00000, 0.00000, -88.50000);
    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, 599.08081, -2296.55640, 0.85350,   0.00000, 0.00000, -88.50000);
    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,-5950.27881, 0.85350,   0.00000, 0.00000, -88.50000);
    PlayerPlaySound(playerid, 1153, 2650.21191, -2291.62915, -0.03891);
    ferryI = 0;
    return 1;
}
Reply
#2

Check the MoveObject syntax.

I think this is the problem in your code.
Код:
(objectid, Float:X, Float:Y, Float:Z, Float:Speed, Float:RotX = -1000.0, Float:RotY = -1000.0, Float:RotZ = -1000.0)
As you can see, it's objectid, Float:X, Float:Y, Float:Z, Float:Speed, in your code, the speed is set to 0.00, which means it won't move.
Reply
#3

Oh omg i didn't even notice the speed lol. Thanks but i got another problem. The ferry isn't going back to Los Santos after reaching the island. Any idea? D:
Reply
#4

Well, I'm not sure why it wouldn't work, since it looks ok for me. I changed a few things in the code, try now and tell me if it works.
pawn Код:
#include <a_samp>
new ferryI;
new ferry;
new FerryObject[30];

#define grey                                                          0xB4B4B4FF
#define yellow                                                        0xF5FF00FF

forward FerryLS();
forward FerryIS();

public OnFilterScriptInit()
{
    SetTimer("FerryIS", 240000, true);
    ferry = CreateObject(10771, 599.08081, -2296.55640, 0.85350,   0.00000, 0.00000, -88.50000);
    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()
{
    if(ferryI == 1)
    {
        SendClientMessageToAll(0xFF000000, "** Ferry docked to island!");
        return 1;
    }
    MoveObject(ferry, 599.08081, -2296.55640, 0.85350,   0.00000, 0.00000, -88.50000);
    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);
    SetTimerEx("FerryLS", 120000, 0);
    return 0;
}

public FerryLS()
{
    MoveObject(ferry,-5950.27881, 0.85350,   0.00000, 15.00000, -88.50000); //Change 15 to the speed you had planned
    SendClientMessageToAll(0xFF000000,"The ferry is moving back."); //Moved this message to the action public, now the message will be sent when the ferry starts moving
    /*for(new i=0; i < MAX_PLAYERS; i++) //Uncomment the for loop to play the sound for all players
    {
        PlayerPlaySound(i , 1153, 2650.21191, -2291.62915, -0.03891); //Play sound for all players
    }*/

    ferryI = 0;
    return 1;
}
You sometimes used 'playerid' as a variable in the publics, when there was no variable passed at all by the timers. As I said above, not sure if this changed anything, but it's worth the try.
Reply
#5

Nope, still not working :/
Reply
#6

/Bump

Please someone help me to fix this issue.
Reply
#7

pawn Код:
#include <a_samp>

new ferryI;
new ferry;
new FerryObject[30];

#define grey                                                          0xB4B4B4FF
#define yellow                                                        0xF5FF00FF

forward FerryLS();
forward FerryIS();

public OnFilterScriptInit()
{
    ferry = CreateObject(10771, 599.08081, -2296.55640, 0.85350,   0.00000, 0.00000, -88.50000);
    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);
   
    SetTimer("FerryIS", 240000, true);
    return 1;
}

public FerryIS()
{
    if(ferryI == 1) return SendClientMessageToAll(0xFF000000, "** Ferry docked to island!");

    MoveObject(ferry, 599.08081, -2296.55640, 0.85350, 100.00000, 10.0, -88.50000); // I changed the speed to 10.0, Change it to whatever you want
   
    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);
    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);
   
    SendClientMessageToAll(0xFF000000, "The ferry is moving back.");
    SetTimer("FerryLS", 120000, 0);
    return 1;
}

public FerryLS()
{
    //PlayerPlaySound(playerid, 1153, 2650.21191, -2291.62915, -0.03891); Which player you're playing sound for ? You should tell..
    SendClientMessageToAll(0xFF000000, "The ferry is moving to LS.");
    MoveObject(ferry,-5950.27881, 0.85350, 0.00000, 10.0, -88.50000); // I changed the speed to 10.0, Change it to whatever you want
    ferryI = 0;
    return 1;
}
There is no "playerid" so I removed it from the two timers.. And the message is sent to everyone.. You could change it back to the player you want to show the message to. Try it..
Reply
#8

Well i want the ferry to go LS to island and island to LS repeatedly, right now the problem is, the ferry only goes to island and won't come back to LS.

PS: I don't really need to play sound, you can disable it. I only want the message to send to all the players so they can know the status about ferry.
Reply
#9

Try my code... And wait for 2 minutes and it should go back to "-5950.27881, 0.85350, 0.00000" with a message..... Make sure those coords are correct also
Reply
#10

I just tried your code, it is not even moving now. And also the coords aren't wrong. I tried this fs with command with the same coord and worked perfectly. Its just not working with timer. Can you make a new ferry filterscript from scratch if possible?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)