Opentoll.
#3

pawn Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include <a_samp>
#include <zcmd>

#if defined FILTERSCRIPT

//===================

#endif

//===================

//New list
new Toll1;

public OnPlayerConnect(playerid)
{
    SetPlayerCheckpoint(playerid, 1982.6150, -220.6680, -0.2432, 3.0);

    SetPlayerMapIcon( playerid,30,1543.4652,-1674.5741,13.2756, 30, 0, MAPICON_LOCAL ); //LSPD
    SetPlayerMapIcon( playerid,59,2168.8948,-1799.5226,13.0831, 59, 0, MAPICON_LOCAL ); //KTB_ICON
    SetPlayerMapIcon( playerid,6,2451.0015,-1973.7678,13.5539, 6, 0, MAPICON_LOCAL ); //GUNDEALER_ICON
    SetPlayerMapIcon( playerid,61,1869.9418,-2045.9769,13.2652, 61, 0, MAPICON_LOCAL ); //VLA_ICON
    SetPlayerMapIcon(playerid,22,2032.6945,-1418.9867,16.7121,22,0,MAPICON_LOCAL);//Medic
    SetPlayerMapIcon(playerid,23,2127.5090,-1137.3357,25.1637,55,0,MAPICON_LOCAL);//CarDealership
    SetPlayerMapIcon(playerid,24,2222.9421,-1160.4142,25.4566,59,0,MAPICON_LOCAL);//JB
    SetPlayerMapIcon(playerid,25,2450.7356,-1401.3779,23.5461,60,0,MAPICON_LOCAL);//V
    SetPlayerMapIcon(playerid,26,2495.7781,-1668.8654,13.0572,62,0,MAPICON_LOCAL);//GSF
    SetPlayerMapIcon(playerid,27,2777.6577,-1973.9489,13.5420,62,0,MAPICON_LOCAL);//SBF

    //Remove buildings
    RemoveBuildingForPlayer(playerid, 6130, 1117.5859, -1490.0078, 32.7188, 0.25);
    RemoveBuildingForPlayer(playerid, 6255, 1117.5859, -1490.0078, 32.7188, 0.25);
    RemoveBuildingForPlayer(playerid, 792, 1128.7344, -1518.4922, 15.2109, 0.25);
    RemoveBuildingForPlayer(playerid, 792, 1111.2578, -1512.3594, 15.2109, 0.25);
    RemoveBuildingForPlayer(playerid, 792, 1106.4375, -1501.3750, 15.2109, 0.25);
    RemoveBuildingForPlayer(playerid, 792, 1144.3984, -1512.7891, 15.2109, 0.25);
    RemoveBuildingForPlayer(playerid, 792, 1152.3828, -1502.5391, 15.2109, 0.25);
    RemoveBuildingForPlayer(playerid, 792, 1118.0156, -1467.4688, 15.2109, 0.25);
    RemoveBuildingForPlayer(playerid, 792, 1139.9219, -1467.4688, 15.2109, 0.25);
    RemoveBuildingForPlayer(playerid, 792, 1139.9219, -1456.4375, 15.2109, 0.25);
    RemoveBuildingForPlayer(playerid, 792, 1118.0156, -1456.4375, 15.2109, 0.25);
    RemoveBuildingForPlayer(playerid, 792, 1139.9219, -1445.1016, 15.2109, 0.25);
    RemoveBuildingForPlayer(playerid, 792, 1118.0156, -1445.1016, 15.2109, 0.25);
    RemoveBuildingForPlayer(playerid, 792, 1139.9219, -1434.0703, 15.2109, 0.25);
    RemoveBuildingForPlayer(playerid, 792, 1118.0156, -1434.0703, 15.2109, 0.25);
    RemoveBuildingForPlayer(playerid, 4070, 1719.7422, -1770.7813, 23.4297, 0.25);
    RemoveBuildingForPlayer(playerid, 1531, 1724.7344, -1741.5000, 14.1016, 0.25);
    RemoveBuildingForPlayer(playerid, 3986, 1719.7422, -1770.7813, 23.4297, 0.25);

    //Objects
    CreateObject(19322, 1117.66504, -1490.01172, 32.73600,   0.00000, 0.00000, 0.00000);
    CreateObject(19323, 1117.66467, -1490.00769, 32.73600,   0.00000, 0.00000, 0.00000);
    CreateObject(19325, 1155.41809, -1445.51563, 16.31000,   0.00000, 0.00000, 0.00000);
    CreateObject(19325, 1155.47400, -1434.62415, 16.31000,   0.00000, 0.00000, 0.00000);
    CreateObject(19325, 1155.31555, -1452.37805, 16.31000,   0.00000, 0.00000, 0.00000);
    CreateObject(19325, 1157.44043, -1468.36255, 16.31000,   0.00000, 0.00000, 18.00000);
    CreateObject(19325, 1160.64673, -1478.12439, 16.31000,   0.00000, 0.00000, 18.00000);
    CreateObject(1726, 1159.65356, -1459.87659, 14.81000,   0.00000, 0.00000, 180.00000);
    CreateObject(948, 1160.45435, -1459.82458, 14.81080,   0.00000, 0.00000, 0.00000);
    CreateObject(1726, 1163.44055, -1459.87659, 14.81000,   0.00000, 0.00000, 180.00000);
    CreateObject(2206, 1158.17554, -1451.60986, 14.81040,   0.00000, 0.00000, -90.00000);
    CreateObject(2356, 1156.49377, -1452.52209, 14.81060,   0.00000, 0.00000, -90.00000);
    CreateObject(19171, 1167.87195, -1452.26379, 16.80870,   90.00000, -90.00000, 0.00000);
    CreateObject(19172, 1167.87195, -1456.04089, 16.80980,   0.00000, 0.00000, -90.00000);
    CreateObject(1412, 2423.42700, -1771.91028, 13.74310,   0.00000, 0.00000, 90.00000);
    CreateObject(1412, 2423.44043, -1777.09729, 13.74310,   0.00000, 0.00000, 90.00000);
    CreateObject(1412, 2423.43970, -1792.64136, 13.74310,   0.00000, 0.00000, 90.00000);
    CreateObject(1412, 2423.42725, -1797.79736, 13.74310,   0.00000, 0.00000, 90.00000);
    CreateObject(1412, 2423.43652, -1802.97046, 13.74310,   0.00000, 0.00000, 90.00000);
    CreateObject(1412, 2423.43774, -1808.14856, 13.74310,   0.00000, 0.00000, 90.00000);
    CreateObject(1412, 2423.44067, -1813.32690, 13.74310,   0.00000, 0.00000, 90.00000);
    CreateObject(1412, 2423.45142, -1818.50012, 13.74310,   0.00000, 0.00000, 90.00000);
    CreateObject(1412, 2423.45435, -1823.69141, 13.74310,   0.00000, 0.00000, 90.00000);
    CreateObject(1412, 2423.43384, -1828.84338, 13.74310,   0.00000, 0.00000, 90.00000);
    CreateObject(12938, 1723.89807, -1786.50928, 16.30340,   0.00000, 0.00000, -90.00000);
    CreateObject(12940, 1723.89807, -1755.98669, 16.30340,   0.00000, 0.00000, -90.00000);
    CreateObject(1280, 1722.92749, -1786.43884, 12.84770,   0.00000, 0.00000, -90.00000);
    CreateObject(1280, 1722.86658, -1756.37610, 12.84770,   0.00000, 0.00000, 90.00000);
    CreateObject(625, 1724.66333, -1780.91565, 12.41350,   0.00000, 0.00000, 0.00000);
    CreateObject(625, 1724.37695, -1771.95972, 12.41350,   0.00000, 0.00000, 0.00000);
    CreateObject(625, 1724.54187, -1763.12390, 12.41350,   0.00000, 0.00000, 0.00000);
    CreateObject(1231, 1722.25049, -1776.73657, 13.50800,   0.00000, 0.00000, 0.00000);
    CreateObject(1231, 1722.56812, -1767.10889, 13.50800,   0.00000, 0.00000, 0.00000);
    CreateObject(3593, 1736.29980, -1746.55359, 12.83990,   0.00000, 0.00000, 20.02000);
    CreateObject(3593, 1739.22302, -1745.72461, 12.83990,   20.06000, 0.00000, 90.00000);
    CreateObject(3881, 60.96690, -1533.25818, 5.94950,   0.00000, 0.00000, 82.00000);
    CreateObject(3881, 40.05530, -1529.17883, 6.10950,   0.00000, 0.00000, -102.00000);
    CreateObject(970, 46.62556, -1528.24658, 4.79010,   0.00000, 0.00000, -10.00000);
    CreateObject(966, 37.04860, -1525.45508, 4.14910,   0.00000, 0.00000, -90.00000);
    CreateObject(970, 50.88541, -1528.93823, 4.79010,   0.00000, 0.00000, -10.00000);
    CreateObject(970, 55.17730, -1529.66541, 4.79010,   0.00000, 0.00000, -10.00000);
    CreateObject(966, 64.80869, -1536.97742, 4.14910,   0.00000, 0.00000, 90.00000);
   
    //Gates
    Toll1 = CreateObject(968,64.80750,-1536.94873,4.98270,0.00000,90.00000,-90.08000);
    return 1;
}

