[Map] Mothership (race/stunt)
#6

Thanks for the comments.

Small update:
pawn Code:
new Float:tp_coords[6][3] =
{
    { 1977.0000, 1446.4529, 157.7731 },
    { 1965.0000, 1446.4529, 157.7731 },
    { 1953.0000, 1446.4529, 157.7731 },
    { 1941.0000, 1446.4529, 157.7731 },
    { 1929.0000, 1446.4529, 157.7731 },
    { 1917.0000, 1446.4529, 157.7731 }
};
   
new Float:inf_coords[8][3] =
{
    { 1987.5000, 1416.3500, 152.5000 },
    { 1979.3000, 1416.3500, 152.5000 },
    { 1987.5000, 1421.3500, 152.5000 },
    { 1979.3000, 1421.3500, 152.5000 },
    { 1979.3000, 1475.8000, 152.5000 },
    { 1987.5000, 1475.8000, 152.5000 },
    { 1979.3000, 1470.8000, 152.5000 },
    { 1987.5000, 1470.8000, 152.5000 }
};

new inf[sizeof inf_coords];

new Float:nrg_coords[12][3] =
{
    { 1989.0000, 1428.7242, 152.2400 },
    { 1984.0000, 1428.6825, 152.2400 },
    { 1978.0000, 1428.6825, 152.2400 },
    { 1989.0000, 1426.7242, 152.2400 },
    { 1984.0000, 1426.6825, 152.2400 },
    { 1978.0000, 1426.6825, 152.2400 },
    { 1989.0000, 1463.9889, 152.2400 },
    { 1984.0000, 1463.9889, 152.2400 },
    { 1978.0000, 1463.9889, 152.2400 },
    { 1989.0000, 1465.9889, 152.2400 },
    { 1984.0000, 1465.9889, 152.2400 },
    { 1978.0000, 1465.9889, 152.2400 }
};

new nrg[sizeof nrg_coords];

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/teleportmetothemothership", true))
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            new pos = random(sizeof tp_coords);
            new veh = GetPlayerVehicleID(playerid);
            SetVehiclePos(veh, tp_coords[pos][0], tp_coords[pos][1], tp_coords[pos][2]);
        }
        else
        {
            new pos = random(sizeof inf_coords);
            SetPlayerPos(playerid, inf_coords[pos][0], inf_coords[pos][1], inf_coords[pos][2]);
        }
        return 1;
    }
    return 0;
}

public OnFilterScriptInit()
{

    for( new i; i < sizeof inf_coords; i++)
    {
        inf[i] = CreateVehicle(411, inf_coords[i][0], inf_coords[i][1], inf_coords[i][2],  90.0, -1, -1, 10); // infernus
        AddVehicleComponent(inf[i], 1010);
    }
   
    for( new i; i < sizeof nrg_coords; i++)
    {
        nrg[i] = CreateVehicle(522, nrg_coords[i][0], nrg_coords[i][1], nrg_coords[i][2],  90.0, -1, -1, 10); // nrg
    }
    return 1;
}

public OnFilterScriptExit()
{
    for( new i; i < MAX_OBJECTS; i++) //Here we will destroy every single object, including those that aren't even in this map :)
    {
        DestroyObject(i);
    }
    for( new i; i < sizeof inf_coords; i++)
    {
        DestroyVehicle(inf[i]);
    }
    for( new i; i < sizeof nrg_coords; i++)
    {
        DestroyVehicle(nrg[i]);
    }
    return 1;
}
Reply


Messages In This Thread
Mothership (race/stunt) - by Youarex - 27.07.2012, 12:33
Re: Mothership (race/stunt) - by huhander - 27.07.2012, 21:05
Re: Mothership (race/stunt) - by Basssiiie - 28.07.2012, 00:40
Re: Mothership (race/stunt) - by Stylock - 28.07.2012, 08:59
Re: Mothership (race/stunt) - by Friend+ - 28.07.2012, 09:08
Re: Mothership (race/stunt) - by Youarex - 28.07.2012, 10:02
Re: Mothership (race/stunt) - by Captain_Mani - 28.07.2012, 10:10
Re: Mothership (race/stunt) - by Youarex - 28.07.2012, 10:14
Re: Mothership (race/stunt) - by Lordzy - 25.08.2012, 18:54
Re: Mothership (race/stunt) - by shadowdog - 25.08.2012, 19:00
Re: Mothership (race/stunt) - by Akira297 - 25.08.2012, 19:09
Re: Mothership (race/stunt) - by Cena44 - 25.08.2012, 19:11
Re: Mothership (race/stunt) - by DeadLy™ - 26.08.2012, 17:03
Re: Mothership (race/stunt) - by Youarex - 26.08.2012, 17:16
Re: Mothership (race/stunt) - by DeadLy™ - 26.08.2012, 17:21
Re : Mothership (race/stunt) - by Naruto_Emilio - 31.08.2012, 18:50
Re: Mothership (race/stunt) - by scottygraham1990 - 08.10.2012, 02:41
Re: Mothership (race/stunt) - by Molganmojgan - 08.10.2012, 05:27
Re: Mothership (race/stunt) - by Ghost_Boii - 08.10.2012, 08:41
Re: Mothership (race/stunt) - by Flashhiee - 08.10.2012, 11:50
Re: Mothership (race/stunt) - by Jarnu - 08.10.2012, 11:56
Re: Mothership (race/stunt) - by FalconeX - 27.04.2013, 09:55
Re: Mothership (race/stunt) - by Aerotactics - 09.06.2013, 06:58
Re: Mothership (race/stunt) - by Sasino97 - 08.11.2014, 19:42
Re: Mothership (race/stunt) - by Maximun - 08.11.2014, 20:13
Re: Mothership (race/stunt) - by OG Killo - 08.11.2014, 20:54
AW: Mothership (race/stunt) - by Flori - 08.11.2014, 21:06

Forum Jump:


Users browsing this thread: 1 Guest(s)