Destroy Dynamic Object
#1

i want to Destroy Dynamic Object with a cmd
pawn Код:
new PlayerIcon[18][MAX_PLAYERS];
new PlayerObject[121][MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
for(new i = 0;i<17;i++)
    {
    PlayerIcon[i][playerid] = 0;
    }
    for(new i = 0;i<120;i++)
    {
    PlayerObject[i][playerid] = INVALID_OBJECT_ID;
    }
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmd,"/turfs",true))
    {
    if(TurfShow[playerid] == 0)
    {
    TurfShow[playerid] = 1;
    SCM(playerid,COLOR_ALI,"Turfs Showed on map");
    for(new i = 0;i<sizeof(TurfInfo);i++)
    {
    if(!strcmp(TurfInfo[i][zOwner],"SilenceMafia",true))
    {
    GangZoneShowForPlayer(playerid,Turfs[i],0x5D7E8DAA);
    }
    if(!strcmp(TurfInfo[i][zOwner],"Corlenone",true))
    {
    GangZoneShowForPlayer(playerid,Turfs[i],0x3E3535AA);
    }
    if(!strcmp(TurfInfo[i][zOwner],"Barzini",true))
    {
    GangZoneShowForPlayer(playerid,Turfs[i],0x19AF23AA);
    }
    if(!strcmp(TurfInfo[i][zOwner],"Tattaglia",true))
    {
    GangZoneShowForPlayer(playerid,Turfs[i],0xFFBA00AA);
    }
    if(!strcmp(TurfInfo[i][zOwner],"Falcone",true))
    {
    GangZoneShowForPlayer(playerid,Turfs[i],0x9900FFAA);
    }
    if(!strcmp(TurfInfo[i][zOwner],"Stracci",true))
    {
    GangZoneShowForPlayer(playerid,Turfs[i],0x663300AA);
    }
}
if(IsAMemberC(playerid))
{
SetPlayerMapIcon(playerid,PlayerIcon[0][playerid],791.686645,-1489.740722,13.382812,19,COLOR_YELLOW,MAPICON_GLOBAL);
SetPlayerMapIcon(playerid,PlayerIcon[1][playerid],1197.393310,-1572.463500,13.382812,19,COLOR_YELLOW,MAPICON_GLOBAL);
SetPlayerMapIcon(playerid,PlayerIcon[2][playerid],1303.084716,2798.708251,10.198877,19,COLOR_YELLOW,MAPICON_GLOBAL);
SetPlayerMapIcon(playerid,PlayerIcon[3][playerid],1703.588378,2310.137695,10.820312,19,COLOR_YELLOW,MAPICON_GLOBAL);
SetPlayerMapIcon(playerid,PlayerIcon[4][playerid],2588.771484,2120.581054,10.820312,19,COLOR_YELLOW,MAPICON_GLOBAL);
SetPlayerMapIcon(playerid,PlayerIcon[5][playerid],2327.326171,1562.224853,10.671875,19,COLOR_YELLOW,MAPICON_GLOBAL);
SetPlayerMapIcon(playerid,PlayerIcon[6][playerid],1174.971191,-2037.018920,77.348892,19,COLOR_YELLOW,MAPICON_GLOBAL);
SetPlayerMapIcon(playerid,PlayerIcon[7][playerid],2532.491455,-2049.037109,25.106536,19,COLOR_YELLOW,MAPICON_GLOBAL);
SetPlayerMapIcon(playerid,PlayerIcon[8][playerid],1376.614135,749.132507,10.828023,19,COLOR_YELLOW,MAPICON_GLOBAL);
SetPlayerMapIcon(playerid,PlayerIcon[9][playerid],2547.203613,856.874877,13.740138,19,COLOR_YELLOW,MAPICON_GLOBAL);
SetPlayerMapIcon(playerid,PlayerIcon[10][playerid],2878.906738,-1149.729125,10.882762,19,COLOR_YELLOW,MAPICON_GLOBAL);
SetPlayerMapIcon(playerid,PlayerIcon[11][playerid],2303.340820,-1659.446533,14.486052,19,COLOR_YELLOW,MAPICON_GLOBAL);
SetPlayerMapIcon(playerid,PlayerIcon[12][playerid],194.275314,-1484.386108,12.674532,19,COLOR_YELLOW,MAPICON_GLOBAL);
SetPlayerMapIcon(playerid,PlayerIcon[13][playerid],952.897033,2193.047851,10.671875,19,COLOR_YELLOW,MAPICON_GLOBAL);
SetPlayerMapIcon(playerid,PlayerIcon[14][playerid],2575.772949,2778.181396,10.820312,19,COLOR_YELLOW,MAPICON_GLOBAL);
SetPlayerMapIcon(playerid,PlayerIcon[15][playerid],1885.287231,-2542.874267,17.227045,19,COLOR_YELLOW,MAPICON_GLOBAL);
SetPlayerMapIcon(playerid,PlayerIcon[16][playerid],1068.519775,1317.346313,10.820312,19,COLOR_YELLOW,MAPICON_GLOBAL);
SetPlayerMapIcon(playerid,PlayerIcon[17][playerid],2852.184326,-1770.841308,10.875000,19,COLOR_YELLOW,MAPICON_GLOBAL);
PlayerObject[0][playerid] = CreateDynamicObject(3799, 791.70349, -1489.75159, 12.24784,   0.00000, 0.00000, 344.94595, -1,-1,playerid,1000.0);
PlayerObject[1][playerid] = CreateDynamicObject(2993, 791.62958, -1489.76868, 14.56163,   0.00000, 0.00000, 86.64223, -1,-1,playerid,1000.0);
PlayerObject[2][playerid] = CreateDynamicObject(2358, 791.37128, -1490.82410, 14.69682,   0.00000, 0.00000, 343.79791, -1,-1,playerid,1000.0);
PlayerObject[3][playerid] = CreateDynamicObject(2041, 791.38678, -1490.73413, 15.01428,   0.00000, 0.00000, 254.25645, -1,-1,playerid,1000.0);
PlayerObject[4][playerid] = CreateDynamicObject(3799, 1197.39331, -1572.46350, 12.42962,   0.00000, 0.00000, 0.00000, -1,-1,playerid,1000.0);
PlayerObject[5][playerid] = CreateDynamicObject(2993, 1197.41248, -1572.47290, 14.57500,   0.00000, 0.00000, 86.51657, -1,-1,playerid,1000.0);
PlayerObject[6][playerid] = CreateDynamicObject(2993, 791.62958, -1489.76868, 14.56163,   0.00000, 0.00000, 0.00000, -1,-1,playerid,1000.0);
PlayerObject[7][playerid] = CreateDynamicObject(2993, 791.62958, -1489.76868, 14.56163,   0.00000, 0.00000, 255.98140, -1,-1,playerid,1000.0);
PlayerObject[8][playerid] = CreateDynamicObject(2993, 791.62958, -1489.76868, 14.56163,   0.00000, 0.00000, 186.10373, -1,-1,playerid,1000.0);
PlayerObject[9][playerid] = CreateDynamicObject(2993, 1197.41248, -1572.47290, 14.57500,   0.00000, 0.00000, 0.00000, -1,-1,playerid,1000.0);
PlayerObject[10][playerid] = CreateDynamicObject(2993, 1197.41248, -1572.47290, 14.57500,   0.00000, 0.00000, 272.81198, -1,-1,playerid,1000.0);
PlayerObject[11][playerid] = CreateDynamicObject(2993, 1197.41248, -1572.47290, 14.57500,   0.00000, 0.00000, 180.30391, -1,-1,playerid,1000.0);
PlayerObject[12][playerid] = CreateDynamicObject(2358, 1196.34009, -1572.50293, 14.90910,   0.00000, 0.00000, 269.40128, -1,-1,playerid,1000.0);
PlayerObject[13][playerid] = CreateDynamicObject(2041, 1196.33252, -1572.54248, 15.22292,   0.00000, 0.00000, 0.00000, -1,-1,playerid,1000.0);
PlayerObject[14][playerid] = CreateDynamicObject(3799, 1303.08472, 2798.70825, 9.15032,   0.00000, 0.00000, 0.00000, -1,-1,playerid,1000.0);
PlayerObject[15][playerid] = CreateDynamicObject(2993, 1303.05762, 2798.61890, 11.49330,   0.00000, 0.00000, 90.00000, -1,-1,playerid,1000.0);
PlayerObject[16][playerid] = CreateDynamicObject(2993, 1303.05762, 2798.61890, 11.49328,   0.00000, 0.00000, 0.00000, -1,-1,playerid,1000.0);
PlayerObject[17][playerid] = CreateDynamicObject(2993, 1303.05762, 2798.61890, 11.49330,   0.00000, 0.00000, 270.00000, -1,-1,playerid,1000.0);
PlayerObject[18][playerid] = CreateDynamicObject(2993, 1303.05762, 2798.61890, 11.49330,   0.00000, 0.00000, 180.00000, -1,-1,playerid,1000.0);
PlayerObject[19][playerid] = CreateDynamicObject(2358, 1301.99255, 2798.65405, 11.57870,   0.00000, 0.00000, 270.00000, -1,-1,playerid,1000.0);
PlayerObject[20][playerid] = CreateDynamicObject(2041, 1301.96753, 2798.64624, 11.91231,   0.00000, 0.00000, 0.00000, -1,-1,playerid,1000.0);
PlayerObject[21][playerid] = CreateDynamicObject(3799, 1703.58838, 2310.13770, 9.62870,   0.00000, 0.00000, 0.00000, -1,-1,playerid,1000.0);
PlayerObject[22][playerid] = CreateDynamicObject(2993, 1703.63916, 2310.16724, 11.89534,   0.00000, 0.00000, 0.00000, -1,-1,playerid,1000.0);
PlayerObject[23][playerid] = CreateDynamicObject(2993, 1703.63916, 2310.16724, 11.89530,   0.00000, 0.00000, 270.00000, -1,-1,playerid,1000.0);
PlayerObject[24][playerid] = CreateDynamicObject(2993, 1703.63916, 2310.16724, 11.89530,   0.00000, 0.00000, 180.00000, -1,-1,playerid,1000.0);
PlayerObject[25][playerid] = CreateDynamicObject(2993, 1703.63916, 2310.16724, 11.89530,   0.00000, 0.00000, 90.00000, -1,-1,playerid,1000.0);
PlayerObject[26][playerid] = CreateDynamicObject(2358, 1703.66272, 2309.03589, 12.08800,   0.00000, 0.00000, 0.00000, -1,-1,playerid,1000.0);
PlayerObject[27][playerid] = CreateDynamicObject(2041, 1703.68982, 2308.95996, 12.39781,   0.00000, 0.00000, 89.10115, -1,-1,playerid,1000.0);
PlayerObject[28][playerid] = CreateDynamicObject(3799, 2589.50024, 2121.39551, 9.63712,   0.00000, 0.00000, 0.00000, -1,-1,playerid,1000.0);
PlayerObject[29][playerid] = CreateDynamicObject(2993, 2589.52295, 2121.34229, 11.98520,   0.00000, 0.00000, 270.00000, -1,-1,playerid,1000.0);
PlayerObject[30][playerid] = CreateDynamicObject(2993, 2589.52295, 2121.34229, 11.98518,   0.00000, 0.00000, 0.00000, -1,-1,playerid,1000.0);
PlayerObject[31][playerid] = CreateDynamicObject(2993, 2589.52295, 2121.34229, 11.98518,   0.00000, 0.00000, 0.00000, -1,-1,playerid,1000.0);
PlayerObject[32][playerid] = CreateDynamicObject(2993, 2589.52295, 2121.34229, 11.98520,   0.00000, 0.00000, 180.00000, -1,-1,playerid,1000.0);
PlayerObject[33][playerid] = CreateDynamicObject(2993, 2589.52295, 2121.34229, 11.98520,   0.00000, 0.00000, 90.00000, -1,-1,playerid,1000.0);
PlayerObject[34][playerid] = CreateDynamicObject(2358, 2589.50073, 2120.28320, 12.11211,   0.00000, 0.00000, 0.00000, -1,-1,playerid,1000.0);
PlayerObject[35][playerid] = CreateDynamicObject(2041, 2589.52856, 2120.27612, 12.43200,   0.00000, 0.00000, 270.44391, -1,-1,playerid,1000.0);
PlayerObject[36][playerid] = CreateDynamicObject(3799, 2327.32617, 1562.22485, 9.55314,   0.00000, 0.00000, 0.00000, -1,-1,playerid,1000.0);
PlayerObject[37][playerid] = CreateDynamicObject(2993, 2327.30396, 1562.11890, 11.90005,   0.00000, 0.00000, 0.00000, -1,-1,playerid,1000.0);
PlayerObject[38][playerid] = CreateDynamicObject(2993, 2327.30396, 1562.11890, 11.90010,   0.00000, 0.00000, 90.00000, -1,-1,playerid,1000.0);
PlayerObject[39][playerid] = CreateDynamicObject(2993, 2327.30396, 1562.11890, 11.90010,   0.00000, 0.00000, 180.00000, -1,-1,playerid,1000.0);
PlayerObject[40][playerid] = CreateDynamicObject(2993, 2327.30396, 1562.11890, 11.90010,   0.00000, 0.00000, 270.00000, -1,-1,playerid,1000.0);
PlayerObject[41][playerid] = CreateDynamicObject(2358, 2327.24146, 1561.14978, 12.04766,   0.00000, 0.00000, 359.89594, -1,-1,playerid,1000.0);
PlayerObject[42][playerid] = CreateDynamicObject(2041, 2327.25879, 1561.08032, 12.35166,   0.00000, 0.00000, 270.12265, -1,-1,playerid,1000.0);
PlayerObject[43][playerid] = CreateDynamicObject(2993, 1174.97656, -2036.99341, 76.06121,   0.00000, 0.00000, 0.00000, -1,-1,playerid,1000.0);
PlayerObject[44][playerid] = CreateDynamicObject(3799, 2532.51123, -2049.01685, 25.10654,   0.00000, 0.00000, 0.00000, -1,-1,playerid,1000.0);
PlayerObject[45][playerid] = CreateDynamicObject(2993, 2532.55664, -2049.01855, 27.45170,   0.00000, 0.00000, 0.00000, -1,-1,playerid,1000.0);
PlayerObject[46][playerid] = CreateDynamicObject(2993, 2532.55664, -2049.01855, 27.45170,   0.00000, 0.00000, 90.00000, -1,-1,playerid,1000.0);
PlayerObject[47][playerid] = CreateDynamicObject(2993, 2532.55664, -2049.01855, 27.45170,   0.00000, 0.00000, 180.00000, -1,-1,playerid,1000.0);
PlayerObject[48][playerid] = CreateDynamicObject(2993, 2532.55664, -2049.01855, 27.45170,   0.00000, 0.00000, 270.00000, -1,-1,playerid,1000.0);
PlayerObject[49][playerid] = CreateDynamicObject(2358, 2532.51123, -2050.19336, 27.57008,   0.00000, 0.00000, 0.00000, -1,-1,playerid,1000.0);
PlayerObject[50][playerid] = CreateDynamicObject(2041, 2532.53174, -2050.18652, 27.87918,   0.00000, 0.00000, 268.71133, -1,-1,playerid,1000.0);
PlayerObject[51][playerid] = CreateDynamicObject(3799, 1376.61414, 749.13251, 9.68121,   0.00000, 0.00000, 0.00000, -1,-1,playerid,1000.0);
PlayerObject[52][playerid] = CreateDynamicObject(2993, 1376.57861, 749.07117, 12.02332,   0.00000, 0.00000, 0.00000, -1,-1,playerid,1000.0);
PlayerObject[53][playerid] = CreateDynamicObject(2993, 1376.57861, 749.07123, 12.02330,   0.00000, 0.00000, 90.00000, -1,-1,playerid,1000.0);
PlayerObject[54][playerid] = CreateDynamicObject(2993, 1376.57861, 749.07123, 12.02330,   0.00000, 0.00000, 180.00000, -1,-1,playerid,1000.0);
PlayerObject[55][playerid] = CreateDynamicObject(2993, 1376.57861, 749.07123, 12.02330,   0.00000, 0.00000, 270.00000, -1,-1,playerid,1000.0);
PlayerObject[56][playerid] = CreateDynamicObject(2358, 1376.54822, 748.00629, 12.11666,   0.00000, 0.00000, 0.00000, -1,-1,playerid,1000.0);
PlayerObject[57][playerid] = CreateDynamicObject(2041, 1376.57129, 747.95557, 12.45780,   0.00000, 0.00000, 268.85178, -1,-1,playerid,1000.0);
PlayerObject[58][playerid] = CreateDynamicObject(3799, 2547.20361, 856.87488, 12.54796,   0.00000, 0.00000, 0.00000, -1,-1,playerid,1000.0);
PlayerObject[59][playerid] = CreateDynamicObject(2993, 2547.17993, 856.84027, 14.89551,   0.00000, 0.00000, 0.00000, -1,-1,playerid,1000.0);
PlayerObject[60][playerid] = CreateDynamicObject(2993, 2547.17993, 856.84027, 14.89550,   0.00000, 0.00000, 90.00000, -1,-1,playerid,1000.0);
PlayerObject[61][playerid] = CreateDynamicObject(2993, 2547.17993, 856.84027, 14.89550,   0.00000, 0.00000, 180.00000, -1,-1,playerid,1000.0);
PlayerObject[62][playerid] = CreateDynamicObject(2993, 2547.17993, 856.84027, 14.89550,   0.00000, 0.00000, 270.00000, -1,-1,playerid,1000.0);
PlayerObject[63][playerid] = CreateDynamicObject(2358, 2547.23340, 858.07648, 14.99570,   0.00000, 0.00000, 180.00000, -1,-1,playerid,1000.0);
PlayerObject[64][playerid] = CreateDynamicObject(2041, 2547.21313, 858.07410, 15.30600,   0.00000, 0.00000, 90.00000, -1,-1,playerid,1000.0);
PlayerObject[65][playerid] = CreateDynamicObject(3799, 2878.90674, -1149.72913, 9.74709,   0.00000, 0.00000, 0.00000, -1,-1,playerid,1000.0);
PlayerObject[66][playerid] = CreateDynamicObject(2993, 2878.86890, -1149.77222, 12.09030,   0.00000, 0.00000, 0.00000, -1,-1,playerid,1000.0);
PlayerObject[67][playerid] = CreateDynamicObject(2993, 2878.86890, -1149.77222, 12.09030,   0.00000, 0.00000, 90.00000, -1,-1,playerid,1000.0);
PlayerObject[68][playerid] = CreateDynamicObject(2993, 2878.86890, -1149.77222, 12.09030,   0.00000, 0.00000, 180.00000, -1,-1,playerid,1000.0);
PlayerObject[69][playerid] = CreateDynamicObject(2993, 2878.86890, -1149.77222, 12.09030,   0.00000, 0.00000, 270.00000, -1,-1,playerid,1000.0);
PlayerObject[70][playerid] = CreateDynamicObject(2358, 2878.84253, -1150.83447, 12.20218,   0.00000, 0.00000, 0.00000, -1,-1,playerid,1000.0);
PlayerObject[71][playerid] = CreateDynamicObject(2041, 2878.86230, -1150.86536, 12.53005,   0.00000, 0.00000, 269.54071, -1,-1,playerid,1000.0);
PlayerObject[72][playerid] = CreateDynamicObject(3799, 2303.34082, -1659.44653, 13.32156,   0.00000, 0.00000, 0.00000, -1,-1,playerid,1000.0);
PlayerObject[73][playerid] = CreateDynamicObject(2993, 2303.42603, -1659.39038, 15.66697,   0.00000, 0.00000, 0.00000, -1,-1,playerid,1000.0);
PlayerObject[74][playerid] = CreateDynamicObject(2993, 2303.42603, -1659.39038, 15.66700,   0.00000, 0.00000, 90.00000, -1,-1,playerid,1000.0);
PlayerObject[75][playerid] = CreateDynamicObject(2993, 2303.42603, -1659.39038, 15.66700,   0.00000, 0.00000, 180.00000, -1,-1,playerid,1000.0);
PlayerObject[76][playerid] = CreateDynamicObject(2993, 2303.42603, -1659.39038, 15.66700,   0.00000, 0.00000, 270.00000, -1,-1,playerid,1000.0);
PlayerObject[77][playerid] = CreateDynamicObject(2358, 2302.22388, -1659.36865, 15.78274,   0.00000, 0.00000, 267.82822, -1,-1,playerid,1000.0);
PlayerObject[78][playerid] = CreateDynamicObject(2041, 2302.23975, -1659.36035, 16.09594,   0.00000, 0.00000, 0.00000, -1,-1,playerid,1000.0);
PlayerObject[79][playerid] = CreateDynamicObject(3799, 194.27531, -1484.38611, 11.43077,   0.00000, 0.00000, 324.30881, -1,-1,playerid,1000.0);
PlayerObject[80][playerid] = CreateDynamicObject(2993, 194.20753, -1484.36865, 13.77320,   0.00000, 0.00000, 53.49836, -1,-1,playerid,1000.0);
PlayerObject[81][playerid] = CreateDynamicObject(2993, 194.20753, -1484.36865, 13.77320,   0.00000, 0.00000, 320.33109, -1,-1,playerid,1000.0);
PlayerObject[82][playerid] = CreateDynamicObject(2993, 194.20753, -1484.36865, 13.77320,   0.00000, 0.00000, 235.00343, -1,-1,playerid,1000.0);
PlayerObject[83][playerid] = CreateDynamicObject(2993, 194.20753, -1484.36865, 13.77320,   0.00000, 0.00000, 144.08931, -1,-1,playerid,1000.0);
PlayerObject[84][playerid] = CreateDynamicObject(2358, 193.59723, -1485.27197, 13.90107,   0.00000, 0.00000, 324.06778, -1,-1,playerid,1000.0);
PlayerObject[85][playerid] = CreateDynamicObject(2041, 193.57190, -1485.29810, 14.22248,   0.00000, 0.00000, 55.52545, -1,-1,playerid,1000.0);
PlayerObject[86][playerid] = CreateDynamicObject(3799, 952.89703, 2193.04785, 9.56137,   0.00000, 0.00000, 0.00000, -1,-1,playerid,1000.0);
PlayerObject[87][playerid] = CreateDynamicObject(2993, 952.95770, 2193.05859, 11.90751,   0.00000, 0.00000, 0.00000, -1,-1,playerid,1000.0);
PlayerObject[88][playerid] = CreateDynamicObject(2993, 952.95770, 2193.05859, 11.90750,   0.00000, 0.00000, 90.00000, -1,-1,playerid,1000.0);
PlayerObject[89][playerid] = CreateDynamicObject(2993, 952.95770, 2193.05859, 11.90750,   0.00000, 0.00000, 180.00000, -1,-1,playerid,1000.0);
PlayerObject[90][playerid] = CreateDynamicObject(2993, 952.95770, 2193.05859, 11.90750,   0.00000, 0.00000, 270.00000, -1,-1,playerid,1000.0);
PlayerObject[91][playerid] = CreateDynamicObject(2358, 952.89221, 2194.14209, 11.99050,   0.00000, 0.00000, 180.00000, -1,-1,playerid,1000.0);
PlayerObject[92][playerid] = CreateDynamicObject(2041, 952.90765, 2194.18115, 12.29553,   0.00000, 0.00000, 267.02927, -1,-1,playerid,1000.0);
PlayerObject[93][playerid] = CreateDynamicObject(3799, 2575.77295, 2778.18140, 9.56579,   0.00000, 0.00000, 0.00000, -1,-1,playerid,1000.0);
PlayerObject[94][playerid] = CreateDynamicObject(2993, 2575.74854, 2778.16675, 11.90795,   0.00000, 0.00000, 0.00000, -1,-1,playerid,1000.0);
PlayerObject[95][playerid] = CreateDynamicObject(2993, 2575.74854, 2778.16675, 11.90800,   0.00000, 0.00000, 90.00000, -1,-1,playerid,1000.0);
PlayerObject[96][playerid] = CreateDynamicObject(2993, 2575.74854, 2778.16675, 11.90800,   0.00000, 0.00000, 180.00000, -1,-1,playerid,1000.0);
PlayerObject[97][playerid] = CreateDynamicObject(2993, 2575.74854, 2778.16675, 11.90800,   0.00000, 0.00000, 270.00000, -1,-1,playerid,1000.0);
PlayerObject[98][playerid] = CreateDynamicObject(2358, 2575.82031, 2777.01416, 12.02787,   0.00000, 0.00000, 0.00000, -1,-1,playerid,1000.0);
PlayerObject[99][playerid] = CreateDynamicObject(2041, 2575.84863, 2776.99316, 12.31123,   0.00000, 0.00000, 269.78079, -1,-1,playerid,1000.0);
PlayerObject[100][playerid] = CreateDynamicObject(3799, 1885.37292, -2543.08154, 16.23158,   0.00000, 0.00000, 0.00000, -1,-1,playerid,1000.0);
PlayerObject[101][playerid] = CreateDynamicObject(2993, 1885.48206, -2543.03711, 18.55131,   0.00000, 0.00000, 0.00000, -1,-1,playerid,1000.0);
PlayerObject[102][playerid] = CreateDynamicObject(2993, 1885.48206, -2543.03711, 18.55130,   0.00000, 0.00000, 90.00000, -1,-1,playerid,1000.0);
PlayerObject[103][playerid] = CreateDynamicObject(2993, 1885.48206, -2543.03711, 18.55130,   0.00000, 0.00000, 180.00000, -1,-1,playerid,1000.0);
PlayerObject[104][playerid] = CreateDynamicObject(2993, 1885.48206, -2543.03711, 18.55130,   0.00000, 0.00000, 270.00000, -1,-1,playerid,1000.0);
PlayerObject[105][playerid] = CreateDynamicObject(2358, 1884.31628, -2543.06250, 18.65955,   0.00000, 0.00000, 268.78702, -1,-1,playerid,1000.0);
PlayerObject[106][playerid] = CreateDynamicObject(2041, 1884.34973, -2543.04199, 18.99292,   0.00000, 0.00000, 0.00000, -1,-1,playerid,1000.0);
PlayerObject[107][playerid] = CreateDynamicObject(3799, 1068.51978, 1317.34631, 9.62971,   0.00000, 0.00000, 0.00000, -1,-1,playerid,1000.0);
PlayerObject[108][playerid] = CreateDynamicObject(2993, 1068.51965, 1317.23340, 11.97746,   0.00000, 0.00000, 0.00000, -1,-1,playerid,1000.0);
PlayerObject[109][playerid] = CreateDynamicObject(2993, 1068.51965, 1317.23340, 11.97750,   0.00000, 0.00000, 90.00000, -1,-1,playerid,1000.0);
PlayerObject[110][playerid] = CreateDynamicObject(2993, 1068.51965, 1317.23340, 11.97750,   0.00000, 0.00000, 180.00000, -1,-1,playerid,1000.0);
PlayerObject[111][playerid] = CreateDynamicObject(2993, 1068.51965, 1317.23340, 11.97750,   0.00000, 0.00000, 270.00000, -1,-1,playerid,1000.0);
PlayerObject[112][playerid] = CreateDynamicObject(2358, 1068.52124, 1316.30664, 12.07877,   0.00000, 0.00000, 0.00000, -1,-1,playerid,1000.0);
PlayerObject[113][playerid] = CreateDynamicObject(2041, 1068.54370, 1316.23413, 12.40489,   0.00000, 0.00000, 269.18961, -1,-1,playerid,1000.0);
PlayerObject[114][playerid] = CreateDynamicObject(3799, 2851.72290, -1770.82495, 9.73930,   0.00000, 0.00000, 353.76099, -1,-1,playerid,1000.0);
PlayerObject[115][playerid] = CreateDynamicObject(2993, 2851.70288, -1770.82349, 12.08210,   0.00000, 0.00000, 0.00000, -1,-1,playerid,1000.0);
PlayerObject[116][playerid] = CreateDynamicObject(2993, 2851.70288, -1770.82349, 12.08210,   0.00000, 0.00000, 90.00000, -1,-1,playerid,1000.0);
PlayerObject[117][playerid] = CreateDynamicObject(2993, 2851.70288, -1770.82349, 12.08210,   0.00000, 0.00000, 180.00000, -1,-1,playerid,1000.0);
PlayerObject[118][playerid] = CreateDynamicObject(2993, 2851.70288, -1770.82349, 12.08210,   0.00000, 0.00000, 270.00000, -1,-1,playerid,1000.0);
PlayerObject[119][playerid] = CreateDynamicObject(2358, 2851.62573, -1771.92761, 12.18906,   0.00000, 0.00000, 353.51865, -1,-1,playerid,1000.0);
PlayerObject[120][playerid] = CreateDynamicObject(2041, 2851.62769, -1771.91626, 12.53444,   0.00000, 0.00000, 82.98241, -1,-1,playerid,1000.0);
    }
    }
    return 1;
    }
    if(TurfShow[playerid] == 1)
    {
    if(IsAMemberC(playerid))
    {
    for(new i = 0;i<18;i++)
    {
    RemovePlayerMapIcon(playerid,PlayerIcon[i][playerid]);
    }
    for(new i = 0;i<120;i++)
    {
    DestroyDynamicObject(PlayerObject[i][playerid]);
    }
    }
    TurfShow[playerid] = 0;
    SCM(playerid,COLOR_ALI,"Turfs hidded from map");
    for(new i = 0;i<sizeof(TurfInfo);i++)
    {
    GangZoneHideForPlayer(playerid,Turfs[i]);
    }
    }
    return 1;
    }