//Toll1
CMD:opentoll(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid, 15.0, 64.80750, -1536.94873, 4.98270))
    {
        SetTimerEx("CloseGate", 7000, false, "i", playerid);
        MoveObject(Toll1,64.80750, -1536.94873, 4.98270, 3.0,  0.00000, 0.00000, -90.08000);
        return SendClientMessage(playerid, -1, "Thank you it cost you {FF0000}[50$]");
    }
    if(IsPlayerInRangeOfPoint(playerid, 15.0, 64.80750, -1536.94873, 4.98270))
    {
        SetTimerEx("CloseGate2", 7000, false, "i", playerid);
        MoveObject(Toll1,64.80750, -1536.94873, 4.98270, 3.0,  0.00000, 0.00000, -90.08000);
        return SendClientMessage(playerid, -1, "Thank you it cost you {FF0000}[50$]");
    }
    return 1;
}

//Forwardings
forward CloseGate(playerid);
public CloseGate(playerid)
{
    MoveObject(Toll1,64.80750,-1536.94873,4.98270,0.0,0.00000,90.00000,-90.08000);
}

forward CloseGate2(playerid);
public CloseGate2(playerid)
{
    MoveObject(Toll1,64.80750,-1536.94873,4.98270,0.0,0.00000,90.00000,-90.08000);
}
Reply


Messages In This Thread
Opentoll. - by Jesper00 - 30.11.2013, 17:48
Re: Opentoll. - by Kyance - 30.11.2013, 17:50
Re: Opentoll. - by J4mmyHD - 30.11.2013, 17:51

Forum Jump:


Users browsing this thread: 1 Guest(s)