Opentoll.
#1

Hey i have a problem here.

I will make a command /opentoll.- and that command should work with all my opentolls(gates). But it says
Код HTML:
samp\filterscripts\ObjectsDizzle.pwn(124) : error 021: symbol already defined: "cmd_opentoll"
Can someone help me here

PHP код:
// 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,Toll2;
public 
OnPlayerConnect(playerid)
{
    
SetPlayerCheckpoint(playerid1982.6150, -220.6680, -0.24323.0);
    
SetPlayerMapIconplayerid,30,1543.4652,-1674.5741,13.2756300MAPICON_LOCAL ); //LSPD
    
SetPlayerMapIconplayerid,59,2168.8948,-1799.5226,13.0831590MAPICON_LOCAL ); //KTB_ICON
    
SetPlayerMapIconplayerid,6,2451.0015,-1973.7678,13.553960MAPICON_LOCAL ); //GUNDEALER_ICON
    
SetPlayerMapIconplayerid,61,1869.9418,-2045.9769,13.2652610MAPICON_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(playerid61301117.5859, -1490.007832.71880.25);
    
RemoveBuildingForPlayer(playerid62551117.5859, -1490.007832.71880.25);
    
RemoveBuildingForPlayer(playerid7921128.7344, -1518.492215.21090.25);
    
RemoveBuildingForPlayer(playerid7921111.2578, -1512.359415.21090.25);
    
RemoveBuildingForPlayer(playerid7921106.4375, -1501.375015.21090.25);
    
RemoveBuildingForPlayer(playerid7921144.3984, -1512.789115.21090.25);
    
RemoveBuildingForPlayer(playerid7921152.3828, -1502.539115.21090.25);
    
RemoveBuildingForPlayer(playerid7921118.0156, -1467.468815.21090.25);
    
RemoveBuildingForPlayer(playerid7921139.9219, -1467.468815.21090.25);
    
RemoveBuildingForPlayer(playerid7921139.9219, -1456.437515.21090.25);
    
RemoveBuildingForPlayer(playerid7921118.0156, -1456.437515.21090.25);
    
RemoveBuildingForPlayer(playerid7921139.9219, -1445.101615.21090.25);
    
RemoveBuildingForPlayer(playerid7921118.0156, -1445.101615.21090.25);
    
RemoveBuildingForPlayer(playerid7921139.9219, -1434.070315.21090.25);
    
RemoveBuildingForPlayer(playerid7921118.0156, -1434.070315.21090.25);
    
RemoveBuildingForPlayer(playerid40701719.7422, -1770.781323.42970.25);
    
RemoveBuildingForPlayer(playerid15311724.7344, -1741.500014.10160.25);
    
RemoveBuildingForPlayer(playerid39861719.7422, -1770.781323.42970.25);
    
//Objects
    
CreateObject(193221117.66504, -1490.0117232.73600,   0.000000.000000.00000);
    
CreateObject(193231117.66467, -1490.0076932.73600,   0.000000.000000.00000);
    
CreateObject(193251155.41809, -1445.5156316.31000,   0.000000.000000.00000);
    
CreateObject(193251155.47400, -1434.6241516.31000,   0.000000.000000.00000);
    
CreateObject(193251155.31555, -1452.3780516.31000,   0.000000.000000.00000);
    
CreateObject(193251157.44043, -1468.3625516.31000,   0.000000.0000018.00000);
    
CreateObject(193251160.64673, -1478.1243916.31000,   0.000000.0000018.00000);
    
CreateObject(17261159.65356, -1459.8765914.81000,   0.000000.00000180.00000);
    
CreateObject(9481160.45435, -1459.8245814.81080,   0.000000.000000.00000);
    
CreateObject(17261163.44055, -1459.8765914.81000,   0.000000.00000180.00000);
    
CreateObject(22061158.17554, -1451.6098614.81040,   0.000000.00000, -90.00000);
    
CreateObject(23561156.49377, -1452.5220914.81060,   0.000000.00000, -90.00000);
    
CreateObject(191711167.87195, -1452.2637916.80870,   90.00000, -90.000000.00000);
    
CreateObject(191721167.87195, -1456.0408916.80980,   0.000000.00000, -90.00000);
    
CreateObject(14122423.42700, -1771.9102813.74310,   0.000000.0000090.00000);
    