why object not destroy?
Reply
#2

PHP код:
DestroyPlayerObject(playeridobjectid); 
By: Here.
Reply
#3

I misread it. Debug it and see:

pawn Код:
for(new i = 0;i<121;i++)
{
    if(IsValidDynamicObject(PlayerObject[i][playerid]))
    {
        printf("Objectid %d is valid", PlayerObject[i][playerid]);
        DestroyDynamicObject(PlayerObject[i][playerid]);
    }
    else printf("Objectid %d is not valid", PlayerObject[i][playerid]);
}
Reply
#4

Код HTML:
PHP Code:
DestroyPlayerObject(playerid, objectid);
Ley, it isn't CreatePlayerObject!
it's CreateDynamicObject!
i created that with Streamer(CreateDynamicObject)

Код HTML:
DestroyDynamicObject(playerid, PlayerObject[i][playerid]);
in my codes its :
pawn Код:
native DestroyDynamicObject(objectid);
Reply
#5

If you look at the post for the streamer, the function is clearly posted (This is aimed at the people telling you to use Destroy PlayerObject).
Код:
native DestroyDynamicObject(objectid);
Be sure to check your loop, and if you need to, use the print function to display a message in console, you can do this to see what steps are not working properly.
Reply
#6

Код:
Be sure to check your loop, and if you need to, use the print function to display a message in console, you can do this to see what steps are not working properly.
i putted the SendClientMessage between functions step by step and all sended
but still not destroy objects ...

and only show latest Frag map icon from 18 Frags ...
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)