CreateObject(14122423.44043, -1777.0972913.74310,   0.000000.0000090.00000);
    
CreateObject(14122423.43970, -1792.6413613.74310,   0.000000.0000090.00000);
    
CreateObject(14122423.42725, -1797.7973613.74310,   0.000000.0000090.00000);
    
CreateObject(14122423.43652, -1802.9704613.74310,   0.000000.0000090.00000);
    
CreateObject(14122423.43774, -1808.1485613.74310,   0.000000.0000090.00000);
    
CreateObject(14122423.44067, -1813.3269013.74310,   0.000000.0000090.00000);
    
CreateObject(14122423.45142, -1818.5001213.74310,   0.000000.0000090.00000);
    
CreateObject(14122423.45435, -1823.6914113.74310,   0.000000.0000090.00000);
    
CreateObject(14122423.43384, -1828.8433813.74310,   0.000000.0000090.00000);
    
CreateObject(129381723.89807, -1786.5092816.30340,   0.000000.00000, -90.00000);
    
CreateObject(129401723.89807, -1755.9866916.30340,   0.000000.00000, -90.00000);
    
CreateObject(12801722.92749, -1786.4388412.84770,   0.000000.00000, -90.00000);
    
CreateObject(12801722.86658, -1756.3761012.84770,   0.000000.0000090.00000);
    
CreateObject(6251724.66333, -1780.9156512.41350,   0.000000.000000.00000);
    
CreateObject(6251724.37695, -1771.9597212.41350,   0.000000.000000.00000);
    
CreateObject(6251724.54187, -1763.1239012.41350,   0.000000.000000.00000);
    
CreateObject(12311722.25049, -1776.7365713.50800,   0.000000.000000.00000);
    
CreateObject(12311722.56812, -1767.1088913.50800,   0.000000.000000.00000);
    
CreateObject(35931736.29980, -1746.5535912.83990,   0.000000.0000020.02000);
    
CreateObject(35931739.22302, -1745.7246112.83990,   20.060000.0000090.00000);
    
CreateObject(388160.96690, -1533.258185.94950,   0.000000.0000082.00000);
    
CreateObject(388140.05530, -1529.178836.10950,   0.000000.00000, -102.00000);
    
CreateObject(97046.62556, -1528.246584.79010,   0.000000.00000, -10.00000);
    
CreateObject(96637.04860, -1525.455084.14910,   0.000000.00000, -90.00000);
    
CreateObject(97050.88541, -1528.938234.79010,   0.000000.00000, -10.00000);
    
CreateObject(97055.17730, -1529.665414.79010,   0.000000.00000, -10.00000);
    
CreateObject(96664.80869, -1536.977424.14910,   0.000000.0000090.00000);
    
    
//Gates
    
Toll1 CreateObject(968,64.80750,-1536.94873,4.98270,0.00000,90.00000,-90.08000);
    
Toll2 CreateObject(968,37.05920,-1525.51074,4.98270,0.00000,-90.00000,-90.08000);
    return 
1;
}
//Toll1
CMD:opentoll(playeridparams[])
{
    if(
IsPlayerInRangeOfPoint(playerid15.064.80750, -1536.948734.98270))
    {
        
SetTimerEx("CloseGate"7000false"i"playerid);
        
MoveObject(Toll1,64.80750, -1536.948734.982703.0,  0.000000.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);
}
//Toll2
CMD:opentoll(playeridparams[])
{
    if(
IsPlayerInRangeOfPoint(playerid15.0,37.05920,-1525.51074,4.98270))
    {
        
SetTimerEx("CloseGate2"7000false"i"playerid);
        
MoveObject(Toll1,37.05920,-1525.51074,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 CloseGate2(playerid);
public 
CloseGate2(playerid)
{
    
MoveObject(Toll1,37.05920,-1525.51074,4.98270,0.0,0.00000,-90.00000,-90.08000);

Reply
#2

pawn Код:
//Toll2
CMD:opentoll(playerid, params[])
{
    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;
}
Rename that one to "opentoll2"(Or w.e you want the command to be called, but there can't be two commands with the same name..)
So it would be
pawn Код:
//Toll2
CMD:opentoll2(playerid, params[])
{
    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;
}
Reply
#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


Forum Jump:


Users browsing this thread: 1 Guest(s)