horsemeat

jbobjects 1.6

Feb 4th, 2014
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 248.38 KB | None | 0 0
  1. //----------------------------------JB-----------------------------------//
  2. //-----------------------------Samp-objects------------------------------//
  3. //---------------------------------V1.6----------------------------------//
  4. //------------------------Gameman87/horsemeat----------------------------//
  5. //-----------------------------built-on-0.3x-----------------------------//
  6. //--------------------LastUpdate-for-0.3x-2,4,2014----------------------//
  7. //go here for the latest updates --  http://forum.sa-mp.com/showthread.php?p=2491930#post2491930
  8. //----------------------------------------Changes------------------------------------------------------//
  9. //The was how objects are counted has been change rather then having a object count I have change it to check the state of an object
  10. //Import map is not functioning more accurately and any position issues have been fixed
  11. //-----------------------------------------------------------------------------------------------------//
  12. #include <a_samp>//Thanks SA-MP developers
  13. #include <zcmd>//Thanks Zeex
  14. #include <sscanf2>//Thanks Y_Less
  15. #include <dini>//Thanks DracoBlue
  16. #include <streamer>//Thanks Incognito
  17. #define RED 0xFF0000ff
  18. #define DARKBLUE 0x0000FFff
  19. #define LIGHTBLUE 0x00E1FFff
  20. #define GREEN 0x22D451ff
  21. #define YELLOW 0xEAFF00ff
  22. #define BLUEGREEN 0xA5C9B0ff
  23. #define PINK 0xFF00CCff
  24. #define WHITE 0xFFFFFFff
  25. #define GREY 0x969696ff
  26. #define PURPLE 0x74007AAA
  27. #define ORANGE 0xFF7700ff
  28. #define COLOR YELLOW//You can change the Color of labels
  29. #define MAX 50
  30. #define DIALOG_ADDOBJECTS 5
  31. #define DIALOG_CUSTOMINPUT 6
  32. #define DIALOG_SAMPLOGOS 7
  33. #define DIALOG_PARTICLEEFFECTS 8
  34. #define DIALOG_LANDMASSES 9
  35. #define DIALOG_BASES 10
  36. #define DIALOG_ELEVATOR 11
  37. #define DIALOG_DMCAGES 12
  38. #define DIALOG_PARKOUR 14
  39. #define DIALOG_PLATFORMS 15
  40. #define DIALOG_TUNNELS 16
  41. #define DIALOG_RAMPS 17
  42. #define DIALOG_ROADS 18
  43. #define DIALOG_BRIDGES 19
  44. #define DIALOG_TUBES 20
  45. #define DIALOG_SPHERES 21
  46. #define DIALOG_OTHERS 22
  47. #define DIALOG_PARTICLEEFFECTSP1 23
  48. #define DIALOG_PARTICLEEFFECTSP2 24
  49. #define DIALOG_PARTICLEEFFECTSP3 25
  50. #define DIALOG_PARTICLEEFFECTSP4 26
  51. #define DIALOG_PARTICLEEFFECTSP5 27
  52. #define DIALOG_TUBESP1 28
  53. #define DIALOG_TUBESP2 29
  54. #define DIALOG_CUSTOMINPUTSTRING 30
  55. #define DIALOG_FAVORITEADDDELETE 31
  56. #define DIALOG_FAVORITEADD 32
  57. #define DIALOG_FAVORITEDELETE 33
  58. #define DIALOG_FAVORITEINPORT 34
  59. #define DIALOG_FAVORITEINPUTSTRING 35
  60. #define DIALOG_FAVORITEINPUTOBJECTID 36
  61. #define DIALOG_NOT 37
  62. #define LESSTHENZERO 38
  63. #define MAX_OPERATIONS 4
  64. #define MAPNAME 39
  65. #define OPENMAP 40
  66. #define OPENMAPINPUTEDIT 41
  67. #define OPENMAPINPUTVIEW 42
  68. #define OPENMAPLISTVIEW 43
  69. #define MAPNAMEEXITS 44
  70. #define MAPDOSENOTEXITS 45
  71. #define CLOSEMAP 46
  72. #define CLOSEMAPVIEW 47
  73. #define CLOSEMAPEDIT 48
  74. #define HOLDING(%0) ((newkeys & (%0)) == (%0))
  75. #define PRESSED(%0) (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
  76. #define RELEASED(%0) (((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0)))
  77. new Float:DISTANCELABEL = 25.0;
  78. new objectsfilename[128];
  79. new objectstate[MAX_OBJECTS];
  80. new objectindex[MAX_PLAYERS];
  81. new PlayerText3D:objectlabel[MAX_OBJECTS];
  82. new objects[MAX_OBJECTS];
  83. new jbobjectid[MAX_OBJECTS],playerpick[MAX_PLAYERS],objectstring[128][MAX_OBJECTS];
  84. new Float:objx[MAX_OBJECTS],Float:objy[MAX_OBJECTS],Float:objz[MAX_OBJECTS],Float:objxrot[MAX_OBJECTS],Float:objyrot[MAX_OBJECTS],Float:objzrot[MAX_OBJECTS];
  85. new editobjnum[MAX_PLAYERS];
  86. new Float:oldx[MAX_PLAYERS],Float:oldy[MAX_PLAYERS],Float:oldz[MAX_PLAYERS],Float:oldxrot[MAX_PLAYERS],Float:oldyrot[MAX_PLAYERS],Float:oldzrot[MAX_PLAYERS],editfirstcheck[MAX_PLAYERS];
  87. new slotobjectid[12],slotstring[128][12],slotstate[12],favoritedialogstring[128],listitempicked[MAX_PLAYERS];
  88. new showlabel[MAX_PLAYERS];
  89. new allowence[4][MAX_PLAYERS],allowencejoin[MAX_OPERATIONS],playersinput;
  90. new hex:objectcolor[MAX_OBJECTS];
  91. new mapplayereditstate[MAX_PLAYERS] = 0;
  92. new Float:playermapx[MAX][MAX_OBJECTS],Float:playermapy[MAX][MAX_OBJECTS],Float:playermapz[MAX][MAX_OBJECTS],Float:playermapxrot[MAX][MAX_OBJECTS],Float:playermapyrot[MAX][MAX_OBJECTS],Float:playermapzrot[MAX][MAX_OBJECTS];
  93. new mapname[128][MAX];
  94. new mapobject[MAX][MAX_OBJECTS];
  95. new PlayerText3D:mapobjectlabel[MAX][MAX_OBJECTS];
  96. new mapplayereditingname[128][MAX];
  97. new mapplayerslot[MAX];
  98. new mapplayerslotid[MAX_PLAYERS];
  99. new mapobjectstate[MAX][MAX_OBJECTS];
  100. new mapobjectmid[MAX][MAX_OBJECTS];
  101. new edittype[MAX_PLAYERS];
  102. new viewobject[13][MAX_OBJECTS];
  103. new viewslot[13];
  104. new viewstring[128][13];
  105. new viewselected[MAX_PLAYERS];
  106. //top
  107. forward IsPlayerLoggingIntoAdmin();
  108. forward InputAdminSystem(playerid,level);
  109. /*public InputAdminSystem(playerid,level)
  110. {
  111.     //put your custom admin system here and uncomment (do not leave blank unless commented
  112.     return 1;
  113. }*/
  114. CMD:objecthelp(playerid,params[])
  115. {
  116.     SendClientMessage(playerid,YELLOW, "/enablelabels/disablelabels/moveawayfromobject/getobject/openmap/createmap/closemap");
  117.     SendClientMessage(playerid,YELLOW, "/addobject-/moveobject-/deleteobject-/copyobject-/gotoobject/setobject/setobjectcolor");
  118.     SendClientMessage(playerid,YELLOW, "/deletemap /renameobject/importmap/disallowplayerbuildonjoin-/allowplayerbuildonjoin-/setplayerlabelstate");
  119.     SendClientMessage(playerid,YELLOW, "/deleteallobjects-/labeldistance-/jbobjectscheck-/allowplayer-/exportmap");
  120.     return 1;
  121. }
  122. CMD:createmap(playerid,params[])
  123. {
  124.     if(IsPlayerAdmince(playerid,3)||(allowence[3][playerid])==1)
  125.     {
  126.         if((mapplayereditstate[playerid])==0)
  127.         {
  128.             ShowPlayerDialog(playerid,MAPNAME,DIALOG_STYLE_INPUT,"Input","Please input the name of the map you wish to create","Ok","Cancel");
  129.         }
  130.         else
  131.         {
  132.             SendClientMessage(playerid, RED, "You have to close the map before you can create a new one");
  133.         }
  134.     }
  135.     else
  136.     {
  137.         SendClientMessage(playerid, RED, "You have to be allowed to edit for every thing or you have to be admin");
  138.     }
  139.     return 1;
  140. }
  141. CMD:openmap(playerid, params[])
  142. {
  143.     if(IsPlayerAdmince(playerid,3)||(allowence[3][playerid])==1)
  144.     {
  145.         ShowPlayerDialog(playerid,OPENMAP,DIALOG_STYLE_MSGBOX,"Select","you can ether edit a map or open it just for viewing purposes","Edit","View");
  146.         SendClientMessageToAll(ORANGE,"!Note someone is loading a map this might lag depening on the size of the map");
  147.     }
  148.     else
  149.     {
  150.         SendClientMessage(playerid, RED, "you have to be allowed to buildmaps or be admin inorder to use this command");
  151.     }
  152.     return 1;
  153. }
  154. CMD:closemap(playerid, params[])
  155. {
  156.     if(IsPlayerAdmince(playerid,3)||(allowence[3][playerid])==1)
  157.     {
  158.         ShowPlayerDialog(playerid,CLOSEMAP,DIALOG_STYLE_MSGBOX,"select","please select the mode you want to close","Edit","View");
  159.     }
  160.     else
  161.     {
  162.         SendClientMessage(playerid, RED, "you have to be allowed to buildmaps or be admin inorder to use this command");
  163.     }
  164.     return 1;
  165. }
  166. CMD:deletemap(playerid, params[])
  167. {
  168.     if(IsPlayerAdmince(playerid,3)||(allowence[3][playerid])==1)
  169.     {
  170.         new input[64],string[128];
  171.         if((mapplayereditstate[playerid])==1)
  172.         {
  173.             return SendClientMessage(playerid, RED, "Please close any maps you are editing");
  174.         }
  175.         if(sscanf(params,"s["#64"]",input))
  176.         {
  177.             return SendClientMessage(playerid,RED,"SYNTAX deletemap [mapname]");
  178.         }
  179.         new addstr[64];
  180.         format(addstr,sizeof(addstr),"%s",input);
  181.         format(input,sizeof(input),"JBobjects/%s.map",addstr);
  182.         if(dini_Exists(input))
  183.         {
  184.             for(new count;count < MAX;count++)
  185.             {
  186.                 if(!isnull(mapname[count]))
  187.                 {
  188.                     if(strcmp(mapname[count],input,true,64)==0)
  189.                     {
  190.                         format(string,sizeof(string),"%s is currently editing the map you want to delete",mapplayereditingname[count]);
  191.                         SendClientMessage(playerid,RED,string);
  192.                         return 1;
  193.                     }
  194.                 }
  195.             }
  196.             new ownername[128];
  197.             format(ownername,sizeof(ownername),"%s",dini_Get(input,"mapplayereditingname"));
  198.             new name[128];
  199.             GetPlayerName(playerid,name,sizeof(name));
  200.             if(!IsPlayerAdmince(playerid,3))
  201.             {
  202.                 if(strcmp(name,ownername,true,128)!=0)
  203.                 {
  204.                     return SendClientMessage(playerid, RED, "You cannot delete this map it is not yours only admins can delete other peoples maps");
  205.                 }
  206.             }
  207.             new slotid = mapplayerslotid[playerid];
  208.             new savestringname[128];
  209.  
  210.             for(new count;count < MAX_OBJECTS;count++)
  211.             {
  212.                 if((mapobjectstate[slotid][count])== 1)
  213.                 {
  214.                     format(savestringname,sizeof(savestringname),"playermapx[%i]",count);
  215.                     dini_FloatSet(input,savestringname,(0));
  216.                     dini_Unset(input,savestringname);
  217.                     format(savestringname,sizeof(savestringname),"playermapy[%i]",count);
  218.                     dini_FloatSet(input,savestringname,(0));
  219.                     dini_Unset(input,savestringname);
  220.                     format(savestringname,sizeof(savestringname),"playermapz[%i]",count);
  221.                     dini_FloatSet(input,savestringname,(0));
  222.                     dini_Unset(input,savestringname);
  223.                     format(savestringname,sizeof(savestringname),"playermapxrot[%i]",count);
  224.                     dini_FloatSet(input,savestringname,(0));
  225.                     dini_Unset(input,savestringname);
  226.                     format(savestringname,sizeof(savestringname),"playermapyrot[%i]",count);
  227.                     dini_FloatSet(input,savestringname,(0));
  228.                     dini_Unset(input,savestringname);
  229.                     format(savestringname,sizeof(savestringname),"playermapzrot[%i]",count);
  230.                     dini_FloatSet(input,savestringname,(0));
  231.                     dini_Unset(input,savestringname);
  232.                     format(savestringname,sizeof(savestringname),"mapobjectstring[%i]",count);
  233.                     dini_Set(input,savestringname,(""));
  234.                     dini_Unset(input,savestringname);
  235.                     format(savestringname,sizeof(savestringname),"mapobjectmid[%i]",count);
  236.                     dini_IntSet(input,savestringname,(0));
  237.                     dini_Unset(input,savestringname);
  238.                     format(savestringname,sizeof(savestringname),"mapobjectstate[%i]",count);
  239.                     dini_IntSet(input,savestringname,(0));
  240.                     dini_Unset(input,savestringname);
  241.                 }
  242.             }
  243.             CloseMap(playerid);
  244.             dini_Remove(input);
  245.             SendClientMessage(playerid, RED, "You have delete a map");
  246.         }
  247.         else
  248.         {
  249.             SendClientMessage(playerid, RED, "This Map Does Not exists");
  250.         }
  251.     }
  252.     else
  253.     {
  254.         SendClientMessage(playerid, RED, "you have to be allowed to buildmaps or be admin inorder to use this command");
  255.     }
  256.     return 1;
  257. }
  258. CMD:importmap(playerid, params[])
  259. {
  260.     if(IsPlayerAdmince(playerid, 5))
  261.     {
  262.         new loadfilename[64],savefilename[64];
  263.         if((mapplayereditstate[playerid])==1)
  264.         {
  265.             return SendClientMessage(playerid,RED, "Please Close any maps you are currently editing");
  266.         }
  267.         if(sscanf(params,"s["#64"]s["#64"]",loadfilename,savefilename))
  268.         {
  269.             return SendClientMessage(playerid,RED, "SYNTAX /importmap [inportname] [newfilename]");
  270.         }
  271.         new addstr[512];
  272.         new string[512];
  273.         format(addstr,sizeof(addstr),"%s",loadfilename);
  274.         format(loadfilename,sizeof(loadfilename),"JBobjects/%s.txt",addstr);
  275.         format(addstr,sizeof(addstr),"%s",savefilename);
  276.         format(savefilename,sizeof(savefilename),"JBobjects/%s.map",addstr);
  277.         if(dini_Exists(savefilename))
  278.         {
  279.             return SendClientMessage(playerid, RED, "This file already exists");
  280.         }
  281.         dini_Create(savefilename);
  282.         new File:mapfile = fopen(loadfilename, io_read);
  283.         if(mapfile)
  284.         {
  285.             new linecount;
  286.             new savestringname[128];
  287.             new name[128];
  288.             SendClientMessageToAll(ORANGE, "!Note someone is importing a map it might lag depening on the size");
  289.             while(fread(mapfile,string))
  290.             {
  291.                 new stage = 0;
  292.                 new objstring[128];
  293.                 new objstringcount;
  294.                 new finish = 0;
  295.                 new Float:currentcharecterid[6];//Float:X,Float:Y,Float:Z,Float:XR,Float:YR,Float:ZR;
  296.                 new modelid;
  297.                 format(addstr,sizeof(addstr),"");
  298.                 if(!isnull(string))
  299.                 {
  300.                     for(new count = 0;count < sizeof(string)-3;count++)
  301.                     {
  302.                         new str[512];
  303.                         if((stage)==0)
  304.                         {
  305.                             format(str,sizeof(str),"%c%c%c%c%c%c%c%c%c%c%c%c",string[count],string[count+1],string[count+2],string[count+3],string[count+4],string[count+5],string[count+6],string[count+7],string[count+8],string[count+9],string[count+10],string[count+11]);
  306.                             while(strcmp(str,"CreateObject",false,sizeof(str))!=0)
  307.                             {
  308.                                 if((count) < sizeof(string))
  309.                                 {
  310.                                     count ++;
  311.                                     format(str,sizeof(str),"%c%c%c%c%c%c%c%c%c%c%c%c",string[count],string[count+1],string[count+2],string[count+3],string[count+4],string[count+5],string[count+6],string[count+7],string[count+8],string[count+9],string[count+10],string[count+11]);
  312.                                 }
  313.                                 else
  314.                                 {
  315.                                     break;
  316.                                 }
  317.                             }
  318.                             stage = 1;
  319.                             continue;
  320.                         }
  321.                         else if((stage)==1)
  322.                         {
  323.                             if((count) > sizeof(string))
  324.                             {
  325.                                 break;
  326.                             }
  327.                             while(string[count] != '(')
  328.                             {
  329.                                 if((count) < sizeof(string))
  330.                                 {
  331.                                     count ++;
  332.                                 }
  333.                                 else
  334.                                 {
  335.                                     break;
  336.                                 }
  337.                             }
  338.                             stage = 2;
  339.                             continue;
  340.                         }
  341.                         else if((stage)==2)
  342.                         {
  343.                             new tmpstr[256];
  344.                             while(string[count] != ',')
  345.                             {
  346.                                 if((count) < sizeof(string))
  347.                                 {
  348.                                     while(string[count] == ' ')
  349.                                     {
  350.                                         if((count) < sizeof(string))
  351.                                         {
  352.                                             count++;
  353.                                         }
  354.                                         else
  355.                                         {
  356.                                             break;
  357.                                         }
  358.                                     }
  359.                                     format(str,sizeof(str),"%s",tmpstr);
  360.                                     format(tmpstr,sizeof(tmpstr),"%s%c",str,string[count]);
  361.                                     count++;
  362.                                 }
  363.                                 else
  364.                                 {
  365.                                     break;
  366.                                 }
  367.                             }
  368.                             modelid = strval(tmpstr);
  369.                             stage = 3;
  370.                             continue;
  371.                         }
  372.                         else if((stage)==3)
  373.                         {
  374.                             new tmpstr[256];
  375.                             while(string[count] != ',')
  376.                             {
  377.                                 if((count) < sizeof(string))
  378.                                 {
  379.                                     while(string[count] == ' ')
  380.                                     {
  381.                                         if((count) < sizeof(string))
  382.                                         {
  383.                                             count++;
  384.                                         }
  385.                                         else
  386.                                         {
  387.                                             break;
  388.                                         }
  389.                                     }
  390.                                     format(str,sizeof(str),"%s",tmpstr);
  391.                                     format(tmpstr,sizeof(tmpstr),"%s%c",str,string[count]);
  392.                                     count++;
  393.                                 }
  394.                                 else
  395.                                 {
  396.                                     break;
  397.                                 }
  398.                             }
  399.                             currentcharecterid[0] = floatstr(tmpstr);
  400.                             stage = 4;
  401.                             continue;
  402.                         }
  403.                         else if((stage)==4)
  404.                         {
  405.                             new tmpstr[256];
  406.                             while(string[count] != ',')
  407.                             {
  408.                                 if((count) < sizeof(string))
  409.                                 {
  410.                                     while(string[count] == ' ')
  411.                                     {
  412.                                         if((count) < sizeof(string))
  413.                                         {
  414.                                             count++;
  415.                                         }
  416.                                         else
  417.                                         {
  418.                                             break;
  419.                                         }
  420.                                     }
  421.                                     format(str,sizeof(str),"%s",tmpstr);
  422.                                     format(tmpstr,sizeof(tmpstr),"%s%c",str,string[count]);
  423.                                     count++;
  424.                                 }
  425.                                 else
  426.                                 {
  427.                                     break;
  428.                                 }
  429.                             }
  430.                             currentcharecterid[1] = floatstr(tmpstr);
  431.                             stage = 5;
  432.                             continue;
  433.                         }
  434.                         else if((stage)==5)
  435.                         {
  436.                             new tmpstr[256];
  437.                             while(string[count] != ',')
  438.                             {
  439.                                 if((count) < sizeof(string))
  440.                                 {
  441.                                     while(string[count] == ' ')
  442.                                     {
  443.                                         if((count) < sizeof(string))
  444.                                         {
  445.                                             count++;
  446.                                         }
  447.                                         else
  448.                                         {
  449.                                             break;
  450.                                         }
  451.                                     }
  452.                                     format(str,sizeof(str),"%s",tmpstr);
  453.                                     format(tmpstr,sizeof(tmpstr),"%s%c",str,string[count]);
  454.                                     count++;
  455.                                 }
  456.                                 else
  457.                                 {
  458.                                     break;
  459.                                 }
  460.                             }
  461.                             currentcharecterid[2] = floatstr(tmpstr);
  462.                             stage = 6;
  463.                             continue;
  464.                         }
  465.                         else if((stage)==6)
  466.                         {
  467.                             new tmpstr[256];
  468.                             while(string[count] != ',')
  469.                             {
  470.                                 if((count) < sizeof(string))
  471.                                 {
  472.                                     while(string[count] == ' ')
  473.                                     {
  474.                                         if((count) < sizeof(string))
  475.                                         {
  476.                                             count++;
  477.                                         }
  478.                                         else
  479.                                         {
  480.                                             break;
  481.                                         }
  482.                                     }
  483.                                     format(str,sizeof(str),"%s",tmpstr);
  484.                                     format(tmpstr,sizeof(tmpstr),"%s%c",str,string[count]);
  485.                                     count++;
  486.                                 }
  487.                                 else
  488.                                 {
  489.                                     break;
  490.                                 }
  491.                             }
  492.                             currentcharecterid[3] = floatstr(tmpstr);
  493.                             stage = 7;
  494.                             continue;
  495.                         }
  496.                         else if((stage)==7)
  497.                         {
  498.                             new tmpstr[256];
  499.                             while(string[count] != ',')
  500.                             {
  501.                                 if((count) < sizeof(string))
  502.                                 {
  503.                                     while(string[count] == ' ')
  504.                                     {
  505.                                         if((count) < sizeof(string))
  506.                                         {
  507.                                             count++;
  508.                                         }
  509.                                         else
  510.                                         {
  511.                                             break;
  512.                                         }
  513.                                     }
  514.                                     format(str,sizeof(str),"%s",tmpstr);
  515.                                     format(tmpstr,sizeof(tmpstr),"%s%c",str,string[count]);
  516.                                     count++;
  517.                                 }
  518.                                 else
  519.                                 {
  520.                                     break;
  521.                                 }
  522.                             }
  523.                             currentcharecterid[4] = floatstr(tmpstr);
  524.                             stage = 8;
  525.                             continue;
  526.                         }
  527.                         else if((stage)==8)
  528.                         {
  529.                             new tmpstr[256];
  530.                             while(string[count] != ')')
  531.                             {
  532.                                 if((count) < sizeof(string))
  533.                                 {
  534.                                     while(string[count] == ' ')
  535.                                     {
  536.                                         if((count) < sizeof(string))
  537.                                         {
  538.                                             count++;
  539.                                         }
  540.                                         else
  541.                                         {
  542.                                             break;
  543.                                         }
  544.                                     }
  545.                                     format(str,sizeof(str),"%s",tmpstr);
  546.                                     format(tmpstr,sizeof(tmpstr),"%s%c",str,string[count]);
  547.                                     count++;
  548.                                 }
  549.                                 else
  550.                                 {
  551.                                     break;
  552.                                 }
  553.                             }
  554.                             currentcharecterid[5] = floatstr(tmpstr);
  555.                             stage = 9;
  556.                             continue;
  557.                         }
  558.                         else if((stage)==9)
  559.                         {
  560.                             while(string[count] != ';')
  561.                             {
  562.                                 if((count) < sizeof(string))
  563.                                 {
  564.                                     count++;
  565.                                 }
  566.                                 else
  567.                                 {
  568.                                     break;
  569.                                 }
  570.                             }
  571.                             stage = 10;
  572.                             finish = 1;
  573.                             continue;
  574.                         }
  575.                         else if((stage)==10)
  576.                         {
  577.                             format(str,sizeof(str),"%c%c",string[count],string[count + 1]);
  578.                             while(strcmp(str,"//",false,sizeof(str))!=0)
  579.                             {
  580.                                 if((count) < sizeof(string))
  581.                                 {
  582.                                     count++;
  583.                                     format(str,sizeof(str),"%c%c",string[count],string[count + 1]);
  584.                                 }
  585.                                 else
  586.                                 {
  587.                                     break;
  588.                                 }
  589.                             }
  590.                             count++;
  591.                             stage = 11;
  592.                             continue;
  593.                         }
  594.                         else if((stage)==11)
  595.                         {
  596.                             if((objstringcount) < 128)
  597.                             {
  598.                                 format(addstr,sizeof(addstr),"%s%c",objstring,string[count]);
  599.                                 format(objstring,sizeof(objstring),"%s",addstr);
  600.                                 objstringcount++;
  601.                             }
  602.                             else
  603.                             {
  604.                                 objstringcount = 0;
  605.                                 stage = 0;
  606.                                 break;
  607.                             }
  608.                         }
  609.                     }
  610.                 }
  611.                 if((finish)==1)
  612.                 {
  613.                     printf("line-%i CreateObject(modelid = %i,Float:X = %f,Float:Y = %f,Float:Z = %f,Float:XR = %f,Float:YR = %f,Float:ZR=%f);//%s",linecount,modelid,currentcharecterid[0],currentcharecterid[1],currentcharecterid[2],currentcharecterid[3],currentcharecterid[4],currentcharecterid[5],objstring);
  614.                     format(savestringname,sizeof(savestringname),"playermapx[%i]",linecount);
  615.                     dini_FloatSet(savefilename,savestringname,(currentcharecterid[0]));
  616.                     format(savestringname,sizeof(savestringname),"playermapy[%i]",linecount);
  617.                     dini_FloatSet(savefilename,savestringname,(currentcharecterid[1]));
  618.                     format(savestringname,sizeof(savestringname),"playermapz[%i]",linecount);
  619.                     dini_FloatSet(savefilename,savestringname,(currentcharecterid[2]));
  620.                     format(savestringname,sizeof(savestringname),"playermapxrot[%i]",linecount);
  621.                     dini_FloatSet(savefilename,savestringname,(currentcharecterid[3]));
  622.                     format(savestringname,sizeof(savestringname),"playermapyrot[%i]",linecount);
  623.                     dini_FloatSet(savefilename,savestringname,(currentcharecterid[4]));
  624.                     format(savestringname,sizeof(savestringname),"playermapzrot[%i]",linecount);
  625.                     dini_FloatSet(savefilename,savestringname,(currentcharecterid[5]));
  626.                     format(savestringname,sizeof(savestringname),"mapobjectmid[%i]",linecount);
  627.                     dini_IntSet(savefilename,savestringname,(modelid));
  628.                     format(savestringname,sizeof(savestringname),"mapobjectstate[%i]",linecount);
  629.                     dini_IntSet(savefilename,savestringname,(1));
  630.                     format(savestringname,sizeof(savestringname),"mapobjectstring[%i]",linecount);
  631.                     dini_Set(savefilename,savestringname,(objstring));
  632.                     linecount++;
  633.                 }
  634.                 else
  635.                 {
  636.                     printf("error with line-%i",linecount);
  637.                 }
  638.             }
  639.             dini_Set(savefilename,"mapname",(savefilename));
  640.             GetPlayerName(playerid, name,sizeof(name));
  641.             dini_Set(savefilename,"mapplayereditingname",(name));
  642.             SendClientMessage(playerid, PINK, "!Done check the log for any error details");
  643.             fclose(mapfile);
  644.             for(new i;i < MAX_PLAYERS;i++)
  645.             {
  646.                 if(IsPlayerConnected(i))
  647.                 {
  648.                     TogglePlayerControllable(i,1);
  649.                     SendClientMessage(i,GREEN,"you are free to rom around againg");
  650.                 }
  651.             }
  652.         }
  653.         else
  654.         {
  655.             SendClientMessage(playerid, RED, "This file does not exits");
  656.         }
  657.     }
  658.     else
  659.     {
  660.         SendClientMessage(playerid,RED, "You have to be admin inorder to use this command");
  661.     }
  662.     return 1;
  663. }
  664. CMD:exportmap(playerid, params[])
  665. {
  666.     if(IsPlayerAdmince(playerid, 4))
  667.     {
  668.         new input[64],exportname[128],savestringname[128];
  669.         if((mapplayereditstate[playerid])==1)
  670.         {
  671.             if(sscanf(params,"s["#64"]",exportname))
  672.             {
  673.                 SendClientMessage(playerid, RED, "SYNTAX /exportmap [exportmapname]");
  674.                 SendClientMessage(playerid, ORANGE, "!NOTE you currently have a map open that will be the one that is going to be exported");
  675.                 return 1;
  676.             }
  677.             format(input,sizeof(input),"%s",mapname[mapplayerslotid[playerid]]);
  678.         }
  679.         else
  680.         {
  681.             if(sscanf(params,"s["#64"]s["#64"]",input,exportname))
  682.             {
  683.                 return SendClientMessage(playerid, RED, "SYNTAX /exportmap [mapname] [exportmapname]");
  684.             }
  685.             new addstr[128];
  686.             format(addstr,sizeof(addstr),"%s",input);
  687.             format(input,sizeof(input),"JBobjects/%s.map",addstr);
  688.         }
  689.         if(dini_Exists(input))
  690.         {
  691.             new addstr[128];
  692.             format(addstr,sizeof(addstr),"%s",exportname);
  693.             format(exportname,sizeof(exportname),"JBobjects/%s.txt",addstr);
  694.             new File:exportfile = fopen(exportname, io_write);
  695.             new playerfilename[128];
  696.             format(playerfilename,sizeof(playerfilename),"%s",input);
  697.             for(new count;count < MAX_OBJECTS;count++)
  698.             {
  699.                 format(savestringname,sizeof(savestringname),"mapobjectstate[%i]",count);
  700.                 new objstate = dini_Int(playerfilename,savestringname);
  701.                 if((objstate)==1)
  702.                 {
  703.                     new Float:x,Float:y,Float:z,Float:xrot,Float:yrot,Float:zrot;
  704.                     new objectmid;
  705.                     new objstring[128];
  706.                     new string[128];
  707.                     format(savestringname,sizeof(savestringname),"playermapx[%i]",count);
  708.                     x = dini_Float(playerfilename,savestringname);
  709.                     format(savestringname,sizeof(savestringname),"playermapy[%i]",count);
  710.                     y = dini_Float(playerfilename,savestringname);
  711.                     format(savestringname,sizeof(savestringname),"playermapz[%i]",count);
  712.                     z = dini_Float(playerfilename,savestringname);
  713.                     format(savestringname,sizeof(savestringname),"playermapxrot[%i]",count);
  714.                     xrot = dini_Float(playerfilename,savestringname);
  715.                     format(savestringname,sizeof(savestringname),"playermapyrot[%i]",count);
  716.                     yrot = dini_Float(playerfilename,savestringname);
  717.                     format(savestringname,sizeof(savestringname),"playermapzrot[%i]",count);
  718.                     zrot = dini_Float(playerfilename,savestringname);
  719.                     format(savestringname,sizeof(savestringname),"mapobjectmid[%i]",count);
  720.                     objectmid = dini_Int(playerfilename,savestringname);
  721.                     format(savestringname,sizeof(savestringname),"mapobjectstring[%i]",count);
  722.                     format(objstring,sizeof(objstring),dini_Get(playerfilename,savestringname));
  723.                     format(string,sizeof(string),"CreateObject(%i,%f,%f,%f,%f,%f,%f);//%s",objectmid,x,y,z,xrot,yrot,zrot,objstring);
  724.                     fwrite(exportfile,string);
  725.                     fwrite(exportfile,"\n");
  726.                 }
  727.             }
  728.             fclose(exportfile);
  729.             SendClientMessage(playerid, LIGHTBLUE, "The map has been exported to the scripting files folder");
  730.         }
  731.         else
  732.         {
  733.             SendClientMessage(playerid, RED, "This Map Does Not exist");
  734.         }
  735.     }
  736.     else
  737.     {
  738.         SendClientMessage(playerid,RED,"You Have To Be Admin To Use This Command");
  739.     }
  740.     return 1;
  741. }
  742. CMD:renameobject(playerid, params[])
  743. {
  744.     if((mapplayereditstate[playerid])==1)
  745.     {
  746.         new index,input[64],string[128];
  747.         new slotid = mapplayerslotid[playerid];
  748.         if(sscanf(params,"is["#64"]",index,input))
  749.         {
  750.             return SendClientMessage(playerid, RED, "SYNTAX /renameobject [playerjbobjectid] [input]");
  751.         }
  752.         if((mapobjectstate[slotid][index])==0)
  753.         {
  754.             return SendClientMessage(playerid, RED, "This object does not exist");
  755.         }
  756.         new savestringname[128];
  757.         new playerfilename[128];
  758.         format(playerfilename,sizeof(playerfilename),"%s",mapname[slotid]);
  759.         format(savestringname,sizeof(savestringname),"mapobjectstring[%i]",index);
  760.         dini_Set(playerfilename,savestringname,(input));
  761.         format(string,sizeof(string),"You have renamed object %i-%i",index,slotid);
  762.         SendClientMessage(playerid, LIGHTBLUE, string);
  763.         format(string,sizeof(string),"object:%s--ID:Objectid-%i-%i-Mid:%i-mapname:%s",input,index,slotid,mapobjectmid[slotid][index],mapname[slotid]);
  764.         for(new i;i < MAX_PLAYERS;i++)
  765.         {
  766.             if(IsPlayerConnected(i))
  767.             {
  768.                 if((showlabel[i])==1)
  769.                 {
  770.                     DeletePlayer3DTextLabel(i, mapobjectlabel[slotid][index]);
  771.                     mapobjectlabel[slotid][index] = CreatePlayer3DTextLabel(i,string,COLOR,playermapx[slotid][index],playermapy[slotid][index],playermapz[slotid][index],DISTANCELABEL,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0);
  772.                 }
  773.             }
  774.         }
  775.         return 1;
  776.     }
  777.     if(IsPlayerAdmince(playerid,3)||(allowence[0][playerid])==1)
  778.     {
  779.         new index,input[64],string[128];
  780.         if(sscanf(params,"is["#64"]",index,input))
  781.         {
  782.             return SendClientMessage(playerid, RED, "SYNTAX /renameobject [jbobjectid] [input]");
  783.         }
  784.         if((objectstate[index])==0)
  785.         {
  786.             return SendClientMessage(playerid, RED, "This object does not exist");
  787.         }
  788.         new savestringname[128];
  789.         format(savestringname,sizeof(savestringname),"objectlabel[%i]",index);
  790.         format(objectstring[index],sizeof(objectstring),"%s",input);
  791.         dini_Set(objectsfilename,savestringname,(objectstring[index]));
  792.         format(string,sizeof(string),"You have renamed object %i",index);
  793.         SendClientMessage(playerid, LIGHTBLUE, string);
  794.         for(new i;i < MAX_PLAYERS;i++)
  795.         {
  796.             if(IsPlayerConnected(i))
  797.             {
  798.                 if((showlabel[i])==1)
  799.                 {
  800.                     DeletePlayer3DTextLabel(i,objectlabel[index]);
  801.                     format(string,128,"object:%s--ID:%i-Objectid-%i",objectstring[index],index,jbobjectid[index]);
  802.                     objectlabel[index] = CreatePlayer3DTextLabel(i,string,COLOR,objx[index],objy[index],objz[index],DISTANCELABEL,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0);
  803.                 }
  804.             }
  805.         }
  806.     }
  807.     else
  808.     {
  809.         SendClientMessage(playerid, RED, "You have to be atleast admin level 3 or have an allowence for addobjects to rename objects");
  810.     }
  811.     return 1;
  812. }
  813. CMD:deleteallobjects(playerid,params[])
  814. {
  815.     if((mapplayereditstate[playerid])==1)
  816.     {
  817.         new slotid = mapplayerslotid[playerid];
  818.         new playerfilename[128];
  819.         new savestringname[128];
  820.         format(playerfilename,sizeof(playerfilename),"%s",mapname[slotid]);
  821.         for(new count;count < MAX_OBJECTS;count++)
  822.         {
  823.             playermapx[slotid][count] = 0;
  824.             playermapy[slotid][count] = 0;
  825.             playermapz[slotid][count] = 0;
  826.             playermapxrot[slotid][count] = 0;
  827.             playermapyrot[slotid][count] = 0;
  828.             playermapzrot[slotid][count] = 0;
  829.             mapobjectstate[slotid][count] = 0;
  830.             format(savestringname,sizeof(savestringname),"playermapx[%i]",count);
  831.             dini_FloatSet(playerfilename,savestringname,(playermapx[slotid][count]));
  832.             dini_Unset(playerfilename,savestringname);
  833.             format(savestringname,sizeof(savestringname),"playermapy[%i]",count);
  834.             dini_FloatSet(playerfilename,savestringname,(playermapy[slotid][count]));
  835.             dini_Unset(playerfilename,savestringname);
  836.             format(savestringname,sizeof(savestringname),"playermapz[%i]",count);
  837.             dini_FloatSet(playerfilename,savestringname,(playermapz[slotid][count]));
  838.             dini_Unset(playerfilename,savestringname);
  839.             format(savestringname,sizeof(savestringname),"playermapxrot[%i]",count);
  840.             dini_FloatSet(playerfilename,savestringname,(playermapxrot[slotid][count]));
  841.             dini_Unset(playerfilename,savestringname);
  842.             format(savestringname,sizeof(savestringname),"playermapyrot[%i]",count);
  843.             dini_FloatSet(playerfilename,savestringname,(playermapyrot[slotid][count]));
  844.             dini_Unset(playerfilename,savestringname);
  845.             format(savestringname,sizeof(savestringname),"playermapzrot[%i]",count);
  846.             dini_FloatSet(playerfilename,savestringname,(playermapxrot[slotid][count]));
  847.             dini_Unset(playerfilename,savestringname);
  848.             format(savestringname,sizeof(savestringname),"mapobjectstring[%i]",count);
  849.             dini_Set(playerfilename,savestringname,(""));
  850.             dini_Unset(playerfilename,savestringname);
  851.             format(savestringname,sizeof(savestringname),"mapobjectmid[%i]",count);
  852.             dini_IntSet(playerfilename,savestringname,(mapobjectmid[slotid][count]));
  853.             dini_Unset(playerfilename,savestringname);
  854.             format(savestringname,sizeof(savestringname),"mapobjectstate[%i]",count);
  855.             dini_IntSet(playerfilename,savestringname,(mapobjectstate[slotid][count]));
  856.             dini_Unset(playerfilename,savestringname);
  857.             DestroyDynamicObject(mapobject[slotid][count]);
  858.             for(new i;i < MAX_PLAYERS;i++)
  859.             {
  860.                 if(IsPlayerConnected(i))
  861.                 {
  862.                     if((showlabel[i])==1)
  863.                     {
  864.                         DeletePlayer3DTextLabel(i, mapobjectlabel[slotid][count]);
  865.                     }
  866.                 }
  867.             }
  868.         }
  869.         return 1;
  870.     }
  871.     if(IsPlayerAdmince(playerid,4))
  872.     {
  873.         new savestringname[128];
  874.         for(new count =0;count < MAX_OBJECTS;count++)
  875.         {
  876.             if((objectstate[count])==1)
  877.             {
  878.                 objx[count] = 0;
  879.                 objy[count] = 0;
  880.                 objz[count] = 0;
  881.                 objxrot[count] = 0;
  882.                 objyrot[count] = 0;
  883.                 objzrot[count] = 0;
  884.                 jbobjectid[count] = 0;
  885.                 objectstring[count] = "";
  886.                 objectstate[count] = 0;
  887.                 format(savestringname,sizeof(savestringname),"objectstate[%i]",count);
  888.                 dini_IntSet(objectsfilename,savestringname,(0));
  889.                 dini_Unset(objectsfilename,savestringname);
  890.                 format(savestringname,sizeof(savestringname),"objx[%i]",count);
  891.                 dini_FloatSet(objectsfilename,savestringname,(0));
  892.                 dini_Unset(objectsfilename,savestringname);
  893.                 format(savestringname,sizeof(savestringname),"objy[%i]",count);
  894.                 dini_FloatSet(objectsfilename,savestringname,(0));
  895.                 dini_Unset(objectsfilename,savestringname);
  896.                 format(savestringname,sizeof(savestringname),"objz[%i]",count);
  897.                 dini_FloatSet(objectsfilename,savestringname,(0));
  898.                 dini_Unset(objectsfilename,savestringname);
  899.                 format(savestringname,sizeof(savestringname),"objxrot[%i]",count);
  900.                 dini_FloatSet(objectsfilename,savestringname,(0));
  901.                 dini_Unset(objectsfilename,savestringname);
  902.                 format(savestringname,sizeof(savestringname),"objyrot[%i]",count);
  903.                 dini_FloatSet(objectsfilename,savestringname,(0));
  904.                 dini_Unset(objectsfilename,savestringname);
  905.                 format(savestringname,sizeof(savestringname),"objzrot[%i]",count);
  906.                 dini_FloatSet(objectsfilename,savestringname,(0));
  907.                 dini_Unset(objectsfilename,savestringname);
  908.                 format(savestringname,sizeof(savestringname),"object[%i]",count);
  909.                 dini_IntSet(objectsfilename,savestringname,(0));
  910.                 dini_Unset(objectsfilename,savestringname);
  911.                 format(savestringname,sizeof(savestringname),"objectlabel[%i]",count);
  912.                 dini_Set(objectsfilename,savestringname,(""));
  913.                 dini_Unset(objectsfilename,savestringname);
  914.                 format(savestringname,sizeof(savestringname),"objectcolor[%i]",count);
  915.                 dini_IntSet(objectsfilename,savestringname,(0));
  916.                 dini_Unset(objectsfilename,savestringname);
  917.                 DestroyDynamicObject(objects[count]);
  918.                 for(new i =0;i < MAX_PLAYERS;i++)
  919.                 {
  920.                     if((showlabel[i])==1)
  921.                     {
  922.                         DeletePlayer3DTextLabel(i,objectlabel[count]);
  923.                     }
  924.                 }
  925.             }
  926.         }
  927.         new string[128],name[128];
  928.         GetPlayerName(playerid, name,sizeof(name));
  929.         format(string,128,"[ADMIN:%s] has delete all of the objects & removed it from the history",name);
  930.         SendClientMessageToAll(PINK,string);
  931.     }
  932.     else
  933.     {
  934.         SendClientMessage(playerid, RED, "You have to be atleast admin level 5 or Rcon admin to use this command");
  935.     }
  936.     return 1;
  937. }
  938. CMD:allowplayer(playerid, params[])
  939. {
  940.     if(IsPlayerAdmince(playerid,4))
  941.     {
  942.         new choice[128],yesno[128],idinput[128],id =-1,string[128];
  943.         if(sscanf(params,"s["#64"]s["#64"]s["#64"]",idinput,choice,yesno))
  944.         {
  945.             SendClientMessage(playerid, RED, "SYNTAX /allowplayer [id/all] [choice] [yes/no]");
  946.             SendClientMessage(playerid, RED, "Choice:addobject,moveobject,deleteobject,buildmap,all");
  947.             SendClientMessage(playerid, ORANGE, "!NOTE useing [all] [all] or [playerid] [all] will not enable buildmap");
  948.             return 1;
  949.         }
  950.         if(strcmp(idinput,"all",true,64)==0)
  951.         {
  952.             for(new i; i < MAX_PLAYERS;i++)
  953.             {
  954.                 if(strcmp(choice,"buildmap",true,64)==0)
  955.                 {
  956.                     if(strcmp(yesno,"yes",true,64)==0)
  957.                     {
  958.                         if(IsPlayerAdmince(i,3))
  959.                         {
  960.  
  961.                         }
  962.                         else
  963.                         {
  964.                             new adminname[128];
  965.                             GetPlayerName(playerid,adminname,sizeof(adminname));
  966.                             allowence[3][i] = 1;
  967.                             format(string,128,"[ADMIN:%s] has allowed you to use the private mapeditor commandcheck /objecthelp help for more help",adminname);
  968.                             SendClientMessage(i,YELLOW,string);
  969.                             allowencejoin[3] = 1;
  970.                             SendClientMessage(i, YELLOW, "allowencejoin in enabled meaning any player that joins is auto atherized to use the private mapeditor /disallowplayerbuildonjoin to disable this");
  971.                         }
  972.                     }
  973.                     else if(strcmp(yesno,"no",true,64)==0)
  974.                     {
  975.                         if(IsPlayerAdmince(i,3))
  976.                         {
  977.  
  978.                         }
  979.                         else
  980.                         {
  981.                             if((mapplayereditstate[i])==1)
  982.                             {
  983.                                 new name[128];
  984.                                 GetPlayerName(i,name,sizeof(name));
  985.                                 format(string,sizeof(string),"!NOTE you have close %s's map aswell",name);
  986.                                 SendClientMessage(playerid, ORANGE, string);
  987.                                 CloseMap(i);
  988.                             }
  989.                             allowence[3][i] = 0;
  990.                             new adminname[128];
  991.                             GetPlayerName(playerid, adminname,sizeof(adminname));
  992.                             format(string,128,"[ADMIN:%s] has disalowed everyone to use the private mapeditor",adminname);
  993.                             SendClientMessage(i,RED,string);
  994.                         }
  995.                     }
  996.                 }
  997.                 else if(strcmp(choice,"addobject",true,64)==0)
  998.                 {
  999.                     if(strcmp(yesno,"yes",true,64)==0)
  1000.                     {
  1001.                         if(IsPlayerAdmince(i,3))
  1002.                         {
  1003.  
  1004.                         }
  1005.                         else
  1006.                         {
  1007.                             new adminname[128];
  1008.                             GetPlayerName(playerid,adminname,sizeof(adminname));
  1009.                             allowence[0][i] = 1;
  1010.                             format(string,128,"[ADMIN:%s] has allowed you to use the /addobject command check /objecthelp for more help",adminname);
  1011.                             SendClientMessage(i,YELLOW,string);
  1012.                             allowencejoin[0] = 1;
  1013.                             SendClientMessage(i, YELLOW, "allowencejoin in enabled meaning any player that joins is auto atherized to use the /addobject command /disallowplayerbuildonjoin to disable this");
  1014.                         }
  1015.                     }
  1016.                     else if(strcmp(yesno,"no",true,64)==0)
  1017.                     {
  1018.                         if(IsPlayerAdmince(i,3))
  1019.                         {
  1020.  
  1021.                         }
  1022.                         else
  1023.                         {
  1024.                             if((mapplayereditstate[i])==1)
  1025.                             {
  1026.                                 new name[128];
  1027.                                 GetPlayerName(i,name,sizeof(name));
  1028.                                 format(string,sizeof(string),"!NOTE you have close %s's map aswell",name);
  1029.                                 SendClientMessage(playerid, ORANGE, string);
  1030.                                 CloseMap(i);
  1031.                             }
  1032.                             allowence[0][i] = 0;
  1033.                             new adminname[128];
  1034.                             GetPlayerName(playerid, adminname,sizeof(adminname));
  1035.                             format(string,128,"[ADMIN:%s] has disalowed everyone to use /addobject",adminname);
  1036.                             SendClientMessage(i,RED,string);
  1037.                         }
  1038.                     }
  1039.                     else
  1040.                     {
  1041.                         SendClientMessage(playerid, RED, "type in Yes or No");
  1042.                     }
  1043.                 }
  1044.                 else if(strcmp(choice,"moveobject",true,64)==0)
  1045.                 {
  1046.                     if(strcmp(yesno,"yes",true,64)==0)
  1047.                     {
  1048.                         if(IsPlayerAdmince(i,3))
  1049.                         {
  1050.  
  1051.                         }
  1052.                         else
  1053.                         {
  1054.                             new adminname[128];
  1055.                             GetPlayerName(playerid,adminname,sizeof(adminname));
  1056.                             allowence[1][i] = 1;
  1057.                             format(string,128,"[ADMIN:%s] has allowed you to use the /moveobject command check /objecthelp for more help",adminname);
  1058.                             SendClientMessage(i,YELLOW,string);
  1059.                             format(string,127,"[ADMIN:%s] has allowed everyone to use  the moveobject functions",adminname);
  1060.                             SendClientMessage(i,PINK,string);
  1061.                             allowencejoin[1] = 1;
  1062.                             SendClientMessage(i, YELLOW, "allowencejoin in enabled meaning any player that joins is auto atherized to use the /moveobject command /disallowplayerbuildonjoin to disable this");
  1063.                         }
  1064.                     }
  1065.                     else if(strcmp(yesno,"no",true,64)==0)
  1066.                     {
  1067.                         if((allowence[1][i])==1)
  1068.                         {
  1069.                             if(IsPlayerAdmince(i,3))
  1070.                             {
  1071.  
  1072.                             }
  1073.                             else
  1074.                             {
  1075.                                 if((mapplayereditstate[i])==1)
  1076.                                 {
  1077.                                     new name[128];
  1078.                                     GetPlayerName(i,name,sizeof(name));
  1079.                                     format(string,sizeof(string),"!NOTE you have close %s's map aswell",name);
  1080.                                     SendClientMessage(playerid, ORANGE, string);
  1081.                                     CloseMap(i);
  1082.                                 }
  1083.                                 allowence[1][i] = 0;
  1084.                                 new adminname[128];
  1085.                                 GetPlayerName(playerid, adminname,sizeof(adminname));
  1086.                                 format(string,128,"[ADMIN:%s] has disalowed everyone to use /moveobject",adminname);
  1087.                                 SendClientMessage(i,RED,string);
  1088.                             }
  1089.                         }
  1090.                         else
  1091.                         {
  1092.                             SendClientMessage(playerid, RED, "This player already has premission to use moveobjects");
  1093.                         }
  1094.                     }
  1095.                     else
  1096.                     {
  1097.                         SendClientMessage(playerid, RED, "type in Yes or No");
  1098.                     }
  1099.                 }
  1100.                 else if(strcmp(choice,"deleteobject",true,64)==0)
  1101.                 {
  1102.                     if(strcmp(yesno,"yes",true,64)==0)
  1103.                     {
  1104.                         if(IsPlayerAdmince(i,3))
  1105.                         {
  1106.  
  1107.                         }
  1108.                         else
  1109.                         {
  1110.                             new adminname[128];
  1111.                             GetPlayerName(playerid,adminname,sizeof(adminname));
  1112.                             allowence[2][i] = 1;
  1113.                             format(string,128,"[ADMIN:%s] has allowed you to use the /deleteobject command check /objecthelp for more help",adminname);
  1114.                             SendClientMessage(i,YELLOW,string);
  1115.                             format(string,127,"ADMIN:%s] has allowed everyone to use the deleteobject functions",adminname);
  1116.                             SendClientMessage(i,PINK,string);
  1117.                             allowencejoin[2] = 1;
  1118.                             SendClientMessage(i, YELLOW, "allowencejoin in enabled meaning any player that joins is auto atherized to use the /deleteobject command /disallowplayerbuildonjoin to disable this");
  1119.                         }
  1120.                     }
  1121.                     else if(strcmp(yesno,"no",true,64)==0)
  1122.                     {
  1123.                         if((allowence[2][i])==1)
  1124.                         {
  1125.                             if(IsPlayerAdmince(i,3))
  1126.                             {
  1127.  
  1128.                             }
  1129.                             else
  1130.                             {
  1131.                                 if((mapplayereditstate[i])==1)
  1132.                                 {
  1133.                                     new name[128];
  1134.                                     GetPlayerName(i,name,sizeof(name));
  1135.                                     format(string,sizeof(string),"!NOTE you have close %s's map aswell",name);
  1136.                                     SendClientMessage(playerid, ORANGE, string);
  1137.                                     CloseMap(i);
  1138.                                 }
  1139.                                 allowence[2][i] = 0;
  1140.                                 new adminname[128];
  1141.                                 GetPlayerName(playerid, adminname,sizeof(adminname));
  1142.                                 format(string,128,"[ADMIN:%s] has disalowed everyone to use /deleteobjects",adminname);
  1143.                                 SendClientMessage(i,RED,string);
  1144.                             }
  1145.                             if((i)==playerid)
  1146.                             {
  1147.                                 SendClientMessage(playerid, RED, "You have disabled deleteobjects for all player");
  1148.                                 SendClientMessage(playerid, ORANGE, "!NOTE you have also disable allowbuildonjoin /allowplayerbuildonjoin to change that");
  1149.                             }
  1150.                         }
  1151.                         else
  1152.                         {
  1153.                             SendClientMessage(playerid, RED, "This player already has premission to use deleteobjects");
  1154.                         }
  1155.                     }
  1156.                     else
  1157.                     {
  1158.                         SendClientMessage(playerid, RED, "type in Yes or No");
  1159.                     }
  1160.                 }
  1161.                 else if(strcmp(choice,"all",true,64)==0)
  1162.                 {
  1163.                     if(strcmp(yesno,"yes",true,64)==0)
  1164.                     {
  1165.                         if(IsPlayerAdmince(i,3))
  1166.                         {
  1167.  
  1168.                         }
  1169.                         else
  1170.                         {
  1171.                             new adminname[128];
  1172.                             GetPlayerName(playerid,adminname,sizeof(adminname));
  1173.                             for(new count=0;count < MAX_OPERATIONS;count++)
  1174.                             {
  1175.                                 allowence[count][i] = 1;
  1176.                                 allowencejoin[count] = 1;
  1177.                             }
  1178.                             format(string,128,"[ADMIN:%s] has Allowed you to use all 3 function do /objecthelp for more information",adminname);
  1179.                             SendClientMessage(i,YELLOW,string);
  1180.                             format(string,127,"[ADMIN:%s] has allowed everyone to use all the functions",adminname);
  1181.                             SendClientMessage(i,PINK,string);
  1182.                         }
  1183.                         if((i)==playerid)
  1184.                         {
  1185.                             SendClientMessage(playerid, YELLOW, "You have allowed everyone to use JBobjects functions");
  1186.                             SendClientMessage(playerid, ORANGE, "NOTE everyone who joins will automaticly be able to build /disallowplayerbuildonjoin to disable that");
  1187.                         }
  1188.                     }
  1189.                     else if(strcmp(yesno,"no",true,64)==0)
  1190.                     {
  1191.                         if(IsPlayerAdmince(i,3))
  1192.                         {
  1193.  
  1194.                         }
  1195.                         else
  1196.                         {
  1197.                             for(new count=0;count < MAX_OPERATIONS;count++)
  1198.                             {
  1199.                                 if((mapplayereditstate[i])==1)
  1200.                                 {
  1201.                                     new name[128];
  1202.                                     GetPlayerName(i,name,sizeof(name));
  1203.                                     format(string,sizeof(string),"!NOTE you have close %s's map aswell",name);
  1204.                                     SendClientMessage(playerid, ORANGE, string);
  1205.                                     CloseMap(i);
  1206.                                 }
  1207.                                 allowence[count][i] = 0;
  1208.                                 allowencejoin[count] = 0;
  1209.                                 new adminname[128];
  1210.                                 GetPlayerName(playerid, adminname,sizeof(adminname));
  1211.                                 format(string,128,"[ADMIN:%s] has disalowed everyone to use all the build functions",adminname);
  1212.                                 SendClientMessage(i,RED,string);
  1213.                             }
  1214.                             if((i)==playerid)
  1215.                             {
  1216.                                 SendClientMessage(playerid, YELLOW, "You have disallowed everyone to use JBobjects functions");
  1217.                                 SendClientMessage(playerid, ORANGE, "NOTE everyone who joins will not automaticly be able to build");
  1218.                             }
  1219.                         }
  1220.                     }
  1221.                     else
  1222.                     {
  1223.                         SendClientMessage(playerid, RED, "type in Yes or No");
  1224.                     }
  1225.                 }
  1226.                 else
  1227.                 {
  1228.                     SendClientMessage(playerid, RED, "Choice:addobject,moveobject,deleteobject,all");
  1229.                 }
  1230.             }
  1231.             return 1;
  1232.         }
  1233.         else
  1234.         {
  1235.             id = strval(idinput);
  1236.             if((playerid)==id)
  1237.             {
  1238.                 return SendClientMessage(playerid, RED, "You can not make yourself allowed becuse you are an admin over level 3 and permently can edit an object");
  1239.             }
  1240.             if(!IsPlayerConnected(id))
  1241.             {
  1242.                 return SendClientMessage(playerid, RED, "This Player is not connected");
  1243.             }
  1244.             if(strcmp(choice,"buildmap",true,64)==0)
  1245.             {
  1246.                 if(strcmp(yesno,"yes",true,64)==0)
  1247.                 {
  1248.                     if(IsPlayerAdmince(id,3))
  1249.                     {
  1250.  
  1251.                     }
  1252.                     else
  1253.                     {
  1254.                         new adminname[128];
  1255.                         GetPlayerName(playerid,adminname,sizeof(adminname));
  1256.                         allowence[3][id] = 1;
  1257.                         format(string,128,"[ADMIN:%s] has allowed you to use the private mapeditor commandcheck /objecthelp help for more help",adminname);
  1258.                         SendClientMessage(id,YELLOW,string);
  1259.                     }
  1260.                 }
  1261.                 else if(strcmp(yesno,"no",true,64)==0)
  1262.                 {
  1263.                     if(IsPlayerAdmince(id,3))
  1264.                     {
  1265.  
  1266.                     }
  1267.                     else
  1268.                     {
  1269.                         if((mapplayereditstate[id])==1)
  1270.                         {
  1271.                             new name[128];
  1272.                             GetPlayerName(id,name,sizeof(name));
  1273.                             format(string,sizeof(string),"!NOTE you have close %s's map aswell",name);
  1274.                             SendClientMessage(playerid, ORANGE, string);
  1275.                             CloseMap(id);
  1276.                         }
  1277.                         allowence[3][id] = 0;
  1278.                         new adminname[128];
  1279.                         GetPlayerName(playerid, adminname,sizeof(adminname));
  1280.                         format(string,128,"[ADMIN:%s] has disalowed everyone to use the private mapeditor",adminname);
  1281.                         SendClientMessage(id,RED,string);
  1282.                     }
  1283.                 }
  1284.             }
  1285.             else if(strcmp(choice,"addobject",true,64)==0)
  1286.             {
  1287.                 if(strcmp(yesno,"yes",true,64)==0)
  1288.                 {
  1289.                     if((allowence[0][id])==0)
  1290.                     {
  1291.                         new adminname[128],playername[128];
  1292.                         GetPlayerName(playerid,adminname,sizeof(adminname));
  1293.                         GetPlayerName(id,playername,sizeof(playername));
  1294.                         if(IsPlayerAdmince(id,3))
  1295.                         {
  1296.                             format(string,128,"%s is an admin over level 3 you can not allow him to addobject becuse he is permently allowed",playername);
  1297.                             SendClientMessage(playerid, RED, string);
  1298.                             return 1;
  1299.                         }
  1300.                         allowence[0][id] = 1;
  1301.                         format(string,128,"[ADMIN:%s] has allowed [%s] to use the addobject function",adminname,playername);
  1302.                         SendClientMessageToAll(PINK,string);
  1303.                         format(string,128,"[ADMIN:%s] has allowed you to use the /addobject command check /objecthelp for more help",adminname);
  1304.                         SendClientMessage(id,YELLOW,string);
  1305.                     }
  1306.                     else
  1307.                     {
  1308.                         SendClientMessage(playerid, RED, "This player already has premission to use addobjects");
  1309.                     }
  1310.                 }
  1311.                 else if(strcmp(yesno,"no",true,64)==0)
  1312.                 {
  1313.                     if((allowence[0][id])==1)
  1314.                     {
  1315.                         new adminname[128],playername[128];
  1316.                         GetPlayerName(playerid,adminname,sizeof(adminname));
  1317.                         GetPlayerName(id,playername,sizeof(playername));
  1318.                         if((allowence[1][id])==0||(allowence[2][id])==0)
  1319.                         {
  1320.                             if((mapplayereditstate[id])==1)
  1321.                             {
  1322.                                 new name[128];
  1323.                                 GetPlayerName(id,name,sizeof(name));
  1324.                                 format(string,sizeof(string),"!NOTE you have close %s's map aswell",name);
  1325.                                 SendClientMessage(playerid, ORANGE, string);
  1326.                                 CloseMap(id);
  1327.                             }
  1328.                             allowence[0][id] = 0;
  1329.                             format(string,128,"[ADMIN:%s] has Disallowed [%s] to use the addobject function",adminname,playername);
  1330.                             SendClientMessageToAll(PINK,string);
  1331.                         }
  1332.                         else
  1333.                         {
  1334.                             if((allowence[1][id])==0)
  1335.                             {
  1336.                                 format(string,128,"%s's moveobject allowence is still on",playername);
  1337.                                 SendClientMessage(playerid, RED,string);
  1338.                             }
  1339.                             if((allowence[2][id])==0)
  1340.                             {
  1341.                                 format(string,128,"%s's deleteobjects allowence is still on",playername);
  1342.                                 SendClientMessage(playerid, RED, string);
  1343.                             }
  1344.                             SendClientMessage(playerid, RED, "You can not disabel addobjects");
  1345.                         }
  1346.                     }
  1347.                     else
  1348.                     {
  1349.                         SendClientMessage(playerid, RED, "This player already dose not has premission to use moveobjects");
  1350.                     }
  1351.                 }
  1352.                 else
  1353.                 {
  1354.                     SendClientMessage(playerid, RED, "type in Yes or No");
  1355.                 }
  1356.             }
  1357.             else if(strcmp(choice,"moveobject",true,64)==0)
  1358.             {
  1359.                 if(strcmp(yesno,"yes",true,64)==0)
  1360.                 {
  1361.                     if((allowence[1][id])==0)
  1362.                     {
  1363.                         if((allowence[0][id])==1)
  1364.                         {
  1365.                             new adminname[128],playername[128];
  1366.                             GetPlayerName(playerid,adminname,sizeof(adminname));
  1367.                             GetPlayerName(id,playername,sizeof(playername));
  1368.                             if(IsPlayerAdmince(id,3))
  1369.                             {
  1370.                                 format(string,128,"%s is an admin over level 3 you can not allow him to moveobjects becuse he is permently allowed",playername);
  1371.                                 SendClientMessage(playerid, RED, string);
  1372.                                 return 1;
  1373.                             }
  1374.                             allowence[1][id] = 1;
  1375.                             format(string,128,"[ADMIN:%s] has allowed [%s] to use the moveobjects function",adminname,playername);
  1376.                             SendClientMessageToAll(PINK,string);
  1377.                             format(string,128,"[ADMIN:%s] has allowed you to use the /moveobject command check /objecthelp for more help",adminname);
  1378.                             SendClientMessage(id,YELLOW,string);
  1379.                         }
  1380.                         else
  1381.                         {
  1382.                             SendClientMessage(playerid, RED, "You have to enable editing objects for the player in order to let him move objects");
  1383.                         }
  1384.                     }
  1385.                     else
  1386.                     {
  1387.                         SendClientMessage(playerid, RED, "This player already has premission to use moveobjects");
  1388.                     }
  1389.                 }
  1390.                 else if(strcmp(yesno,"no",true,64)==0)
  1391.                 {
  1392.                     if((allowence[1][id])==1)
  1393.                     {
  1394.                         if((mapplayereditstate[id])==1)
  1395.                         {
  1396.                             new name[128];
  1397.                             GetPlayerName(id,name,sizeof(name));
  1398.                             format(string,sizeof(string),"!NOTE you have close %s's map aswell",name);
  1399.                             SendClientMessage(playerid, ORANGE, string);
  1400.                             CloseMap(id);
  1401.                         }
  1402.                         new adminname[128],playername[128];
  1403.                         GetPlayerName(playerid,adminname,sizeof(adminname));
  1404.                         GetPlayerName(id,playername,sizeof(playername));
  1405.                         allowence[1][id] = 0;
  1406.                         format(string,128,"[ADMIN:%s] has Disabled [%s] to use the moveobjects function",adminname,playername);
  1407.                         SendClientMessageToAll(PINK,string);
  1408.                     }
  1409.                     else
  1410.                     {
  1411.                         SendClientMessage(playerid, RED, "This player already does not have premission to use moveobjects");
  1412.                     }
  1413.                 }
  1414.                 else
  1415.                 {
  1416.                     SendClientMessage(playerid, RED, "type in Yes or No");
  1417.                 }
  1418.             }
  1419.             else if(strcmp(choice,"deleteobject",true,64)==0)
  1420.             {
  1421.                 if(strcmp(yesno,"yes",true,64)==0)
  1422.                 {
  1423.                     if((allowence[2][id])==0)
  1424.                     {
  1425.                         if((allowence[0][id])==1)
  1426.                         {
  1427.                             new adminname[128],playername[128];
  1428.                             GetPlayerName(playerid,adminname,sizeof(adminname));
  1429.                             GetPlayerName(id,playername,sizeof(playername));
  1430.                             if(IsPlayerAdmince(id,3))
  1431.                             {
  1432.                                 format(string,128,"%s is an admin over level 3 you can not allow him to deleteobjects becuse he is permently allowed",playername);
  1433.                                 SendClientMessage(playerid, RED, string);
  1434.                                 return 1;
  1435.                             }
  1436.                             allowence[2][id] = 1;
  1437.                             format(string,128,"[ADMIN:%s] has allowed [%s] to use the deleteobject function",adminname,playername);
  1438.                             SendClientMessageToAll(PINK,string);
  1439.                             format(string,128,"[ADMIN:%s] has allowed you to use the /deleteobject command check /objecthelp for more help",adminname);
  1440.                             SendClientMessage(id,YELLOW,string);
  1441.                         }
  1442.                         else
  1443.                         {
  1444.                             SendClientMessage(playerid, RED, "You have to enable editing objects for the player in order to let him delete objects");
  1445.                         }
  1446.                     }
  1447.                     else
  1448.                     {
  1449.                         SendClientMessage(playerid, RED, "This player already has premission to use deleteobjects");
  1450.                     }
  1451.                 }
  1452.                 else if(strcmp(yesno,"no",true,64)==0)
  1453.                 {
  1454.                     if((allowence[2][id])==1)
  1455.                     {
  1456.                         if((mapplayereditstate[id])==1)
  1457.                         {
  1458.                             new name[128];
  1459.                             GetPlayerName(id,name,sizeof(name));
  1460.                             format(string,sizeof(string),"!NOTE you have close %s's map aswell",name);
  1461.                             SendClientMessage(playerid, ORANGE, string);
  1462.                             CloseMap(id);
  1463.                         }
  1464.                         new adminname[128],playername[128];
  1465.                         GetPlayerName(playerid,adminname,sizeof(adminname));
  1466.                         GetPlayerName(id,playername,sizeof(playername));
  1467.                         allowence[2][id] = 0;
  1468.                         format(string,128,"[ADMIN:%s] has disallowed [%s] to use the deleteobject function",adminname,playername);
  1469.                         SendClientMessageToAll(PINK,string);
  1470.                     }
  1471.                     else
  1472.                     {
  1473.                         SendClientMessage(playerid, RED, "This player already dose not have premission to use deleteobjects");
  1474.                     }
  1475.                 }
  1476.                 else
  1477.                 {
  1478.                     SendClientMessage(playerid, RED, "type in Yes or No");
  1479.                 }
  1480.             }
  1481.             else if(strcmp(choice,"all",false,64)==0)
  1482.             {
  1483.                 if(strcmp(yesno,"yes",true,64)==0)
  1484.                 {
  1485.                     new adminname[128],playername[128];
  1486.                     GetPlayerName(playerid,adminname,sizeof(adminname));
  1487.                     GetPlayerName(id,playername,sizeof(playername));
  1488.                     if(IsPlayerAdmince(id,3))
  1489.                     {
  1490.                         format(string,128,"%s is an admin over level 3 you can not allow him to use the functions becuse he is permently allowed",playername);
  1491.                         SendClientMessage(playerid, RED, string);
  1492.                         return 1;
  1493.                     }
  1494.                     for(new count=0;count < 3;count++)
  1495.                     {
  1496.                         allowence[count][id] = 1;
  1497.                     }
  1498.                     format(string,128,"[ADMIN:%s] has Allowed [%s] to use all 3 functions [addobject,editobject,deleteobject]",adminname,playername);
  1499.                     SendClientMessageToAll(PINK,string);
  1500.                     format(string,128,"[ADMIN:%s] has Allowed you to use all 3 function do /objecthelp for more information",adminname);
  1501.                     SendClientMessage(id,YELLOW,string);
  1502.                 }
  1503.                 else if(strcmp(yesno,"no",true,64)==0)
  1504.                 {
  1505.                     if((mapplayereditstate[id])==1)
  1506.                     {
  1507.                         new name[128];
  1508.                         GetPlayerName(id,name,sizeof(name));
  1509.                         format(string,sizeof(string),"!NOTE you have close %s's map aswell",name);
  1510.                         SendClientMessage(playerid, ORANGE, string);
  1511.                         CloseMap(id);
  1512.                     }
  1513.                     new adminname[128],playername[128];
  1514.                     GetPlayerName(playerid,adminname,sizeof(adminname));
  1515.                     GetPlayerName(id,playername,sizeof(playername));
  1516.                     for(new count=0;count < 3;count++)
  1517.                     {
  1518.                         allowence[count][id] = 0;
  1519.                     }
  1520.                     format(string,128,"[ADMIN:%s] has Disallowed [%s] to use all 3 functions [addobject,editobject,deleteobject]",adminname,playername);
  1521.                     SendClientMessageToAll(PINK,string);
  1522.                 }
  1523.                 else
  1524.                 {
  1525.                     SendClientMessage(playerid, RED, "type in Yes or No");
  1526.                 }
  1527.             }
  1528.             else
  1529.             {
  1530.                 SendClientMessage(playerid, RED, "Choice:addobject,moveobject,deleteobject,all");
  1531.             }
  1532.         }
  1533.     }
  1534.     else
  1535.     {
  1536.         SendClientMessage(playerid, RED, "You have to be atleast admin level 4 or Rcon admin to use this command");
  1537.     }
  1538.     return 1;
  1539. }
  1540. CMD:allowplayerbuildonjoin(playerid, params[])
  1541. {
  1542.     if(IsPlayerAdmince(playerid,4))
  1543.     {
  1544.         new input[64],string[128],name[128];
  1545.         if(sscanf(params,"s["#64"]",input))
  1546.         {
  1547.             SendClientMessage(playerid,RED,"SYNTAX /allowplayerbuildonjoin [command]");
  1548.             SendClientMessage(playerid,RED,"command:addobject,moveobject,deleteobject,buildmap,all");
  1549.             SendClientMessage(playerid,ORANGE,"!NOTE buildmap does not turn on when the input is all");
  1550.             return 1;
  1551.         }
  1552.         GetPlayerName(playerid, name,sizeof(name));
  1553.         if(strcmp(input,"buildmap",true,64)==0)
  1554.         {
  1555.             if((allowencejoin[3])==0)
  1556.             {
  1557.                 allowencejoin[3]=1;
  1558.                 format(string,sizeof(string),"[ADMIN:%s] had enabled allowplayerbuildonjoin for private mapediting",name);
  1559.                 SendClientMessageToAll(PINK,string);
  1560.             }
  1561.             else
  1562.             {
  1563.                 SendClientMessage(playerid,RED,"allowence join addobject is already enabled");
  1564.             }
  1565.         }
  1566.         else if(strcmp(input,"addobject",true,64)==0)
  1567.         {
  1568.             if((allowencejoin[0])==0)
  1569.             {
  1570.                 allowencejoin[0]=1;
  1571.                 format(string,sizeof(string),"[ADMIN:%s] had enabled allowplayerbuildonjoin for addingobjects",name);
  1572.                 SendClientMessageToAll(PINK,string);
  1573.             }
  1574.             else
  1575.             {
  1576.                 SendClientMessage(playerid, RED, "allowence join addobject is already enabled");
  1577.             }
  1578.         }
  1579.         else if(strcmp(input,"moveobject",true,64)==0)
  1580.         {
  1581.             if((allowencejoin[1])==0)
  1582.             {
  1583.                 if((allowencejoin[0])==1)
  1584.                 {
  1585.                     allowencejoin[1]=1;
  1586.                     format(string,sizeof(string),"[ADMIN:%s] had enabled allowplayerbuildonjoin for moveingobjects",name);
  1587.                     SendClientMessageToAll(PINK,string);
  1588.                 }
  1589.                 else
  1590.                 {
  1591.                     SendClientMessage(playerid, RED, "you have to enable addobjects before you enable moveobjects; allowence on join");
  1592.                 }
  1593.             }
  1594.             else
  1595.             {
  1596.                 SendClientMessage(playerid, RED, "allowence join moveobjects is already enabled");
  1597.             }
  1598.         }
  1599.         else if(strcmp(input,"deleteobject",true,64)==0)
  1600.         {
  1601.             if((allowencejoin[2])==0)
  1602.             {
  1603.                 if((allowencejoin[0])==1)
  1604.                 {
  1605.                     allowencejoin[2]=1;
  1606.                     format(string,sizeof(string),"[ADMIN:%s] had enabled allowplayerbuildonjoin for deleteobjects",name);
  1607.                     SendClientMessageToAll(PINK,string);
  1608.                 }
  1609.                 else
  1610.                 {
  1611.                     SendClientMessage(playerid, RED, "you have to enable addobjects before you enable deleteobjects; allowence on join");
  1612.                 }
  1613.             }
  1614.             else
  1615.             {
  1616.                 SendClientMessage(playerid, RED, "allowence join deleteobject is already enabled");
  1617.             }
  1618.         }
  1619.         else if(strcmp(input,"all",true,64)==0)
  1620.         {
  1621.             for(new count;count < MAX_OPERATIONS;count++)
  1622.             {
  1623.                 if((allowencejoin[count])==0)
  1624.                 {
  1625.                     allowencejoin[count] = 1;
  1626.                 }
  1627.                 else
  1628.                 {
  1629.                     if((count)==0)
  1630.                     {
  1631.                         SendClientMessage(playerid, RED, "addobjects auto join is already enabled");
  1632.                     }
  1633.                     else if((count)==1)
  1634.                     {
  1635.                         SendClientMessage(playerid, RED, "moveobjects auto join is already enabled");
  1636.                     }
  1637.                     else if((count)==2)
  1638.                     {
  1639.                         SendClientMessage(playerid, RED, "deleteobjects auto join is already enabled");
  1640.                     }
  1641.                 }
  1642.             }
  1643.             format(string,128,"[ADMIN:%s] had enabled allowplayerbuildonjoin for all",name);
  1644.             SendClientMessageToAll(PINK,string);
  1645.         }
  1646.         else
  1647.         {
  1648.             SendClientMessage(playerid,RED,"command:addobject,moveobject,deleteobject,all");
  1649.         }
  1650.     }
  1651.     else
  1652.     {
  1653.         SendClientMessage(playerid, RED, "You have to be atleast admin level 4 or Rcon admin to use this command");
  1654.     }
  1655.     return 1;
  1656. }
  1657. CMD:disallowplayerbuildonjoin(playerid, params[])
  1658. {
  1659.     if(IsPlayerAdmince(playerid,4))
  1660.     {
  1661.         new input[64],string[128],name[128];
  1662.         if(sscanf(params,"s["#64"]",input))
  1663.         {
  1664.             SendClientMessage(playerid,RED,"SYNTAX /disallowplayerbuildonjoin [command]");
  1665.             SendClientMessage(playerid,RED,"command:addobject,moveobject,deleteobject,buildmap,all");
  1666.             SendClientMessage(playerid,ORANGE,"!NOTE buildmap does not turn off when the input is all");
  1667.             return 1;
  1668.         }
  1669.         GetPlayerName(playerid,name,sizeof(name));
  1670.         if(strcmp(input,"buildmap",true,64)==0)
  1671.         {
  1672.             if((allowencejoin[3])==1)
  1673.             {
  1674.                 allowencejoin[3]=0;
  1675.                 format(string,sizeof(string),"[ADMIN:%s] has disable allowplayerbuildonjoin for private mapediting",name);
  1676.                 SendClientMessageToAll(PINK,string);
  1677.             }
  1678.             else
  1679.             {
  1680.                 SendClientMessage(playerid,RED,"allowence join addobject is disabled enabled");
  1681.             }
  1682.         }
  1683.         else if(strcmp(input,"addobject",true,64)==0)
  1684.         {
  1685.             if((allowencejoin[0])==1)
  1686.             {
  1687.                 allowencejoin[0] = 0;
  1688.                 format(string,128,"[ADMIN:%s] has stop puting people into auto allowence [/addobject & /copyobject]",name);
  1689.                 SendClientMessageToAll(PINK,string);
  1690.             }
  1691.             else
  1692.             {
  1693.                 SendClientMessage(playerid, RED, "allowence join addobject is already disabled");
  1694.             }
  1695.         }
  1696.         else if(strcmp(input,"moveobject",true,64)==0)
  1697.         {
  1698.             if((allowencejoin[1])==1)
  1699.             {
  1700.                 if((allowencejoin[0])==0)
  1701.                 {
  1702.                     allowencejoin[1] = 0;
  1703.                     format(string,128,"[ADMIN:%s] has stop puting people into auto allowence [/moveobject]",name);
  1704.                     SendClientMessageToAll(PINK,string);
  1705.                 }
  1706.                 else
  1707.                 {
  1708.                     SendClientMessage(playerid, RED, "You have to disable addobjects before you can disable moveobjects");
  1709.                 }
  1710.             }
  1711.             else
  1712.             {
  1713.                 SendClientMessage(playerid, RED, "allowence join moveobject is already disabled");
  1714.             }
  1715.         }
  1716.         else if(strcmp(input,"deleteobject",true,64)==0)
  1717.         {
  1718.             if((allowencejoin[2])==1)
  1719.             {
  1720.                 if((allowencejoin[0])==0)
  1721.                 {
  1722.                     allowencejoin[2] = 0;
  1723.                     format(string,128,"[ADMIN:%s] has stop puting people into auto allowence [/deleteobject]",name);
  1724.                     SendClientMessageToAll(PINK,string);
  1725.                 }
  1726.                 else
  1727.                 {
  1728.                     SendClientMessage(playerid, RED, "you have to disable addobjects before you disable deleteobjects");
  1729.                 }
  1730.             }
  1731.             else
  1732.             {
  1733.                 SendClientMessage(playerid, RED, "allowence join deleteobject is already disabled");
  1734.             }
  1735.         }
  1736.         else if(strcmp(input,"all",true,64)==0)
  1737.         {
  1738.             for(new count;count < MAX_OPERATIONS;count++)
  1739.             {
  1740.                 if((allowencejoin[count])==1)
  1741.                 {
  1742.                     allowencejoin[count] = 0;
  1743.                 }
  1744.                 else
  1745.                 {
  1746.                     if((count)==0)
  1747.                     {
  1748.                         SendClientMessage(playerid, RED, "addobjects auto join is already disabled");
  1749.                     }
  1750.                     else if((count)==1)
  1751.                     {
  1752.                         SendClientMessage(playerid, RED, "moveobjects auto join is already disabled");
  1753.                     }
  1754.                     else if((count)==2)
  1755.                     {
  1756.                         SendClientMessage(playerid, RED, "deleteobjects auto join is already disabled");
  1757.                     }
  1758.                 }
  1759.             }
  1760.             format(string,128,"[ADMIN:%s] has stop puting people into auto allowence [all commands]",name);
  1761.             SendClientMessageToAll(PINK,string);
  1762.         }
  1763.         else
  1764.         {
  1765.             SendClientMessage(playerid,RED,"command:addobject,moveobject,deleteobject,all");
  1766.         }
  1767.     }
  1768.     else
  1769.     {
  1770.         SendClientMessage(playerid, RED, "You have to be atleast admin level 4 or Rcon admin to use this command");
  1771.     }
  1772.     return 1;
  1773. }
  1774. CMD:gotoobject(playerid,params[])
  1775. {
  1776.     if((mapplayereditstate[playerid])==1)
  1777.     {
  1778.         new index,string[128];
  1779.         new slotid = mapplayerslotid[playerid];
  1780.         if(sscanf(params,"i",index))
  1781.         {
  1782.             return SendClientMessage(playerid,RED,"SYNTAX /gotoobject [playerjbobjectid]");
  1783.         }
  1784.         if((mapobjectstate[slotid][index])==0)
  1785.         {
  1786.             return SendClientMessage(playerid, RED, "You have selected and object the does not exist");
  1787.         }
  1788.         if(IsPlayerInAnyVehicle(playerid))
  1789.         {
  1790.             if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  1791.             {
  1792.                 new vehicleid = GetPlayerVehicleID(playerid);
  1793.                 new Float:x = playermapx[slotid][index] + 5;
  1794.                 new Float:y = playermapy[slotid][index];
  1795.                 new Float:z = playermapz[slotid][index] + 5;
  1796.                 SetVehiclePos(vehicleid,x,y,z);
  1797.                 format(string,sizeof(string),"you have teleported with your car to playerjbobjectid %i",index);
  1798.             }
  1799.             else
  1800.             {
  1801.                 SendClientMessage(playerid, RED,"You have to be the driver inorder to teleport to an object");
  1802.             }
  1803.         }
  1804.         else
  1805.         {
  1806.             new Float:x = playermapx[slotid][index] + 5;
  1807.             new Float:y = playermapy[slotid][index];
  1808.             new Float:z = playermapz[slotid][index] + 5;
  1809.             SetPlayerPos(playerid,x,y,z);
  1810.             format(string,128,"you have teleported to jbobjectid:%i",index);
  1811.             SendClientMessage(playerid, YELLOW, string);
  1812.         }
  1813.         if((allowence[1][playerid])==1)
  1814.         {
  1815.             if((playersinput)==1)
  1816.             {
  1817.                 for(new count=0;count < MAX_PLAYERS;count++)
  1818.                 {
  1819.                     if(IsPlayerAdmince(count,3))
  1820.                     {
  1821.                         new name[128];
  1822.                         GetPlayerName(playerid,name,sizeof(name));
  1823.                         format(string,128,"%s has teleported to object id %i",name,index);
  1824.                         SendClientMessage(count,DARKBLUE,string);
  1825.                     }
  1826.                 }
  1827.             }
  1828.         }
  1829.         return 1;
  1830.     }
  1831.     if(IsPlayerAdmince(playerid,3)||(allowence[1][playerid])==1)
  1832.     {
  1833.         new index,string[128];
  1834.         if(sscanf(params,"i",index))
  1835.         {
  1836.             return SendClientMessage(playerid, RED, "SYNTAX /gotoobject [jbobjectid]");
  1837.         }
  1838.         if((objectstate[index])==0)
  1839.         {
  1840.             return SendClientMessage(playerid, RED, "This object does not exist");
  1841.         }
  1842.         if(IsPlayerInAnyVehicle(playerid))
  1843.         {
  1844.             if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  1845.             {
  1846.                 new vehicleid = GetPlayerVehicleID(playerid);
  1847.                 SetVehiclePos(vehicleid,objx[index]+5,objy[index],objz[index]+5);
  1848.                 format(string,128,"you have teleported with your car to jbobjectid:%i",index);
  1849.                 SendClientMessage(playerid, YELLOW, string);
  1850.             }
  1851.             else
  1852.             {
  1853.                 SendClientMessage(playerid, RED, "You can not be in the passenger seat to teleport you have to be the drive or outside of the car");
  1854.             }
  1855.         }
  1856.         else
  1857.         {
  1858.             SetPlayerPos(playerid,objx[index],objy[index],objz[index]);
  1859.             format(string,128,"you have teleported to jbobjectid:%i",index);
  1860.             SendClientMessage(playerid, YELLOW, string);
  1861.         }
  1862.         if((allowence[1][playerid])==1)
  1863.         {
  1864.             if((playersinput)==1)
  1865.             {
  1866.                 for(new count=0;count < MAX_PLAYERS;count++)
  1867.                 {
  1868.                     if(IsPlayerAdmince(count,3))
  1869.                     {
  1870.                         new name[128];
  1871.                         GetPlayerName(playerid,name,sizeof(name));
  1872.                         format(string,128,"%s has teleported to object id %i",name,index);
  1873.                         SendClientMessage(count,DARKBLUE,string);
  1874.                     }
  1875.                 }
  1876.             }
  1877.         }
  1878.     }
  1879.     else
  1880.     {
  1881.         SendClientMessage(playerid, RED, "You have to be atleast admin level 3 or Rcon admin or allowed to go to a object");
  1882.     }
  1883.     return 1;
  1884. }
  1885. CMD:copyobject(playerid, params[])
  1886. {
  1887.     if((mapplayereditstate[playerid])==1)
  1888.     {
  1889.         new index,string[128],savestringname[128],playerfilename[128];
  1890.         new slotid = mapplayerslotid[playerid];
  1891.         if(sscanf(params,"i",index))
  1892.         {
  1893.             return SendClientMessage(playerid, RED, "SYNTAX /copyobject [playerjbobjectid]");
  1894.         }
  1895.         if((mapobjectstate[slotid][index])==0)
  1896.         {
  1897.             return SendClientMessage(playerid, RED, "You have selected and object the does not exist");
  1898.         }
  1899.         for(new count;count < MAX_OBJECTS;count++)
  1900.         {
  1901.             if((mapobjectstate[slotid][count])==0)
  1902.             {
  1903.                 format(playerfilename,sizeof(playerfilename),"%s",mapname[slotid]);
  1904.                 playermapx[slotid][count] = playermapx[slotid][index];
  1905.                 playermapy[slotid][count] = playermapy[slotid][index];
  1906.                 playermapz[slotid][count] = playermapz[slotid][index];
  1907.                 playermapxrot[slotid][count] = playermapxrot[slotid][index];
  1908.                 playermapyrot[slotid][count] = playermapyrot[slotid][index];
  1909.                 playermapzrot[slotid][count] = playermapzrot[slotid][index];
  1910.                 mapobjectmid[slotid][count] = mapobjectmid[slotid][index];
  1911.                 format(savestringname,sizeof(savestringname),"mapobjectstring[%i]",index);
  1912.                 new mapstring[128];
  1913.                 format(mapstring,sizeof(mapstring),"%s",dini_Get(playerfilename,savestringname));
  1914.                 dini_Set(playerfilename,"mapname",(mapname[slotid]));
  1915.                 mapobjectstate[slotid][count] = 1;
  1916.                 format(savestringname,sizeof(savestringname),"playermapx[%i]",count);
  1917.                 dini_FloatSet(playerfilename,savestringname,(playermapx[slotid][count]));
  1918.                 format(savestringname,sizeof(savestringname),"playermapy[%i]",count);
  1919.                 dini_FloatSet(playerfilename,savestringname,(playermapy[slotid][count]));
  1920.                 format(savestringname,sizeof(savestringname),"playermapz[%i]",count);
  1921.                 dini_FloatSet(playerfilename,savestringname,(playermapz[slotid][count]));
  1922.                 format(savestringname,sizeof(savestringname),"playermapxrot[%i]",count);
  1923.                 dini_FloatSet(playerfilename,savestringname,(playermapxrot[slotid][count]));
  1924.                 format(savestringname,sizeof(savestringname),"playermapyrot[%i]",count);
  1925.                 dini_FloatSet(playerfilename,savestringname,(playermapyrot[slotid][count]));
  1926.                 format(savestringname,sizeof(savestringname),"playermapzrot[%i]",count);
  1927.                 dini_FloatSet(playerfilename,savestringname,(playermapxrot[slotid][count]));
  1928.                 format(savestringname,sizeof(savestringname),"mapobjectstring[%i]",count);
  1929.                 dini_Set(playerfilename,savestringname,mapstring);
  1930.                 format(savestringname,sizeof(savestringname),"mapobjectmid[%i]",count);
  1931.                 dini_IntSet(playerfilename,savestringname,(mapobjectmid[slotid][count]));
  1932.                 format(savestringname,sizeof(savestringname),"mapobjectstate[%i]",count);
  1933.                 dini_IntSet(playerfilename,savestringname,(mapobjectstate[slotid][count]));
  1934.                 format(string,sizeof(string),"object:%s--ID:Objectid-%i-%i-Mid:%i-mapname:%s",mapstring,count,slotid,mapobjectmid[slotid][count],mapname[slotid]);
  1935.                 mapobject[slotid][count] = CreateDynamicObject(mapobjectmid[slotid][count],playermapx[slotid][count],playermapy[slotid][count],playermapz[slotid][count],playermapxrot[slotid][count],playermapyrot[slotid][count],playermapzrot[slotid][count]);
  1936.                 for(new i;i < MAX_PLAYERS;i++)
  1937.                 {
  1938.                     if((showlabel[i])==1)
  1939.                     {
  1940.                         mapobjectlabel[slotid][count] = CreatePlayer3DTextLabel(i,string,COLOR,playermapx[slotid][count],playermapy[slotid][count],playermapz[slotid][count],DISTANCELABEL,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0);
  1941.                     }
  1942.                 }
  1943.                 if((allowence[0][playerid])==1)
  1944.                 {
  1945.                     if((playersinput)==1)
  1946.                     {
  1947.                         for(new count2=0;count2 < MAX_PLAYERS;count2++)
  1948.                         {
  1949.                             if(IsPlayerAdmince(count2,3))
  1950.                             {
  1951.                                 new name[128];
  1952.                                 GetPlayerName(playerid,name,sizeof(name));
  1953.                                 format(string,128,"%s has copyed object id %i",name,index);
  1954.                                 SendClientMessage(count2,DARKBLUE,string);
  1955.                             }
  1956.                         }
  1957.                     }
  1958.                 }
  1959.                 SendClientMessage(playerid, LIGHTBLUE,"You have copyed an object");
  1960.                 return 1;
  1961.             }
  1962.         }
  1963.         return 1;
  1964.     }
  1965.     if(IsPlayerAdmince(playerid,3)||(allowence[0][playerid])==1&&(allowence[1][playerid])==1)
  1966.     {
  1967.         new index;
  1968.         if(sscanf(params,"i",index))
  1969.         {
  1970.             return SendClientMessage(playerid, RED, "SYNTAX /copyobject [jbobjectid]");
  1971.         }
  1972.         if((objectstate[index])==1)
  1973.         {
  1974.             for(new count;count < MAX_OBJECTS;count++)
  1975.             {
  1976.                 if((objectstate[count])==0)
  1977.                 {
  1978.                     objectstate[count]= 1;
  1979.                     new string[128],savestringname[128];
  1980.                     objx[count] = objx[index];
  1981.                     objy[count] = objy[index];
  1982.                     objz[count] = objz[index];
  1983.                     objxrot[count] = objxrot[index];
  1984.                     objyrot[count] = objyrot[index];
  1985.                     objzrot[count] = objzrot[index];
  1986.                     jbobjectid[count] = jbobjectid[index];
  1987.                     objectstring[count] = objectstring[index];
  1988.                     objectcolor[count] = objectcolor[index];
  1989.                     objects[count] = CreateDynamicObject(jbobjectid[count],objx[count],objy[count],objz[count],objxrot[count],objyrot[count],objzrot[count],0);
  1990.                     format(savestringname,sizeof(savestringname),"objx[%i]",count);
  1991.                     dini_FloatSet(objectsfilename,savestringname,(objx[count]));
  1992.                     format(savestringname,sizeof(savestringname),"objy[%i]",count);
  1993.                     dini_FloatSet(objectsfilename,savestringname,(objy[count]));
  1994.                     format(savestringname,sizeof(savestringname),"objz[%i]",count);
  1995.                     dini_FloatSet(objectsfilename,savestringname,(objz[count]));
  1996.                     format(savestringname,sizeof(savestringname),"objectcolor[%i]",objectcolor[count]);
  1997.                     dini_IntSet(objectsfilename,savestringname,(objectcolor[count]));
  1998.                     format(savestringname,sizeof(savestringname),"objxrot[%i]",count);
  1999.                     dini_FloatSet(objectsfilename,savestringname,(objxrot[count]));
  2000.                     format(savestringname,sizeof(savestringname),"objyrot[%i]",count);
  2001.                     dini_FloatSet(objectsfilename,savestringname,(objyrot[count]));
  2002.                     format(savestringname,sizeof(savestringname),"objzrot[%i]",count);
  2003.                     dini_FloatSet(objectsfilename,savestringname,(objzrot[count]));
  2004.                     format(savestringname,sizeof(savestringname),"object[%i]",count);
  2005.                     dini_IntSet(objectsfilename,savestringname,(jbobjectid[count]));
  2006.                     format(savestringname,sizeof(savestringname),"objectlabel[%i]",count);
  2007.                     dini_Set(objectsfilename,savestringname,(objectstring[count]));
  2008.                     format(savestringname,sizeof(savestringname),"objectstate[%i]",count);
  2009.                     dini_IntSet(objectsfilename,savestringname,(objectstate[count]));
  2010.                     format(string,128,"you have copy object:%i, The copyed object id is %i",index,count);
  2011.                     SendClientMessage(playerid, YELLOW, string);
  2012.                     SendClientMessage(playerid, ORANGE, "!NOTE the objects are right on top of eachother make sure you move them");
  2013.                     for(new i;i < MAX_PLAYERS;i++)
  2014.                     {
  2015.                         if(IsPlayerConnected(i))
  2016.                         {
  2017.                             if((showlabel[i])==1)
  2018.                             {
  2019.                                 format(string,128,"object:%s--ID:%i-Objectid-%i",objectstring[count],count,jbobjectid[count]);
  2020.                                 objectlabel[count] = CreatePlayer3DTextLabel(i,string,COLOR,objx[count],objy[count],objz[count],DISTANCELABEL,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0);
  2021.                             }
  2022.                         }
  2023.                     }
  2024.                     if((objectcolor[count])==0)
  2025.                     {
  2026.                         SetDynamicObjectMaterial(objects[count],0,-1,"none","none",0);
  2027.                     }
  2028.                     else
  2029.                     {
  2030.                         SetDynamicObjectMaterial(objects[count],0 ,2707, "Shopping", "white",objectcolor[count]);
  2031.                     }
  2032.                     if((allowence[0][playerid])==1)
  2033.                     {
  2034.                         if((playersinput)==1)
  2035.                         {
  2036.                             for(new count2=0;count2 < MAX_PLAYERS;count2++)
  2037.                             {
  2038.                                 if(IsPlayerAdmince(count2,3))
  2039.                                 {
  2040.                                     new name[128];
  2041.                                     GetPlayerName(playerid,name,sizeof(name));
  2042.                                     format(string,128,"%s has copyed object id %i the jbobjectid for the clone is %i the object id is %i",name,index,count,jbobjectid[count]);
  2043.                                     SendClientMessage(count2,DARKBLUE,string);
  2044.                                 }
  2045.                             }
  2046.                         }
  2047.                     }
  2048.                     return 1;
  2049.                 }
  2050.             }
  2051.         }
  2052.         else
  2053.         {
  2054.             SendClientMessage(playerid, RED, "This object does not exist");
  2055.         }
  2056.     }
  2057.     else
  2058.     {
  2059.         SendClientMessage(playerid, RED, "You have to be atleast admin level 3 or Rcon admin or allowed to copyobjects to use this command");
  2060.     }
  2061.     return 1;
  2062. }
  2063. CMD:getobject(playerid, params[])
  2064. {
  2065.     if((mapplayereditstate[playerid])==1)
  2066.     {
  2067.         new index,string[128],savestringname[128],playerfilename[128];
  2068.         new slotid = mapplayerslotid[playerid];
  2069.         if(sscanf(params,"i",index))
  2070.         {
  2071.             return SendClientMessage(playerid, RED, "SYNTAX /getobject [playerjbobjectid]");
  2072.         }
  2073.         if((mapobjectstate[slotid][index])==0)
  2074.         {
  2075.             return SendClientMessage(playerid, RED, "You have selected and object the does not exist");
  2076.         }
  2077.         format(playerfilename,sizeof(playerfilename),"%s",mapname[slotid]);
  2078.         new Float:x,Float:y,Float:z;
  2079.  
  2080.         GetPlayerPos(playerid,x,y,z);
  2081.         playermapx[slotid][index] = x + 5;
  2082.         playermapy[slotid][index] = y;
  2083.         playermapz[slotid][index] = z;
  2084.         MoveDynamicObject(mapobject[slotid][index],playermapx[slotid][index],playermapy[slotid][index],playermapz[slotid][index],100.0,playermapxrot[slotid][index],playermapyrot[slotid][index],playermapzrot[slotid][index]);
  2085.         SendClientMessage(playerid, LIGHTBLUE, "You brought the object over to where you are");
  2086.         format(savestringname,sizeof(savestringname),"mapobjectstring[%i]",index);
  2087.         new mapstring[128];
  2088.         format(mapstring,sizeof(mapstring),"%s",dini_Get(playerfilename,savestringname));
  2089.         for(new i;i < MAX_PLAYERS;i++)
  2090.         {
  2091.             if(IsPlayerConnected(i))
  2092.             {
  2093.                 if((showlabel[i])==1)
  2094.                 {
  2095.                     format(string,sizeof(string),"object:%s--ID:Objectid-%i-%i-Mid:%i-mapname:%s",mapstring,index,slotid,mapobjectmid[slotid][index],mapname[slotid]);
  2096.                     DeletePlayer3DTextLabel(i,mapobjectlabel[slotid][index]);
  2097.                     mapobjectlabel[slotid][index] = CreatePlayer3DTextLabel(i,string,COLOR,playermapx[slotid][index],playermapy[slotid][index],playermapz[slotid][index],DISTANCELABEL,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0);
  2098.                 }
  2099.             }
  2100.         }
  2101.         format(savestringname,sizeof(savestringname),"playermapx[%i]",index);
  2102.         dini_FloatSet(playerfilename,savestringname,(playermapx[slotid][index]));
  2103.         format(savestringname,sizeof(savestringname),"playermapy[%i]",index);
  2104.         dini_FloatSet(playerfilename,savestringname,(playermapy[slotid][index]));
  2105.         format(savestringname,sizeof(savestringname),"playermapz[%i]",index);
  2106.         dini_FloatSet(playerfilename,savestringname,(playermapz[slotid][index]));
  2107.         if((allowence[1][playerid])==1)
  2108.         {
  2109.             if((playersinput)==1)
  2110.             {
  2111.                 for(new count=0;count < MAX_PLAYERS;count++)
  2112.                 {
  2113.                     if(IsPlayerAdmince(count,3))
  2114.                     {
  2115.                         new name[128];
  2116.                         GetPlayerName(playerid,name,sizeof(name));
  2117.                         format(string,sizeof(string),"%s has brought over object id:%i from catagory %i to were he is witch is...",name,index,slotid);
  2118.                         SendClientMessage(count,DARKBLUE,string);
  2119.                         format(string,sizeof(string),"x:%f y:%f z:%f--rot--x:%f,y:%f,z:%f",playermapx[slotid][index],playermapy[slotid][index],playermapz[slotid][index],playermapxrot[slotid][index],playermapyrot[slotid][index],playermapzrot[slotid][index]);
  2120.                         SendClientMessage(count,DARKBLUE,string);
  2121.                     }
  2122.                 }
  2123.             }
  2124.         }
  2125.         return 1;
  2126.     }
  2127.     if(IsPlayerAdmince(playerid,3)||(allowence[1][playerid])==1)
  2128.     {
  2129.         new index,string[128],savestringname[128];
  2130.         if(sscanf(params, "i",index))
  2131.         {
  2132.             return SendClientMessage(playerid, RED, "SYNTAX /getobject [jbobjectid]");
  2133.         }
  2134.         if((objectstate[index])==0)
  2135.         {
  2136.             return SendClientMessage(playerid, RED, "This object does not exist");
  2137.         }
  2138.         new Float:x,Float:y,Float:z;
  2139.         GetPlayerPos(playerid,x,y,z);
  2140.         objx[index] = x + 5;
  2141.         objy[index] = y;
  2142.         objz[index] = z;
  2143.         MoveDynamicObject(objects[index],objx[index],objy[index],objz[index],100.0,objxrot[index],objyrot[index],objzrot[index]);
  2144.         SendClientMessage(playerid, LIGHTBLUE, "You brought the object over to where you are");
  2145.         for(new i;i < MAX_PLAYERS;i++)
  2146.         {
  2147.             if(IsPlayerConnected(i))
  2148.             {
  2149.                 if((showlabel[i])==1)
  2150.                 {
  2151.                     DeletePlayer3DTextLabel(i,objectlabel[index]);
  2152.                     format(string,128,"object:%s--ID:%i-Objectid-%i",objectstring[index],index,jbobjectid[index]);
  2153.                     objectlabel[index] = CreatePlayer3DTextLabel(i,string,COLOR,objx[index],objy[index],objz[index],DISTANCELABEL,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0);
  2154.                 }
  2155.             }
  2156.         }
  2157.         format(savestringname,sizeof(savestringname),"objx[%i]",index);
  2158.         dini_FloatSet(objectsfilename,savestringname,(objx[index]));
  2159.         format(savestringname,sizeof(savestringname),"objy[%i]",index);
  2160.         dini_FloatSet(objectsfilename,savestringname,(objy[index]));
  2161.         format(savestringname,sizeof(savestringname),"objz[%i]",index);
  2162.         dini_FloatSet(objectsfilename,savestringname,(objz[index]));
  2163.         if((allowence[1][playerid])==1)
  2164.         {
  2165.             if((playersinput)==1)
  2166.             {
  2167.                 for(new count=0;count < MAX_PLAYERS;count++)
  2168.                 {
  2169.                     if(IsPlayerAdmince(count,3))
  2170.                     {
  2171.                         new name[128];
  2172.                         GetPlayerName(playerid,name,sizeof(name));
  2173.                         format(string,sizeof(string),"%s has brought over object id:%i to were he is witch is...",name,index);
  2174.                         SendClientMessage(count,DARKBLUE,string);
  2175.                         format(string,sizeof(string),"x:%f y:%f z:%f--rot--x:%f,y:%f,z:%f",objx[index],objy[index],objz[index],objxrot[index],objyrot[index],objzrot[index]);
  2176.                         SendClientMessage(count,DARKBLUE,string);
  2177.                     }
  2178.                 }
  2179.             }
  2180.         }
  2181.     }
  2182.     else
  2183.     {
  2184.         SendClientMessage(playerid, RED, "You have to be admin level 3 or rcon or have an allowence to moveobjects");
  2185.     }
  2186.     return 1;
  2187. }
  2188. CMD:addobject(playerid,params[])//mark
  2189. {
  2190.     if(IsPlayerAdmince(playerid,3)||(allowence[0][playerid])==1)
  2191.     {
  2192.         new tag = 0,pass = 0,slotid;
  2193.         if((mapplayereditstate[playerid])==1)
  2194.         {
  2195.             slotid = mapplayerslotid[playerid];
  2196.             tag = 1;
  2197.         }
  2198.         for(new count;count < MAX_OBJECTS;count++)
  2199.         {
  2200.             if((tag)==1)
  2201.             {
  2202.                 if((mapobjectstate[slotid][count])==0)
  2203.                 {
  2204.                     pass = 1;
  2205.                 }
  2206.             }
  2207.             else
  2208.             {
  2209.                 if((objectstate[count])==0)
  2210.                 {
  2211.                     pass = 1;
  2212.                 }
  2213.             }
  2214.             if((pass)==1)
  2215.             {
  2216.                 if((tag)==0)
  2217.                 {
  2218.                     objectstate[count] = 1;
  2219.                 }
  2220.                 else
  2221.                 {
  2222.                     mapobjectstate[slotid][count] = 0;
  2223.                 }
  2224.                 objectindex[playerid] = count;
  2225.                 ShowPlayerDialog(playerid,DIALOG_ADDOBJECTS,DIALOG_STYLE_LIST, "Main Menu 'JBobjects'","Custom Input\nSA:MP Logos\nLand Masses\nBase Sections\nElevator from VC\nDM Cages\nRacing\nParkour\nSky Diving Platforms\nTunnel Sections\nRamps\nModular Road Sections\nModular Bridge Sections\nTubes and Funnels\nSpheres\nOthers\nFavorite","Ok","Cancel");
  2226.                 if((allowence[0][playerid])==1)
  2227.                 {
  2228.                     if((playersinput)==1)
  2229.                     {
  2230.                         for(new count2=0;count2 < MAX_PLAYERS;count2++)
  2231.                         {
  2232.                             if(IsPlayerAdmince(count2,3))
  2233.                             {
  2234.                                 new string[128],name[128];
  2235.                                 GetPlayerName(playerid,name,sizeof(name));
  2236.                                 format(string,128,"%s is adding an object",name);
  2237.                                 SendClientMessage(count2,DARKBLUE,string);
  2238.                             }
  2239.                         }
  2240.                     }
  2241.                 }
  2242.                 return 1;
  2243.             }
  2244.         }
  2245.     }
  2246.     else
  2247.     {
  2248.         SendClientMessage(playerid, RED, "You have to be atleast admin level 3 or Rcon admin or allowed to addobjects to use this command");
  2249.     }
  2250.     return 1;
  2251. }
  2252. CMD:setobject(playerid,params[])
  2253. {
  2254.     if((mapplayereditstate[playerid])==1)
  2255.     {
  2256.         new choice[64],choice2[64],input,index,speed;
  2257.         new string[128],savestringname[128],playerfilename[128];
  2258.         new slotid = mapplayerslotid[playerid];
  2259.         if(sscanf(params,"s["#64"]s["#64"]iii",choice2,choice,index,input,speed))
  2260.         {
  2261.             SendClientMessage(playerid, RED, "SYNTAX /setobject [choice2] [choice] [playerobjectid] [ammount] [speed]");
  2262.             SendClientMessage(playerid, RED, "Choice:xrot x yrot y zrot z");
  2263.             SendClientMessage(playerid, RED, "Choice2:Set,shift+,shift-");
  2264.             return 1;
  2265.         }
  2266.         oldx[playerid] = playermapx[slotid][index];
  2267.         oldy[playerid] = playermapy[slotid][index];
  2268.         oldz[playerid] = playermapz[slotid][index];
  2269.         oldxrot[playerid] = playermapxrot[slotid][index];
  2270.         oldyrot[playerid] = playermapyrot[slotid][index];
  2271.         oldzrot[playerid] = playermapzrot[slotid][index];
  2272.         if((speed) <= 0)
  2273.         {
  2274.             return SendClientMessage(playerid, RED, "you can't make the speed 0 or slower");
  2275.         }
  2276.         if((mapobjectstate[slotid][index])==0)
  2277.         {
  2278.             return SendClientMessage(playerid, RED, "You have selected and object the does not exist");
  2279.         }
  2280.         if(strcmp(choice2,"set",true,64)==0)
  2281.         {
  2282.             if(strcmp(choice,"xrot",true,64)==0)
  2283.             {
  2284.                 playermapxrot[slotid][index] = input;
  2285.             }
  2286.             else if(strcmp(choice,"yrot",true,64)==0)
  2287.             {
  2288.                 playermapyrot[slotid][index] = input;
  2289.             }
  2290.             else if(strcmp(choice,"zrot",true,64)==0)
  2291.             {
  2292.                 playermapzrot[slotid][index] = input;
  2293.             }
  2294.             else if(strcmp(choice,"x",true,64)==0)
  2295.             {
  2296.                 playermapx[slotid][index] = input;
  2297.             }
  2298.             else if(strcmp(choice,"y",true,64)==0)
  2299.             {
  2300.                 playermapy[slotid][index] = input;
  2301.             }
  2302.             else if(strcmp(choice,"z",true,64)==0)
  2303.             {
  2304.                 playermapz[slotid][index] = input;
  2305.             }
  2306.             else
  2307.             {
  2308.                 SendClientMessage(playerid, RED, "SYNTAX /setobject [choice2] [choice] [playerobjectid] [ammount] [speed]");
  2309.                 SendClientMessage(playerid, RED, "Choice:xrot x yrot y zrot z");
  2310.                 SendClientMessage(playerid, RED, "Choice2:Set,shift+,shift-");
  2311.                 return 1;
  2312.             }
  2313.         }
  2314.         else if(strcmp(choice2,"shift+",true,64)==0)
  2315.         {
  2316.             if(strcmp(choice,"xrot",true,64)==0)
  2317.             {
  2318.                 playermapxrot[slotid][index] =  playermapxrot[slotid][index] + input;
  2319.             }
  2320.             else if(strcmp(choice,"yrot",true,64)==0)
  2321.             {
  2322.                 playermapyrot[slotid][index] = playermapyrot[slotid][index] + input;
  2323.             }
  2324.             else if(strcmp(choice,"zrot",true,64)==0)
  2325.             {
  2326.                 playermapzrot[slotid][index] = playermapzrot[slotid][index] + input;
  2327.             }
  2328.             else if(strcmp(choice,"x",true,64)==0)
  2329.             {
  2330.                 playermapx[slotid][index] = playermapx[slotid][index] + input;
  2331.             }
  2332.             else if(strcmp(choice,"y",true,64)==0)
  2333.             {
  2334.                 playermapy[slotid][index] = playermapy[slotid][index] + input;
  2335.             }
  2336.             else if(strcmp(choice,"z",true,64)==0)
  2337.             {
  2338.                 playermapz[slotid][index] = playermapz[slotid][index] + input;
  2339.             }
  2340.             else
  2341.             {
  2342.                 SendClientMessage(playerid, RED, "SYNTAX /setobject [choice2] [choice] [playerobjectid] [ammount] [speed]");
  2343.                 SendClientMessage(playerid, RED, "Choice:xrot x yrot y zrot z");
  2344.                 SendClientMessage(playerid, RED, "Choice2:Set,shift+,shift-");
  2345.                 return 1;
  2346.             }
  2347.         }
  2348.         else if(strcmp(choice2,"shift-",true,64)==0)
  2349.         {
  2350.             if(strcmp(choice,"xrot",true,64)==0)
  2351.             {
  2352.                 playermapxrot[slotid][index] =  playermapxrot[slotid][index] - input;
  2353.             }
  2354.             else if(strcmp(choice,"yrot",true,64)==0)
  2355.             {
  2356.                 playermapyrot[slotid][index] = playermapyrot[slotid][index] - input;
  2357.             }
  2358.             else if(strcmp(choice,"zrot",true,64)==0)
  2359.             {
  2360.                 playermapzrot[slotid][index] = playermapzrot[slotid][index] - input;
  2361.             }
  2362.             else if(strcmp(choice,"x",true,64)==0)
  2363.             {
  2364.                 playermapx[slotid][index] = playermapx[slotid][index] - input;
  2365.             }
  2366.             else if(strcmp(choice,"y",true,64)==0)
  2367.             {
  2368.                 playermapy[slotid][index] = playermapy[slotid][index] - input;
  2369.             }
  2370.             else if(strcmp(choice,"z",true,64)==0)
  2371.             {
  2372.                 playermapz[slotid][index] = playermapz[slotid][index] - input;
  2373.             }
  2374.             else
  2375.             {
  2376.                 SendClientMessage(playerid, RED, "SYNTAX /setobject [choice2] [choice] [playerobjectid] [ammount] [speed]");
  2377.                 SendClientMessage(playerid, RED, "Choice:xrot x yrot y zrot z");
  2378.                 SendClientMessage(playerid, RED, "Choice2:Set,shift+,shift-");
  2379.                 return 1;
  2380.             }
  2381.         }
  2382.         else
  2383.         {
  2384.             SendClientMessage(playerid, RED, "SYNTAX /setobject [choice2] [choice] [playerobjectid] [ammount] [speed]");
  2385.             SendClientMessage(playerid, RED, "Choice:xrot x yrot y zrot z");
  2386.             SendClientMessage(playerid, RED, "Choice2:Set,shift+,shift-");
  2387.             return 1;
  2388.         }
  2389.         format(playerfilename,sizeof(playerfilename),"%s",mapname[slotid]);
  2390.         MoveDynamicObject(mapobject[slotid][index],playermapx[slotid][index],playermapy[slotid][index],playermapz[slotid][index],speed,playermapxrot[slotid][index],playermapyrot[slotid][index],playermapzrot[slotid][index]);
  2391.         SendClientMessage(playerid, LIGHTBLUE, "You have moved this object");
  2392.         format(savestringname,sizeof(savestringname),"playermapx[%i]",index);
  2393.         dini_FloatSet(playerfilename,savestringname,(playermapx[slotid][index]));
  2394.         format(savestringname,sizeof(savestringname),"playermapy[%i]",index);
  2395.         dini_FloatSet(playerfilename,savestringname,(playermapy[slotid][index]));
  2396.         format(savestringname,sizeof(savestringname),"playermapz[%i]",index);
  2397.         dini_FloatSet(playerfilename,savestringname,(playermapz[slotid][index]));
  2398.         format(savestringname,sizeof(savestringname),"playermapxrot[%i]",index);
  2399.         dini_FloatSet(playerfilename,savestringname,(playermapxrot[slotid][index]));
  2400.         format(savestringname,sizeof(savestringname),"playermapyrot[%i]",index);
  2401.         dini_FloatSet(playerfilename,savestringname,(playermapyrot[slotid][index]));
  2402.         format(savestringname,sizeof(savestringname),"playermapzrot[%i]",index);
  2403.         dini_FloatSet(playerfilename,savestringname,(playermapzrot[slotid][index]));
  2404.         format(savestringname,sizeof(savestringname),"mapobjectstate[%i]",index);
  2405.         dini_IntSet(playerfilename,savestringname,(mapobjectstate[slotid][index]));
  2406.         format(savestringname,sizeof(savestringname),"mapobjectstring[%i]",index);
  2407.         new mapstring[128];
  2408.         format(mapstring,sizeof(mapstring),"%s",dini_Get(playerfilename,savestringname));
  2409.         for(new i;i < MAX_PLAYERS;i++)
  2410.         {
  2411.             if(IsPlayerConnected(i))
  2412.             {
  2413.                 if((showlabel[i])==1)
  2414.                 {
  2415.                     format(string,sizeof(string),"object:%s--ID:Objectid-%i-%i-Mid:%i-mapname:%s",mapstring,index,slotid,mapobjectmid[slotid][index],mapname[slotid]);
  2416.                     DeletePlayer3DTextLabel(i,mapobjectlabel[slotid][index]);
  2417.                     mapobjectlabel[slotid][index] = CreatePlayer3DTextLabel(i,string,COLOR,playermapx[slotid][index],playermapy[slotid][index],playermapz[slotid][index],DISTANCELABEL,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0);
  2418.                 }
  2419.             }
  2420.         }
  2421.         if((allowence[1][playerid])==1)
  2422.         {
  2423.             if((playersinput)==1)
  2424.             {
  2425.                 for(new count=0;count < MAX_PLAYERS;count++)
  2426.                 {
  2427.                     if(IsPlayerAdmince(count,3))
  2428.                     {
  2429.                         new name[128];
  2430.                         GetPlayerName(playerid,name,sizeof(name));
  2431.                         format(string,sizeof(string),"%s has rotated object id:%i-%i",name,index,slotid);
  2432.                         SendClientMessage(count,DARKBLUE,string);
  2433.                         format(string,sizeof(string),"[from] [%f - %f -%f -angle- %f - %f - %f]",oldx[playerid],oldy[playerid],oldz[playerid],oldxrot[playerid],oldyrot[playerid],oldzrot[playerid]);
  2434.                         SendClientMessage(count,DARKBLUE,string);
  2435.                         format(string,128,"[To] [%f - %f -%f -angle- %f - %f - %f]",playermapx[slotid][index],playermapy[slotid][index],playermapz[slotid][index],playermapxrot[slotid][index],playermapyrot[slotid][index],playermapzrot[slotid][index]);
  2436.                         SendClientMessage(count,DARKBLUE,string);
  2437.                     }
  2438.                 }
  2439.             }
  2440.         }
  2441.         return 1;
  2442.     }
  2443.     if(IsPlayerAdmince(playerid,3)||(allowence[1][playerid])==1)
  2444.     {
  2445.         new choice[64],choice2[64],input,index,speed;
  2446.         new string[128];
  2447.         if(sscanf(params,"s["#64"]s["#64"]iii",choice2,choice,index,input,speed))
  2448.         {
  2449.             SendClientMessage(playerid, RED, "SYNTAX /setobject [choice2] [choice] [objectid] [ammount] [speed]");
  2450.             SendClientMessage(playerid, RED, "Choice:xrot x yrot y zrot z");
  2451.             SendClientMessage(playerid, RED, "Choice2:Set,shift+,shift-");
  2452.             return 1;
  2453.         }
  2454.         oldx[playerid] = objx[index];
  2455.         oldy[playerid] = objy[index];
  2456.         oldz[playerid] = objz[index];
  2457.         oldxrot[playerid] = objxrot[index];
  2458.         oldyrot[playerid] = objyrot[index];
  2459.         oldzrot[playerid] = objzrot[index];
  2460.         if((speed) <= 0)
  2461.         {
  2462.             return SendClientMessage(playerid, RED, "you can't make the speed 0 or slower");
  2463.         }
  2464.         if((objectstate[index])==0)
  2465.         {
  2466.             return SendClientMessage(playerid, RED, "This object does not exist");
  2467.         }
  2468.         if(strcmp(choice2,"set",true,64)==0)
  2469.         {
  2470.             if(strcmp(choice,"xrot",true,64)==0)
  2471.             {
  2472.                 objxrot[index] = input;
  2473.             }
  2474.             else if(strcmp(choice,"yrot",true,64)==0)
  2475.             {
  2476.                 objyrot[index] = input;
  2477.             }
  2478.             else if(strcmp(choice,"zrot",true,64)==0)
  2479.             {
  2480.                 objzrot[index] = input;
  2481.             }
  2482.             else if(strcmp(choice,"x",true,64)==0)
  2483.             {
  2484.                 objx[index] = input;
  2485.             }
  2486.             else if(strcmp(choice,"y",true,64)==0)
  2487.             {
  2488.                 objy[index] = input;
  2489.             }
  2490.             else if(strcmp(choice,"z",true,64)==0)
  2491.             {
  2492.                 objz[index] = input;
  2493.             }
  2494.             else
  2495.             {
  2496.                 SendClientMessage(playerid, RED, "SYNTAX /setobject [choice2] [choice] [objectid] [ammount] [speed]");
  2497.                 SendClientMessage(playerid, RED, "Choice:xrot x yrot y zrot z");
  2498.                 SendClientMessage(playerid, RED, "Choice2:Set,shift+,shift-");
  2499.                 return 1;
  2500.             }
  2501.         }
  2502.         else if(strcmp(choice2,"shift+",true,64)==0)
  2503.         {
  2504.             if(strcmp(choice,"xrot",true,64)==0)
  2505.             {
  2506.                 objxrot[index] =  objxrot[index] + input;
  2507.             }
  2508.             else if(strcmp(choice,"yrot",true,64)==0)
  2509.             {
  2510.                 objyrot[index] = objxrot[index] + input;
  2511.             }
  2512.             else if(strcmp(choice,"zrot",true,64)==0)
  2513.             {
  2514.                 objzrot[index] = objzrot[index] + input;
  2515.             }
  2516.             else if(strcmp(choice,"x",true,64)==0)
  2517.             {
  2518.                 objx[index] = objx[index] + input;
  2519.             }
  2520.             else if(strcmp(choice,"y",true,64)==0)
  2521.             {
  2522.                 objy[index] = objy[index] + input;
  2523.             }
  2524.             else if(strcmp(choice,"z",true,64)==0)
  2525.             {
  2526.                 objz[index] = objz[index] + input;
  2527.             }
  2528.             else
  2529.             {
  2530.                 SendClientMessage(playerid, RED, "SYNTAX /setobject [choice2] [choice] [objectid] [ammount] [speed]");
  2531.                 SendClientMessage(playerid, RED, "Choice:xrot x yrot y zrot z");
  2532.                 SendClientMessage(playerid, RED, "Choice2:Set,shift+,shift-");
  2533.                 return 1;
  2534.             }
  2535.         }
  2536.         else if(strcmp(choice2,"shift-",true,64)==0)
  2537.         {
  2538.             if(strcmp(choice,"xrot",true,64)==0)
  2539.             {
  2540.                 objxrot[index] =  objxrot[index] - input;
  2541.             }
  2542.             else if(strcmp(choice,"yrot",true,64)==0)
  2543.             {
  2544.                 objyrot[index] = objxrot[index] - input;
  2545.             }
  2546.             else if(strcmp(choice,"zrot",true,64)==0)
  2547.             {
  2548.                 objzrot[index] = objzrot[index] - input;
  2549.             }
  2550.             else if(strcmp(choice,"x",true,64)==0)
  2551.             {
  2552.                 objx[index] = objx[index] - input;
  2553.             }
  2554.             else if(strcmp(choice,"y",true,64)==0)
  2555.             {
  2556.                 objy[index] = objy[index] - input;
  2557.             }
  2558.             else if(strcmp(choice,"z",true,64)==0)
  2559.             {
  2560.                 objz[index] = objz[index] - input;
  2561.             }
  2562.             else
  2563.             {
  2564.                 SendClientMessage(playerid, RED, "SYNTAX /setobject [choice2] [choice] [objectid] [ammount] [speed]");
  2565.                 SendClientMessage(playerid, RED, "Choice:xrot x yrot y zrot z");
  2566.                 SendClientMessage(playerid, RED, "Choice2:Set,shift+,shift-");
  2567.                 return 1;
  2568.             }
  2569.         }
  2570.         else
  2571.         {
  2572.             SendClientMessage(playerid, RED, "SYNTAX /setobject [choice2] [choice] [objectid] [ammount] [speed]");
  2573.             SendClientMessage(playerid, RED, "Choice:xrot x yrot y zrot z");
  2574.             SendClientMessage(playerid, RED, "Choice2:Set,shift+,shift-");
  2575.             return 1;
  2576.         }
  2577.         new savestringname[128];
  2578.         MoveDynamicObject(objects[index],objx[index],objy[index],objz[index],speed,objxrot[index],objyrot[index],objzrot[index]);
  2579.         SendClientMessage(playerid, LIGHTBLUE, "You have moved this object");
  2580.         format(savestringname,sizeof(savestringname),"objx[%i]",index);
  2581.         dini_FloatSet(objectsfilename,savestringname,(objx[index]));
  2582.         format(savestringname,sizeof(savestringname),"objy[%i]",index);
  2583.         dini_FloatSet(objectsfilename,savestringname,(objy[index]));
  2584.         format(savestringname,sizeof(savestringname),"objz[%i]",index);
  2585.         dini_FloatSet(objectsfilename,savestringname,(objz[index]));
  2586.         format(savestringname,sizeof(savestringname),"objxrot[%i]",index);
  2587.         dini_FloatSet(objectsfilename,savestringname,(objxrot[index]));
  2588.         format(savestringname,sizeof(savestringname),"objyrot[%i]",index);
  2589.         dini_FloatSet(objectsfilename,savestringname,(objyrot[index]));
  2590.         format(savestringname,sizeof(savestringname),"objzrot[%i]",index);
  2591.         dini_FloatSet(objectsfilename,savestringname,(objzrot[index]));
  2592.         format(string,128,"object:%s--ID:%i-Objectid-%i",objectstring[index],index,jbobjectid[index]);
  2593.         for(new i=0;i < MAX_PLAYERS;i++)
  2594.         {
  2595.             if(IsPlayerConnected(i))
  2596.             {
  2597.                 if((showlabel[i])==1)
  2598.                 {
  2599.                     DeletePlayer3DTextLabel(i,objectlabel[index]);
  2600.                     objectlabel[index] = CreatePlayer3DTextLabel(i,string,COLOR,objx[index],objy[index],objz[index],DISTANCELABEL,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0);
  2601.                 }
  2602.             }
  2603.         }
  2604.         if((allowence[1][playerid])==1)
  2605.         {
  2606.             if((playersinput)==1)
  2607.             {
  2608.                 for(new count=0;count < MAX_PLAYERS;count++)
  2609.                 {
  2610.                     if(IsPlayerAdmince(count,3))
  2611.                     {
  2612.                         new name[128];
  2613.                         GetPlayerName(playerid,name,sizeof(name));
  2614.                         format(string,sizeof(string),"%s has rotated object id:%i",name,index);
  2615.                         SendClientMessage(count,DARKBLUE,string);
  2616.                         format(string,sizeof(string),"[from] [%f - %f -%f -angle- %f - %f - %f]",oldx[playerid],oldy[playerid],oldz[playerid],oldxrot[playerid],oldyrot[playerid],oldzrot[playerid]);
  2617.                         SendClientMessage(count,DARKBLUE,string);
  2618.                         format(string,128,"[To] [%f - %f -%f -angle- %f - %f - %f]",objx[index],objy[index],objz[index],objxrot[index],objyrot[index],objzrot[index]);
  2619.                         SendClientMessage(count,DARKBLUE,string);
  2620.                     }
  2621.                 }
  2622.             }
  2623.         }
  2624.     }
  2625.     return 1;
  2626. }
  2627. CMD:setobjectcolor(playerid, params[])
  2628. {
  2629.     if((mapplayereditstate[playerid])==1)
  2630.     {
  2631.         return SendClientMessage(playerid, RED, "Private maps do not handel object colors");
  2632.     }
  2633.     if(IsPlayerAdmince(playerid,3)||(allowence[1][playerid])==1)
  2634.     {
  2635.         new index,hex:c,choice[64],string[128];
  2636.         if(sscanf(params,"is["#64"]",index,choice))
  2637.         {
  2638.             SendClientMessage(playerid, RED, "SYNTAX /setobjectcolor [objectid] [choice/hexcolor]");
  2639.             SendClientMessage(playerid, RED, "Choice:green,red,blue,yellow,pink,white,grey,purple,orange,normal");
  2640.         }
  2641.         if((objectstate[index])==0)
  2642.         {
  2643.             return SendClientMessage(playerid, RED, "This object does not exist");
  2644.         }
  2645.         if(strcmp(choice,"green",true,64)==0)
  2646.         {
  2647.             c = 0xFF00FF00;
  2648.         }
  2649.         else if(strcmp(choice,"red",true,64)==0)
  2650.         {
  2651.             c = 0xA71212FF;
  2652.         }
  2653.         else if(strcmp(choice,"blue",true,64)==0)
  2654.         {
  2655.             c = 0xFF0783B1;
  2656.         }
  2657.         else if(strcmp(choice,"yellow",true,64)==0)
  2658.         {
  2659.             c = 0xFFFFFF06;
  2660.         }
  2661.         else if(strcmp(choice,"pink",true,64)==0)
  2662.         {
  2663.             c = 0xFFFF00FF;
  2664.         }
  2665.         else if(strcmp(choice,"white",true,64)==0)
  2666.         {
  2667.             c = 0xFFFFFFFF;
  2668.         }
  2669.         else if(strcmp(choice,"grey",true,64)==0)
  2670.         {
  2671.             c = 0xFFC0C0C0;
  2672.         }
  2673.         else if(strcmp(choice,"purple",true,64)==0)
  2674.         {
  2675.             c = 0xFF8000FF;
  2676.         }
  2677.         else if(strcmp(choice,"orange",true,64)==0)
  2678.         {
  2679.             c = 0xFFFF8000;
  2680.         }
  2681.         else if(strcmp(choice,"normal",true,64)==0)
  2682.         {
  2683.             c = 0;
  2684.         }
  2685.         else
  2686.         {
  2687.             c = strval(choice);
  2688.             SendClientMessage(playerid, ORANGE,"Note please input a ARGB not a RGBA");
  2689.         }
  2690.         objectcolor[index] = c;
  2691.         if((objectcolor[index])==0)
  2692.         {
  2693.             SetDynamicObjectMaterial(objects[index],0,-1,"none","none",0);
  2694.         }
  2695.         else
  2696.         {
  2697.             SetDynamicObjectMaterial(objects[index],0 ,2707, "Shopping", "white",objectcolor[index]);
  2698.         }
  2699.         new savestringname[128];
  2700.         format(savestringname,sizeof(savestringname),"objectcolor[%i]",index);
  2701.         dini_IntSet(objectsfilename,savestringname,(objectcolor[index]));
  2702.         if((objectcolor[index])==0)
  2703.         {
  2704.             SendClientMessage(playerid, WHITE, "You have set the objects color back to normal");
  2705.         }
  2706.         else
  2707.         {
  2708.             format(string,sizeof(string),"You have set the objects color to %x",objectcolor[index]);
  2709.             SendClientMessage(playerid,LIGHTBLUE,string);
  2710.         }
  2711.         if((allowence[1][playerid])==1)
  2712.         {
  2713.             if((playersinput)==1)
  2714.             {
  2715.                 for(new count=0;count < MAX_PLAYERS;count++)
  2716.                 {
  2717.                     if(IsPlayerAdmince(count,3))
  2718.                     {
  2719.                         new name[128];
  2720.                         GetPlayerName(playerid,name,sizeof(name));
  2721.                         format(string,128,"%s has changed the color for objectid %i",name,index);
  2722.                         SendClientMessage(count,DARKBLUE,string);
  2723.                     }
  2724.                 }
  2725.             }
  2726.         }
  2727.     }
  2728.     else
  2729.     {
  2730.         SendClientMessage(playerid, RED, "You have to be atleast admin level 3 or Rcon admin or allowed to moveobjects to use this command");
  2731.     }
  2732.     return 1;
  2733. }
  2734. CMD:moveawayfromobject(playerid, params[])
  2735. {
  2736.     if((mapplayereditstate[playerid])==1)
  2737.     {
  2738.         new index,choice[64],ammount;
  2739.         new slotid = mapplayerslotid[playerid];
  2740.         if(sscanf(params,"is["#64"]i",index,choice,ammount))
  2741.         {
  2742.             SendClientMessage(playerid, RED, "/Syntax /moveawayfromobject [playerobjid] [choice] [ammount]");
  2743.             SendClientMessage(playerid, RED, "Choice:x,y,z");
  2744.             return 1;
  2745.         }
  2746.         if((mapobjectstate[slotid][index])==0)
  2747.         {
  2748.             return SendClientMessage(playerid, RED, "You have selected and object the does not exist");
  2749.         }
  2750.         if(IsPlayerInRangeOfPoint(playerid,25.0,playermapx[slotid][index],playermapy[slotid][index],playermapz[slotid][index]))
  2751.         {
  2752.             if(strcmp(choice,"x",true,64)==0)
  2753.             {
  2754.                 if(IsPlayerInAnyVehicle(playerid))
  2755.                 {      //
  2756.                     if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  2757.                     {
  2758.                         new vehicleid = GetPlayerVehicleID(playerid);
  2759.                         SetVehiclePos(vehicleid,playermapx[slotid][index]+ammount,playermapy[slotid][index],playermapz[slotid][index]);
  2760.                         SendClientMessage(playerid, YELLOW, "You have teleported away from the object");
  2761.                     }
  2762.                     else
  2763.                     {
  2764.                         SendClientMessage(playerid, RED, "You have to be the driver inorder to teleport from the object");
  2765.                     }
  2766.                 }
  2767.                 else
  2768.                 {
  2769.                     SetPlayerPos(playerid,playermapx[slotid][index]+ammount,playermapy[slotid][index],playermapz[slotid][index]);
  2770.                     SendClientMessage(playerid, YELLOW, "You have teleported away from the object");
  2771.                 }
  2772.             }
  2773.             else if(strcmp(choice,"y",true,64)==0)
  2774.             {
  2775.                 if(IsPlayerInAnyVehicle(playerid))
  2776.                 {      //
  2777.                     if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  2778.                     {
  2779.                         new vehicleid = GetPlayerVehicleID(playerid);
  2780.                         SetVehiclePos(vehicleid,playermapx[slotid][index],playermapy[slotid][index]+ammount,playermapz[slotid][index]);
  2781.                         SendClientMessage(playerid, YELLOW, "You have teleported away from the object");
  2782.                     }
  2783.                     else
  2784.                     {
  2785.                         SendClientMessage(playerid, RED, "You have to be the driver inorder to teleport from the object");
  2786.                     }
  2787.                 }
  2788.                 else
  2789.                 {
  2790.                     SetPlayerPos(playerid,playermapx[slotid][index],playermapy[slotid][index]+ammount,playermapz[slotid][index]);
  2791.                     SendClientMessage(playerid, YELLOW, "You have teleported away from the object");
  2792.                 }
  2793.             }
  2794.             else if(strcmp(choice,"z",true,64)==0)
  2795.             {
  2796.                 if(IsPlayerInAnyVehicle(playerid))
  2797.                 {      //
  2798.                     if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  2799.                     {
  2800.                         new vehicleid = GetPlayerVehicleID(playerid);
  2801.                         SetVehiclePos(vehicleid,playermapx[slotid][index],playermapy[slotid][index],playermapz[slotid][index]+ammount);
  2802.                         SendClientMessage(playerid, YELLOW, "You have teleported away from the object");
  2803.                     }
  2804.                     else
  2805.                     {
  2806.                         SendClientMessage(playerid, RED, "You have to be the driver inorder to teleport from the object");
  2807.                     }
  2808.                 }
  2809.                 else
  2810.                 {
  2811.                     SetPlayerPos(playerid,playermapx[slotid][index],playermapy[slotid][index],playermapz[slotid][index]+ammount);
  2812.                     SendClientMessage(playerid, YELLOW, "You have teleported away from the object");
  2813.                 }
  2814.             }
  2815.             else
  2816.             {
  2817.                 SendClientMessage(playerid, RED, "/Syntax /moveawayfromobject [objid] [choice] [ammount]");
  2818.                 SendClientMessage(playerid, RED, "Choice:x,y,z");
  2819.             }
  2820.         }
  2821.         else
  2822.         {
  2823.             SendClientMessage(playerid, RED, "You are to far away from the object inorder to teleport from it");
  2824.         }
  2825.         return 1;
  2826.     }
  2827.     if(IsPlayerAdmince(playerid,3)||(allowence[0][playerid])==1)
  2828.     {
  2829.         new index,choice[64],ammount;
  2830.         if(sscanf(params,"is["#64"]i",index,choice,ammount))
  2831.         {
  2832.             SendClientMessage(playerid, RED, "/Syntax /moveawayfromobject [objid] [choice] [ammount]");
  2833.             SendClientMessage(playerid, RED, "Choice:x,y,z");
  2834.             return 1;
  2835.         }
  2836.         if((objectstate[index])==0)
  2837.         {
  2838.             return SendClientMessage(playerid, RED, "This object does not exist");
  2839.         }
  2840.         if(IsPlayerInRangeOfPoint(playerid,25.0,objx[index],objy[index],objz[index]))
  2841.         {
  2842.             if(strcmp(choice,"x",true,64)==0)
  2843.             {
  2844.                 if(IsPlayerInAnyVehicle(playerid))
  2845.                 {      //
  2846.                     if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  2847.                     {
  2848.                         new vehicleid = GetPlayerVehicleID(playerid);
  2849.                         SetVehiclePos(vehicleid,objx[index]+ammount,objy[index],objz[index]);
  2850.                         SendClientMessage(playerid, YELLOW, "You have teleported away from the object");
  2851.                     }
  2852.                     else
  2853.                     {
  2854.                         SendClientMessage(playerid, RED, "You have to be the driver inorder to teleport from the object");
  2855.                     }
  2856.                 }
  2857.                 else
  2858.                 {
  2859.                     SetPlayerPos(playerid,objx[index]+ammount,objy[index],objz[index]);
  2860.                     SendClientMessage(playerid, YELLOW, "You have teleported away from the object");
  2861.                 }
  2862.             }
  2863.             else if(strcmp(choice,"y",true,64)==0)
  2864.             {
  2865.                 if(IsPlayerInAnyVehicle(playerid))
  2866.                 {      //
  2867.                     if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  2868.                     {
  2869.                         new vehicleid = GetPlayerVehicleID(playerid);
  2870.                         SetVehiclePos(vehicleid,objx[index],objy[index]+ammount,objz[index]);
  2871.                         SendClientMessage(playerid, YELLOW, "You have teleported away from the object");
  2872.                     }
  2873.                     else
  2874.                     {
  2875.                         SendClientMessage(playerid, RED, "You have to be the driver inorder to teleport from the object");
  2876.                     }
  2877.                 }
  2878.                 else
  2879.                 {
  2880.                     SetPlayerPos(playerid,objx[index],objy[index]+ammount,objz[index]);
  2881.                     SendClientMessage(playerid, YELLOW, "You have teleported away from the object");
  2882.                 }
  2883.             }
  2884.             else if(strcmp(choice,"z",true,64)==0)
  2885.             {
  2886.                 if(IsPlayerInAnyVehicle(playerid))
  2887.                 {      //
  2888.                     if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  2889.                     {
  2890.                         new vehicleid = GetPlayerVehicleID(playerid);
  2891.                         SetVehiclePos(vehicleid,objx[index],objy[index],objz[index]+ammount);
  2892.                         SendClientMessage(playerid, YELLOW, "You have teleported away from the object");
  2893.                     }
  2894.                     else
  2895.                     {
  2896.                         SendClientMessage(playerid, RED, "You have to be the driver inorder to teleport from the object");
  2897.                     }
  2898.                 }
  2899.                 else
  2900.                 {
  2901.                     SetPlayerPos(playerid,objx[index],objy[index],objz[index]+ammount);
  2902.                     SendClientMessage(playerid, YELLOW, "You have teleported away from the object");
  2903.                 }
  2904.             }
  2905.             else
  2906.             {
  2907.                 SendClientMessage(playerid, RED, "/Syntax /moveawayfromobject [objid] [choice] [ammount]");
  2908.                 SendClientMessage(playerid, RED, "Choice:x,y,z");
  2909.             }
  2910.         }
  2911.         else
  2912.         {
  2913.             SendClientMessage(playerid, RED, "You are to far away from the object inorder to teleport from it");
  2914.         }
  2915.     }
  2916.     else
  2917.     {
  2918.         SendClientMessage(playerid, RED, "You have to be atleast admin level 3 or Rcon admin or allowed to addobjects to use this command");
  2919.     }
  2920.     return 1;
  2921. }
  2922. CMD:moveobject(playerid, params[])
  2923. {
  2924.     if((mapplayereditstate[playerid])==1)
  2925.     {
  2926.         new index;
  2927.         new string[128];
  2928.         new slotid = mapplayerslotid[playerid];
  2929.         if(sscanf(params,"i",index))
  2930.         {
  2931.             return SendClientMessage(playerid, RED, "SYNTAX:/moveobject [playerjbobjectid]");
  2932.         }
  2933.         if((mapobjectstate[slotid][index])==0)
  2934.         {
  2935.             return SendClientMessage(playerid, RED, "You have selected and object the does not exist");
  2936.         }
  2937.         EditDynamicObject(playerid,mapobject[slotid][index]);
  2938.         editobjnum[playerid] = index;
  2939.         edittype[playerid] = 2;
  2940.         if((allowence[1][playerid])==1)
  2941.         {
  2942.             if((playersinput)==1)
  2943.             {
  2944.                 for(new count=0;count < MAX_PLAYERS;count++)
  2945.                 {
  2946.                     if(IsPlayerAdmince(count,3))
  2947.                     {
  2948.                         new name[128];
  2949.                         GetPlayerName(playerid,name,sizeof(name));
  2950.                         format(string,128,"%s is moveing objectid %i-%i",name,index,slotid);
  2951.                         SendClientMessage(count,DARKBLUE,string);
  2952.                     }
  2953.                 }
  2954.             }
  2955.         }
  2956.         return 1;
  2957.     }
  2958.     if(IsPlayerAdmince(playerid,3)||(allowence[1][playerid])==1)
  2959.     {
  2960.         new index;
  2961.         new string[128];
  2962.         if(sscanf(params,"i",index))
  2963.         {
  2964.             return SendClientMessage(playerid, RED, "SYNTAX:/moveobject [jbobjectid]");
  2965.         }
  2966.         if((objectstate[index])==1)
  2967.         {
  2968.             EditDynamicObject(playerid,objects[index]);
  2969.             editobjnum[playerid] = index;
  2970.             edittype[playerid] = 1;
  2971.             if((allowence[1][playerid])==1)
  2972.             {
  2973.                 if((playersinput)==1)
  2974.                 {
  2975.                     for(new count=0;count < MAX_PLAYERS;count++)
  2976.                     {
  2977.                         if(IsPlayerAdmince(count,3))
  2978.                         {
  2979.                             new name[128];
  2980.                             GetPlayerName(playerid,name,sizeof(name));
  2981.                             format(string,128,"%s is moveing objectid %i",name,index);
  2982.                             SendClientMessage(count,DARKBLUE,string);
  2983.                         }
  2984.                     }
  2985.                 }
  2986.             }
  2987.         }
  2988.         else
  2989.         {
  2990.             SendClientMessage(playerid, RED, "This object does not exist");
  2991.         }
  2992.     }
  2993.     else
  2994.     {
  2995.         SendClientMessage(playerid, RED, "You have to be atleast admin level 3 or Rcon admin or allowed to moveobjects to use this command");
  2996.     }
  2997.     return 1;
  2998. }
  2999. CMD:deleteobject(playerid,params[])
  3000. {
  3001.     if((mapplayereditstate[playerid])==1)
  3002.     {
  3003.         new index,savestringname[128],string[128];
  3004.         new playerfilename[128];
  3005.         new slotid = mapplayerslotid[playerid];
  3006.         if(sscanf(params,"i",index))
  3007.         {
  3008.             return SendClientMessage(playerid, RED, "SYNTAX:/deleteobject [objectid]");
  3009.         }
  3010.         playermapx[slotid][index] = 0;
  3011.         playermapy[slotid][index] = 0;
  3012.         playermapz[slotid][index] = 0;
  3013.         playermapxrot[slotid][index] = 0;
  3014.         playermapyrot[slotid][index] = 0;
  3015.         playermapzrot[slotid][index] = 0;
  3016.         mapobjectstate[slotid][index] = 0;
  3017.         format(playerfilename,sizeof(playerfilename),"%s",mapname[slotid]);
  3018.         format(savestringname,sizeof(savestringname),"playermapx[%i]",index);
  3019.         dini_FloatSet(playerfilename,savestringname,(playermapx[slotid][index]));
  3020.         dini_Unset(playerfilename,savestringname);
  3021.         format(savestringname,sizeof(savestringname),"playermapy[%i]",index);
  3022.         dini_FloatSet(playerfilename,savestringname,(playermapy[slotid][index]));
  3023.         dini_Unset(playerfilename,savestringname);
  3024.         format(savestringname,sizeof(savestringname),"playermapz[%i]",index);
  3025.         dini_FloatSet(playerfilename,savestringname,(playermapz[slotid][index]));
  3026.         dini_Unset(playerfilename,savestringname);
  3027.         format(savestringname,sizeof(savestringname),"playermapxrot[%i]",index);
  3028.         dini_FloatSet(playerfilename,savestringname,(playermapxrot[slotid][index]));
  3029.         dini_Unset(playerfilename,savestringname);
  3030.         format(savestringname,sizeof(savestringname),"playermapyrot[%i]",index);
  3031.         dini_FloatSet(playerfilename,savestringname,(playermapyrot[slotid][index]));
  3032.         dini_Unset(playerfilename,savestringname);
  3033.         format(savestringname,sizeof(savestringname),"playermapzrot[%i]",index);
  3034.         dini_FloatSet(playerfilename,savestringname,(playermapxrot[slotid][index]));
  3035.         dini_Unset(playerfilename,savestringname);
  3036.         format(savestringname,sizeof(savestringname),"mapobjectstring[%i]",index);
  3037.         dini_Set(playerfilename,savestringname,(""));
  3038.         dini_Unset(playerfilename,savestringname);
  3039.         format(savestringname,sizeof(savestringname),"mapobjectmid[%i]",index);
  3040.         dini_IntSet(playerfilename,savestringname,(mapobjectmid[slotid][index]));
  3041.         dini_Unset(playerfilename,savestringname);
  3042.         format(savestringname,sizeof(savestringname),"mapobjectstate[%i]",index);
  3043.         dini_IntSet(playerfilename,savestringname,(mapobjectstate[slotid][index]));
  3044.         dini_Unset(playerfilename,savestringname);
  3045.         DestroyDynamicObject(mapobject[slotid][index]);
  3046.         for(new i;i < MAX_PLAYERS;i++)
  3047.         {
  3048.             if(IsPlayerConnected(i))
  3049.             {
  3050.                 if((showlabel[playerid])==1)
  3051.                 {
  3052.                     DeletePlayer3DTextLabel(i, mapobjectlabel[slotid][index]);
  3053.                 }
  3054.             }
  3055.         }
  3056.         if((allowence[2][playerid])==1)
  3057.         {
  3058.             if((playersinput)==1)
  3059.             {
  3060.                 for(new count=0;count < MAX_PLAYERS;count++)
  3061.                 {
  3062.                     if(IsPlayerAdmince(count,3))
  3063.                     {
  3064.                         new name[128];
  3065.                         GetPlayerName(playerid,name,sizeof(name));
  3066.                         format(string,128,"%s has deleted objectid %i-%i",name,index,slotid);
  3067.                         SendClientMessage(count,DARKBLUE,string);
  3068.                     }
  3069.                 }
  3070.             }
  3071.         }
  3072.         SendClientMessage(playerid, RED, "You have deleted and object");
  3073.         return 1;
  3074.     }
  3075.     if(IsPlayerAdmince(playerid,3)||(allowence[2][playerid])==1)
  3076.     {
  3077.         new index,savestringname[128],string[128];
  3078.         if(sscanf(params,"i",index))
  3079.         {
  3080.             return SendClientMessage(playerid, RED, "SYNTAX:/deleteobject [objectid]");
  3081.         }
  3082.         objx[index] = 0;
  3083.         objy[index] = 0;
  3084.         objz[index] = 0;
  3085.         objxrot[index] = 0;
  3086.         objyrot[index] = 0;
  3087.         objzrot[index] = 0;
  3088.         jbobjectid[index] = 0;
  3089.         objectstring[index] = "";
  3090.         objectstate[index] = 0;
  3091.         format(savestringname,sizeof(savestringname),"objx[%i]",index);
  3092.         dini_FloatSet(objectsfilename,savestringname,(0));
  3093.         dini_Unset(objectsfilename,savestringname);
  3094.         format(savestringname,sizeof(savestringname),"objy[%i]",index);
  3095.         dini_FloatSet(objectsfilename,savestringname,(0));
  3096.         dini_Unset(objectsfilename,savestringname);
  3097.         format(savestringname,sizeof(savestringname),"objz[%i]",index);
  3098.         dini_FloatSet(objectsfilename,savestringname,(0));
  3099.         dini_Unset(objectsfilename,savestringname);
  3100.         format(savestringname,sizeof(savestringname),"objxrot[%i]",index);
  3101.         dini_FloatSet(objectsfilename,savestringname,(0));
  3102.         dini_Unset(objectsfilename,savestringname);
  3103.         format(savestringname,sizeof(savestringname),"objyrot[%i]",index);
  3104.         dini_FloatSet(objectsfilename,savestringname,(0));
  3105.         dini_Unset(objectsfilename,savestringname);
  3106.         format(savestringname,sizeof(savestringname),"objzrot[%i]",index);
  3107.         dini_FloatSet(objectsfilename,savestringname,(0));
  3108.         dini_Unset(objectsfilename,savestringname);
  3109.         format(savestringname,sizeof(savestringname),"object[%i]",index);
  3110.         dini_IntSet(objectsfilename,savestringname,(0));
  3111.         format(savestringname,sizeof(savestringname),"objectlabel[%i]",index);
  3112.         dini_Set(objectsfilename,savestringname,(""));
  3113.         dini_Unset(objectsfilename,savestringname);
  3114.         format(savestringname,sizeof(savestringname),"objectcolor[%i]",index);
  3115.         dini_IntSet(objectsfilename,savestringname,(0));
  3116.         dini_Unset(objectsfilename,savestringname);
  3117.         format(savestringname,sizeof(savestringname),"objectstate[%i]",index);
  3118.         dini_IntSet(objectsfilename,savestringname,(0));
  3119.         dini_Unset(objectsfilename,savestringname);
  3120.         DestroyDynamicObject(objects[index]);
  3121.         format(string,128,"You have delete a object [objectid:%i]",index);
  3122.         SendClientMessage(playerid, YELLOW, string);
  3123.         if((allowence[2][playerid])==1)
  3124.         {
  3125.             if((playersinput)==1)
  3126.             {
  3127.                 for(new count=0;count < MAX_PLAYERS;count++)
  3128.                 {
  3129.                     if(IsPlayerAdmince(count,3))
  3130.                     {
  3131.                         new name[128];
  3132.                         GetPlayerName(playerid,name,sizeof(name));
  3133.                         format(string,128,"%s has deleted objectid %i",name,index);
  3134.                         SendClientMessage(count,DARKBLUE,string);
  3135.                     }
  3136.                 }
  3137.             }
  3138.         }
  3139.         for(new i=0;i < MAX_PLAYERS;i++)
  3140.         {
  3141.             DeletePlayer3DTextLabel(i,objectlabel[index]);
  3142.         }
  3143.     }
  3144.     else
  3145.     {
  3146.         SendClientMessage(playerid, RED, "You have to be atleast admin level 3 or Rcon admin or allowed to deleteobjects to use this command");
  3147.     }
  3148.     return 1;
  3149. }
  3150. CMD:labeldistance(playerid, params[])
  3151. {
  3152.     if(IsPlayerAdmince(playerid,5))
  3153.     {
  3154.         new input;
  3155.         if(sscanf(params,"i",input))
  3156.         {
  3157.             SendClientMessage(playerid, RED, "Syntax /labeldistance [number]");
  3158.             return 1;
  3159.         }
  3160.         if((input) > 5)
  3161.         {
  3162.             new name[128],string[128]/*,savestringname[128]*/;
  3163.             GetPlayerName(playerid, name,sizeof(name));
  3164.             format(string,128,"[ADMIN:%s] Has Change the label distance from %f to %i",name,DISTANCELABEL,input);
  3165.             DISTANCELABEL = input;
  3166.             dini_IntSet(objectsfilename,"labeldistance",floatround(DISTANCELABEL));
  3167.             SendClientMessageToAll(PINK,string);
  3168.             for(new count=0;count < MAX_OBJECTS;count++)
  3169.             {
  3170.                 for(new i = 0;i < MAX_PLAYERS;i++)
  3171.                 {
  3172.                     if(IsPlayerConnected(i))
  3173.                     {
  3174.                         if((objectstate[count])==1)
  3175.                         {
  3176.                             DeletePlayer3DTextLabel(i,objectlabel[count]);
  3177.                         }
  3178.                     }
  3179.                 }
  3180.             }
  3181.             for(new count=0;count < MAX_OBJECTS;count++)
  3182.             {
  3183.                 for(new i = 0;i < MAX_PLAYERS;i++)
  3184.                 {
  3185.                     if(IsPlayerConnected(i))
  3186.                     {
  3187.                         if((objectstate[count])==1)
  3188.                         {
  3189.                             if((showlabel[i])==1)
  3190.                             {
  3191.                                 format(string,128,"object:%s--ID:%i-Objectid-%i",objectstring[count],count,jbobjectid[count]);
  3192.                                 objectlabel[count] = CreatePlayer3DTextLabel(i,string,COLOR,objx[count],objy[count],objz[count],DISTANCELABEL,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0);
  3193.                             }
  3194.                         }
  3195.                     }
  3196.                 }
  3197.             }
  3198.         }
  3199.         else
  3200.         {
  3201.             SendClientMessage(playerid, RED, "The Input has to be atleast five");
  3202.         }
  3203.     }
  3204.     else
  3205.     {
  3206.         SendClientMessage(playerid, RED, "You have to be atleast admin level 5 or Rcon admin to use this command");
  3207.     }
  3208.     return 1;
  3209. }
  3210. CMD:enablelabels(playerid,params[])
  3211. {
  3212.     if((showlabel[playerid])==0)
  3213.     {
  3214.         new savestringname[128],name[128],string[128];
  3215.         GetPlayerName(playerid,name,sizeof(name));
  3216.         showlabel[playerid] = 1;
  3217.         SendClientMessage(playerid, LIGHTBLUE, "You Have Enabled Labels");
  3218.         format(savestringname,sizeof(savestringname),"showlabel[%s]",name);
  3219.         dini_IntSet(objectsfilename,savestringname,(showlabel[playerid]));
  3220.         for(new count=0;count < MAX_OBJECTS;count++)
  3221.         {
  3222.             if((objectstate[count])==1)
  3223.             {
  3224.                 format(string,128,"object:%s--ID:%i-Objectid-%i",objectstring[count],count,jbobjectid[count]);
  3225.                 objectlabel[count] = CreatePlayer3DTextLabel(playerid,string,COLOR,objx[count],objy[count],objz[count],DISTANCELABEL,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0);
  3226.             }
  3227.         }
  3228.         for(new count;count < MAX;count++)
  3229.         {
  3230.             if((mapplayerslot[count])==1)
  3231.             {
  3232.                 new slotid = count;
  3233.                 new playerfilename[128];
  3234.                 format(playerfilename,sizeof(playerfilename),"%s",mapname[count]);
  3235.                 for(new count2;count2 < MAX_OBJECTS;count2++)
  3236.                 {
  3237.                     if((mapobjectstate[slotid][count2])==1)
  3238.                     {
  3239.                         format(savestringname,sizeof(savestringname),"mapobjectstring[%i]",count2);
  3240.                         new mapstring[128];
  3241.                         format(mapstring,sizeof(mapstring),"%s",dini_Get(playerfilename,savestringname));
  3242.                         format(string,sizeof(string),"object:%s--ID:Objectid-%i-%i-Mid:%i-mapname:%s",mapstring,count2,slotid,mapobjectmid[slotid][count2],mapname[slotid]);
  3243.                         mapobjectlabel[slotid][count2] = CreatePlayer3DTextLabel(playerid,string,COLOR,playermapx[slotid][count2],playermapy[slotid][count2],playermapz[slotid][count2],DISTANCELABEL,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0);
  3244.                     }
  3245.                 }
  3246.             }
  3247.         }
  3248.     }
  3249.     else
  3250.     {
  3251.         SendClientMessage(playerid, RED, "You already have enabled labels");
  3252.     }
  3253.     return 1;
  3254. }
  3255. CMD:disablelabels(playerid, params[])
  3256. {
  3257.     if((showlabel[playerid])==1)
  3258.     {
  3259.         new savestringname[128],name[128];
  3260.         GetPlayerName(playerid,name,sizeof(name));
  3261.         showlabel[playerid]=0;
  3262.         SendClientMessage(playerid, LIGHTBLUE, "You Have Disabled Labels");
  3263.         format(savestringname,sizeof(savestringname),"showlabel[%s]",name);
  3264.         dini_IntSet(objectsfilename,savestringname,(showlabel[playerid]));
  3265.         for(new count=0;count < MAX_OBJECTS;count++)
  3266.         {
  3267.             if((objectstate[count])==1)
  3268.             {
  3269.                 DeletePlayer3DTextLabel(playerid,objectlabel[count]);
  3270.             }
  3271.         }
  3272.         for(new count;count < MAX_OBJECTS;count++)
  3273.         {
  3274.             if((mapplayerslot[count])==1)
  3275.             {
  3276.                 new slotid = count;
  3277.                 for(new count2;count2 < MAX_OBJECTS;count++)
  3278.                 {
  3279.                     if((mapobjectstate[slotid][count2])==1)
  3280.                     {
  3281.                         DeletePlayer3DTextLabel(playerid,mapobjectlabel[slotid][count2]);
  3282.                     }
  3283.                 }
  3284.             }
  3285.         }
  3286.     }
  3287.     else
  3288.     {
  3289.         SendClientMessage(playerid, RED, "your labels are off already");
  3290.     }
  3291.     return 1;
  3292. }
  3293. CMD:setplayerlabelstate(playerid,params[])
  3294. {
  3295.     if(IsPlayerAdmince(playerid,4))
  3296.     {
  3297.         new id,input[128],choice[128];
  3298.         if(sscanf(params,"s["#64"]s["#64"]",input,choice))
  3299.         {
  3300.             return SendClientMessage(playerid, RED, "SYNTAX /setplayerlabelstate [playerid/all] [yes/no]");
  3301.         }
  3302.         new adminname[128],savestringname[128],string[128],name[128];
  3303.         GetPlayerName(playerid,adminname,sizeof(adminname));
  3304.         if(strcmp(input,"all",true,64)==0)
  3305.         {
  3306.             if(strcmp(choice,"yes",true,4)==0)
  3307.             {
  3308.                 for(new i=0;i < MAX_PLAYERS;i++)
  3309.                 {
  3310.                     if(IsPlayerConnected(i))
  3311.                     {
  3312.                         if((showlabel[i])==0)
  3313.                         {
  3314.                             for(new count;count < MAX_OBJECTS;count ++)
  3315.                             {
  3316.                                 if((objectstate[count])==1)
  3317.                                 {
  3318.                                     showlabel[i] = 1;
  3319.                                     GetPlayerName(i,name,sizeof(name));
  3320.                                     format(savestringname,sizeof(savestringname),"showlabel[%s]",name);
  3321.                                     dini_IntSet(objectsfilename,savestringname,(showlabel[i]));
  3322.                                     format(string,128,"object:%s--ID:%i-Objectid-%i",objectstring[count],count,jbobjectid[count]);
  3323.                                     objectlabel[count] = CreatePlayer3DTextLabel(i,string,COLOR,objx[count],objy[count],objz[count],DISTANCELABEL,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0);
  3324.                                 }
  3325.                             }
  3326.                         }
  3327.                     }
  3328.                 }
  3329.                 format(string,127,"[ADMIN:%s] has enabled all labels",adminname);
  3330.                 SendClientMessageToAll(PINK,string);
  3331.             }
  3332.             else if(strcmp(choice,"no",true,3)==0)
  3333.             {
  3334.                 for(new i=0;i < MAX_PLAYERS;i++)
  3335.                 {
  3336.                     if(IsPlayerConnected(i))
  3337.                     {
  3338.                         if((showlabel[i])==1)
  3339.                         {
  3340.                             for(new count;count < MAX_OBJECTS;count ++)
  3341.                             {
  3342.                                 if((objectstate[count])==1)
  3343.                                 {
  3344.                                     showlabel[i] = 0;
  3345.                                     GetPlayerName(i,name,sizeof(name));
  3346.                                     format(savestringname,sizeof(savestringname),"showlabel[%s]",name);
  3347.                                     dini_IntSet(objectsfilename,savestringname,(showlabel[i]));
  3348.                                     DeletePlayer3DTextLabel(i,objectlabel[count]);
  3349.                                 }
  3350.                             }
  3351.                         }
  3352.                     }
  3353.                 }
  3354.                 format(string,127,"[ADMIN:%s] has disabled all labels",adminname);
  3355.                 SendClientMessageToAll(PINK,string);
  3356.             }
  3357.             else
  3358.             {
  3359.                 SendClientMessage(playerid, RED, "Yes or No");
  3360.             }
  3361.         }
  3362.         else
  3363.         {
  3364.             id = strval(input);
  3365.             GetPlayerName(id,name,sizeof(name));
  3366.             if(!IsPlayerConnected(id))
  3367.             {
  3368.                 return SendClientMessage(playerid, RED, "This id is not connected");
  3369.             }
  3370.             if(strcmp(choice,"yes",true,64)==0)
  3371.             {
  3372.                 if((showlabel[id])==0)
  3373.                 {
  3374.                     showlabel[id] = 1;
  3375.                     format(string,127,"[ADMIN:%s] has enabled %s's labels",adminname,name);
  3376.                     SendClientMessageToAll(PINK,string);
  3377.                     format(savestringname,sizeof(savestringname),"showlabel[%s]",name);
  3378.                     dini_IntSet(objectsfilename,savestringname,(showlabel[id]));
  3379.                     for(new count; count < MAX_OBJECTS;count++)
  3380.                     {
  3381.                         if((objectstate[count])==1)
  3382.                         {
  3383.                             format(string,128,"object:%s--ID:%i-Objectid-%i",objectstring[count],count,jbobjectid[count]);
  3384.                             objectlabel[count] = CreatePlayer3DTextLabel(id,string,COLOR,objx[count],objy[count],objz[count],DISTANCELABEL,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0);
  3385.                         }
  3386.                     }
  3387.                 }
  3388.                 else
  3389.                 {
  3390.                     format(string,128,"the labels are already enabled for %s",name);
  3391.                     SendClientMessage(playerid, RED, string);
  3392.                 }
  3393.             }
  3394.             else if(strcmp(choice,"no",true,64)==0)
  3395.             {
  3396.                 if((showlabel[id])==1)
  3397.                 {
  3398.                     showlabel[id] = 0;
  3399.                     format(string,127,"[ADMIN:%s] has Disabled %s's labels",adminname,name);
  3400.                     SendClientMessageToAll(PINK,string);
  3401.                     format(savestringname,sizeof(savestringname),"showlabel[%s]",name);
  3402.                     dini_IntSet(objectsfilename,savestringname,(showlabel[id]));
  3403.                     for(new count;count < MAX_OBJECTS;count++)
  3404.                     {
  3405.                         if((objectstate[count])==1)
  3406.                         {
  3407.                             DeletePlayer3DTextLabel(id,objectlabel[count]);
  3408.                         }
  3409.                     }
  3410.                 }
  3411.                 else
  3412.                 {
  3413.                     format(string,128,"the labels are disabeled enabled for %s",name);
  3414.                 }
  3415.             }
  3416.             else
  3417.             {
  3418.                 SendClientMessage(playerid, RED, "Yes or No");
  3419.             }
  3420.         }
  3421.     }
  3422.     else
  3423.     {
  3424.         SendClientMessage(playerid, RED, "You have to be atleast admin level 4 or Rcon admin to use this command");
  3425.     }
  3426.     return 1;
  3427. }
  3428. CMD:jbobjectscheck(playerid,params[])
  3429. {
  3430.     if(IsPlayerAdmince(playerid,5))
  3431.     {
  3432.         if((mapplayereditstate[playerid])==1)
  3433.         {
  3434.             SendClientMessage(playerid, ORANGE, "!NOTE you can not check objects from a private map");
  3435.         }
  3436.         new choice[128],input;
  3437.         if(sscanf(params,"s["#64"]i",choice,input))
  3438.         {
  3439.             SendClientMessage(playerid, RED, "SYNTAX /jbobjectscheck [choice] [input]");
  3440.             SendClientMessage(playerid, RED, "Choices are [objectpos,playersinput]");
  3441.             SendClientMessage(playerid, ORANGE, "NOTE:playerinput requirs a yes[1] or no[0] use appropriate symbol");
  3442.             return 1;
  3443.         }
  3444.         if(strcmp(choice,"objectpos",true,128)==0)
  3445.         {
  3446.             if((objectstate[input])==1)
  3447.             {
  3448.                 new Float:ox,Float:oy,Float:oz,Float:oxrot,Float:oyrot,Float:ozrot;
  3449.                 new Float:cx,Float:cy,Float:cz,Float:cxrot,Float:cyrot,Float:czrot;
  3450.                 new savestringname[128],name[128],string[128];
  3451.                 printf("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%s~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~",name);
  3452.                 print("~~~~~~~~~~~~~~~~~~~~~~~checks the object current positions~~~~~~~~~~~~~~~~~");
  3453.                 GetPlayerName(playerid,name,sizeof(name));
  3454.                 GetDynamicObjectPos(objects[input],ox,oy,oz);
  3455.                 GetDynamicObjectRot(objects[input],oxrot,oyrot,ozrot);
  3456.                 format(savestringname,sizeof(savestringname),"objx[%i]",input);
  3457.                 print(savestringname);
  3458.                 cx = dini_Int(objectsfilename,savestringname);
  3459.                 format(savestringname,sizeof(savestringname),"objy[%i]",input);
  3460.                 print(savestringname);
  3461.                 cy = dini_Int(objectsfilename,savestringname);
  3462.                 format(savestringname,sizeof(savestringname),"objz[%i]",input);
  3463.                 print(savestringname);
  3464.                 cz = dini_Int(objectsfilename,savestringname);
  3465.                 format(savestringname,sizeof(savestringname),"objxrot[%i]",input);
  3466.                 print(savestringname);
  3467.                 cxrot = dini_Int(objectsfilename,savestringname);
  3468.                 format(savestringname,sizeof(savestringname),"objyrot[%i]",input);
  3469.                 print(savestringname);
  3470.                 cyrot = dini_Int(objectsfilename,savestringname);
  3471.                 format(savestringname,sizeof(savestringname),"objzrot[%i]",input);
  3472.                 print(savestringname);
  3473.                 czrot = dini_Int(objectsfilename,savestringname);
  3474.                 format(string,sizeof(string),"[ADMIN:%s] has has check the ange for object %i this informat can be found in the console or log",name,input);
  3475.                 SendClientMessageToAll(DARKBLUE,string);
  3476.                 printf("loaded object floats [%f-%f-%f--angle:-%f-%f-%f",cx,cy,cz,cxrot,cyrot,czrot);
  3477.                 printf("CurrentPosition floats [%f-%f-%f--angle:-%f-%f-%f",ox,oy,oz,oxrot,oyrot,ozrot);
  3478.                 print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
  3479.             }
  3480.             else
  3481.             {
  3482.                 SendClientMessage(playerid,RED,"Object does not exist");
  3483.             }
  3484.         }
  3485.         else if(strcmp(choice,"playersinput",true,128)==0)
  3486.         {
  3487.             if((input)==0)
  3488.             {
  3489.                 if((playersinput)==1)
  3490.                 {
  3491.                     new name[128],string[128];
  3492.                     GetPlayerName(playerid, name,sizeof(name));
  3493.                     format(string,128,"[ADMIN:%s] has Disabled the reading of the addobject,moveobjects,deleteobject commands",name);
  3494.                     SendClientMessageToAll(PINK,string);
  3495.                     playersinput = 0;
  3496.                 }
  3497.                 else
  3498.                 {
  3499.                     SendClientMessage(playerid, RED, "Players input is not enabled");
  3500.                 }
  3501.             }
  3502.             else if((input)==1)
  3503.             {
  3504.                 if((playersinput)==0)
  3505.                 {
  3506.                     new name[128],string[128];
  3507.                     GetPlayerName(playerid, name,sizeof(name));
  3508.                     format(string,128,"[ADMIN:%s] has Enabled the reading of the addobject,moveobjects,deleteobject commands",name);
  3509.                     SendClientMessageToAll(PINK,string);
  3510.                     playersinput = 1;
  3511.                 }
  3512.                 else
  3513.                 {
  3514.                     SendClientMessage(playerid, RED, "Players input has already been enabled");
  3515.                 }
  3516.             }
  3517.         }
  3518.         else
  3519.         {
  3520.             SendClientMessage(playerid, RED, "You enterd an invalid choice");
  3521.             SendClientMessage(playerid, RED, "Choices are [objectpos,playersinput]");
  3522.             SendClientMessage(playerid, RED, "NOTE:playersinput must be followed by 0 for no 1 for yes");
  3523.         }
  3524.     }
  3525.     else
  3526.     {
  3527.         SendClientMessage(playerid, RED, "You have to be atleast admin level 5 or Rcon admin to use this command");
  3528.     }
  3529.     return 1;
  3530. }
  3531. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  3532. {
  3533.     if((edittype[playerid])== 1)
  3534.     {
  3535.         if (PRESSED(KEY_SECONDARY_ATTACK))
  3536.         {
  3537.             new objectid = objects[editobjnum[playerid]];
  3538.             CallLocalFunction("OnPlayerEditDynamicObject","iiiffffff",playerid,objectid,EDIT_RESPONSE_FINAL,objx[editobjnum[playerid]],objy[editobjnum[playerid]],objz[editobjnum[playerid]],objxrot[editobjnum[playerid]],objyrot[editobjnum[playerid]],objzrot[editobjnum[playerid]]);
  3539.         }
  3540.     }
  3541.     if((edittype[playerid])== 2)
  3542.     {
  3543.         if (PRESSED(KEY_SECONDARY_ATTACK))
  3544.         {
  3545.             new slotid = mapplayerslotid[playerid];
  3546.             new objectid = mapobject[slotid][editobjnum[playerid]];
  3547.             CallLocalFunction("OnPlayerEditDynamicObject","iiiffffff",playerid,objectid,EDIT_RESPONSE_FINAL,playermapx[slotid][editobjnum[playerid]],playermapy[slotid][editobjnum[playerid]],playermapz[slotid][editobjnum[playerid]],playermapxrot[slotid][editobjnum[playerid]],playermapyrot[slotid][editobjnum[playerid]],playermapzrot[slotid][editobjnum[playerid]]);
  3548.         }
  3549.     }
  3550.     return 1;
  3551. }
  3552. public OnPlayerEditDynamicObject(playerid, objectid, response, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz)
  3553. {
  3554.     if((edittype[playerid])==2)
  3555.     {
  3556.         new string[128],savestringname[128],playerfilename[128];
  3557.         new slotid = mapplayerslotid[playerid];
  3558.         format(playerfilename,sizeof(playerfilename),"%s",mapname[slotid]);
  3559.         if((editfirstcheck[playerid])==0)
  3560.         {
  3561.             editfirstcheck[playerid] = 1;
  3562.             oldx[playerid] = x;
  3563.             oldy[playerid] = y;
  3564.             oldz[playerid] = z;
  3565.             oldxrot[playerid] = rx;
  3566.             oldyrot[playerid] = ry;
  3567.             oldzrot[playerid] = rz;
  3568.         }
  3569.         if(response == EDIT_RESPONSE_UPDATE)
  3570.         {
  3571.             format(savestringname,sizeof(savestringname),"mapobjectstring[%i]",editobjnum[playerid]);
  3572.             new mapstring[128];
  3573.             format(mapstring,sizeof(mapstring),"%s",dini_Get(playerfilename,savestringname));
  3574.             format(string,sizeof(string),"object:%s--ID:Objectid-%i-%i-Mid:%i-mapname:%s",mapstring,editobjnum[playerid],slotid,mapobjectmid[slotid][editobjnum[playerid]],mapname[slotid]);
  3575.             playermapx[slotid][editobjnum[playerid]] = x;
  3576.             playermapy[slotid][editobjnum[playerid]] = y;
  3577.             playermapz[slotid][editobjnum[playerid]] = z;
  3578.             playermapxrot[slotid][editobjnum[playerid]] = rx;
  3579.             playermapyrot[slotid][editobjnum[playerid]] = ry;
  3580.             playermapzrot[slotid][editobjnum[playerid]] = rz;
  3581.             MoveDynamicObject(mapobject[slotid][editobjnum[playerid]],playermapx[slotid][editobjnum[playerid]],playermapy[slotid][editobjnum[playerid]],playermapz[slotid][editobjnum[playerid]],100.0,playermapxrot[slotid][editobjnum[playerid]],playermapyrot[slotid][editobjnum[playerid]],playermapzrot[slotid][editobjnum[playerid]]);
  3582.             for(new i;i < MAX_PLAYERS;i++)
  3583.             {
  3584.                 if(IsPlayerConnected(i))
  3585.                 {
  3586.                     if((showlabel[i])==1)
  3587.                     {
  3588.                         DeletePlayer3DTextLabel(i,mapobjectlabel[slotid][editobjnum[playerid]]);
  3589.                         mapobjectlabel[slotid][editobjnum[playerid]] = CreatePlayer3DTextLabel(i,string,COLOR,playermapx[slotid][editobjnum[playerid]],playermapy[slotid][editobjnum[playerid]],playermapz[slotid][editobjnum[playerid]],DISTANCELABEL,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0);
  3590.                     }
  3591.                 }
  3592.             }
  3593.         }
  3594.         if(response == EDIT_RESPONSE_FINAL)
  3595.         {
  3596.             edittype[playerid] = 0;
  3597.             editfirstcheck[playerid] = 0;
  3598.             new Float:xpos,Float:ypos,Float:zpos,Float:xposrot,Float:yposrot,Float:zposrot;
  3599.             GetDynamicObjectPos(mapobject[slotid][editobjnum[playerid]],xpos,ypos,zpos);
  3600.             GetDynamicObjectRot(mapobject[slotid][editobjnum[playerid]],xposrot,yposrot,zposrot);
  3601.             playermapx[slotid][editobjnum[playerid]] = xpos;
  3602.             playermapy[slotid][editobjnum[playerid]] = ypos;
  3603.             playermapz[slotid][editobjnum[playerid]] = zpos;
  3604.             playermapxrot[slotid][editobjnum[playerid]] = xposrot;
  3605.             playermapyrot[slotid][editobjnum[playerid]] = yposrot;
  3606.             playermapzrot[slotid][editobjnum[playerid]] = zposrot;
  3607.             format(savestringname,sizeof(savestringname),"playermapx[%i]",editobjnum[playerid]);
  3608.             dini_FloatSet(playerfilename,savestringname,(playermapx[slotid][editobjnum[playerid]]));
  3609.             format(savestringname,sizeof(savestringname),"playermapy[%i]",editobjnum[playerid]);
  3610.             dini_FloatSet(playerfilename,savestringname,(playermapy[slotid][editobjnum[playerid]]));
  3611.             format(savestringname,sizeof(savestringname),"playermapz[%i]",editobjnum[playerid]);
  3612.             dini_FloatSet(playerfilename,savestringname,(playermapz[slotid][editobjnum[playerid]]));
  3613.             format(savestringname,sizeof(savestringname),"playermapxrot[%i]",editobjnum[playerid]);
  3614.             dini_FloatSet(playerfilename,savestringname,(playermapxrot[slotid][editobjnum[playerid]]));
  3615.             format(savestringname,sizeof(savestringname),"playermapyrot[%i]",editobjnum[playerid]);
  3616.             dini_FloatSet(playerfilename,savestringname,(playermapyrot[slotid][editobjnum[playerid]]));
  3617.             format(savestringname,sizeof(savestringname),"playermapzrot[%i]",editobjnum[playerid]);
  3618.             dini_FloatSet(playerfilename,savestringname,(playermapzrot[slotid][editobjnum[playerid]]));
  3619.             format(savestringname,sizeof(savestringname),"mapobjectstring[%i]",editobjnum[playerid]);
  3620.             new mapstring[128];
  3621.             format(mapstring,sizeof(mapstring),"%s",dini_Get(playerfilename,savestringname));
  3622.             format(string,sizeof(string),"object:%s--ID:Objectid-%i-%i-Mid:%i-mapname:%s",mapstring,editobjnum[playerid],slotid,mapobjectmid[slotid][editobjnum[playerid]],mapname[slotid]);
  3623.             for(new i;i < MAX_PLAYERS;i++)
  3624.             {
  3625.                 if(IsPlayerConnected(i))
  3626.                 {
  3627.                     if((showlabel[i])==1)
  3628.                     {
  3629.                         DeletePlayer3DTextLabel(i,mapobjectlabel[slotid][editobjnum[playerid]]);
  3630.                         mapobjectlabel[slotid][editobjnum[playerid]] = CreatePlayer3DTextLabel(i,string,COLOR,playermapx[slotid][editobjnum[playerid]],playermapy[slotid][editobjnum[playerid]],playermapz[slotid][editobjnum[playerid]],DISTANCELABEL,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0);
  3631.                     }
  3632.                 }
  3633.             }
  3634.             if((allowence[1][playerid])==1)
  3635.             {
  3636.                 if((playersinput)==1)
  3637.                 {
  3638.                     for(new count=0;count < MAX_PLAYERS;count++)
  3639.                     {
  3640.                         if(IsPlayerAdmince(count,3))
  3641.                         {
  3642.                             new name[128];
  3643.                             GetPlayerName(playerid,name,sizeof(name));
  3644.                             format(string,sizeof(string),"%s has moved object id:%i",name,editobjnum[playerid]);
  3645.                             SendClientMessage(count,DARKBLUE,string);
  3646.                             format(string,sizeof(string),"[from] [%f - %f -%f -angle- %f - %f - %f]",oldx[playerid],oldy[playerid],oldz[playerid],oldxrot[playerid],oldyrot[playerid],oldzrot[playerid]);
  3647.                             SendClientMessage(count,DARKBLUE,string);
  3648.                             format(string,128,"[To] [%f - %f -%f -angle- %f - %f - %f]",playermapx[slotid][editobjnum[playerid]],playermapy[slotid][editobjnum[playerid]],playermapz[slotid][editobjnum[playerid]],playermapxrot[slotid][editobjnum[playerid]],playermapyrot[slotid][editobjnum[playerid]],playermapzrot[slotid][editobjnum[playerid]]);
  3649.                             SendClientMessage(count,DARKBLUE,string);
  3650.                         }
  3651.                     }
  3652.                 }
  3653.             }
  3654.             SendClientMessage(playerid, LIGHTBLUE, "You have move and object");
  3655.             CancelEdit(playerid);
  3656.         }
  3657.         if(response == EDIT_RESPONSE_CANCEL)
  3658.         {
  3659.             edittype[playerid] = 0;
  3660.             editfirstcheck[playerid] = 0;
  3661.             MoveDynamicObject(mapobject[slotid][editobjnum[playerid]],oldx[playerid],oldy[playerid],oldz[playerid],100.0,oldxrot[playerid],oldyrot[playerid],oldzrot[playerid]);
  3662.             playermapx[slotid][editobjnum[playerid]] = oldx[playerid];
  3663.             playermapy[slotid][editobjnum[playerid]] = oldy[playerid];
  3664.             playermapz[slotid][editobjnum[playerid]] = oldz[playerid];
  3665.             playermapxrot[slotid][editobjnum[playerid]] = oldxrot[playerid];
  3666.             playermapyrot[slotid][editobjnum[playerid]] = oldyrot[playerid];
  3667.             playermapzrot[slotid][editobjnum[playerid]] = oldzrot[playerid];
  3668.             format(savestringname,sizeof(savestringname),"playermapx[%i]",editobjnum[playerid]);
  3669.             dini_FloatSet(playerfilename,savestringname,(playermapx[slotid][editobjnum[playerid]]));
  3670.             format(savestringname,sizeof(savestringname),"playermapy[%i]",editobjnum[playerid]);
  3671.             dini_FloatSet(playerfilename,savestringname,(playermapy[slotid][editobjnum[playerid]]));
  3672.             format(savestringname,sizeof(savestringname),"playermapz[%i]",editobjnum[playerid]);
  3673.             dini_FloatSet(playerfilename,savestringname,(playermapz[slotid][editobjnum[playerid]]));
  3674.             format(savestringname,sizeof(savestringname),"playermapxrot[%i]",editobjnum[playerid]);
  3675.             dini_FloatSet(playerfilename,savestringname,(playermapxrot[slotid][editobjnum[playerid]]));
  3676.             format(savestringname,sizeof(savestringname),"playermapyrot[%i]",editobjnum[playerid]);
  3677.             dini_FloatSet(playerfilename,savestringname,(playermapyrot[slotid][editobjnum[playerid]]));
  3678.             format(savestringname,sizeof(savestringname),"playermapzrot[%i]",editobjnum[playerid]);
  3679.             dini_FloatSet(playerfilename,savestringname,(playermapzrot[slotid][editobjnum[playerid]]));
  3680.             format(savestringname,sizeof(savestringname),"mapobjectstring[%i]",editobjnum[playerid]);
  3681.             new mapstring[128];
  3682.             format(mapstring,sizeof(mapstring),"%s",dini_Get(playerfilename,savestringname));
  3683.             SendClientMessage(playerid, LIGHTBLUE, "You have canceled moveing an object");
  3684.             format(string,sizeof(string),"object:%s--ID:Objectid-%i-%i-Mid:%i-mapname:%s",mapstring,editobjnum[playerid],slotid,mapobjectmid[editobjnum[playerid]],mapname[slotid]);
  3685.             for(new i;i < MAX_PLAYERS;i++)
  3686.             {
  3687.                 if(IsPlayerConnected(i))
  3688.                 {
  3689.                     if((showlabel[i])==1)
  3690.                     {
  3691.                         DeletePlayer3DTextLabel(i,mapobjectlabel[slotid][editobjnum[playerid]]);
  3692.                         mapobjectlabel[slotid][editobjnum[playerid]] = CreatePlayer3DTextLabel(i,string,COLOR,playermapx[slotid][editobjnum[playerid]],playermapy[slotid][editobjnum[playerid]],playermapz[slotid][editobjnum[playerid]],DISTANCELABEL,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0);
  3693.                     }
  3694.                 }
  3695.             }
  3696.             if((allowence[1][playerid])==1)
  3697.             {
  3698.                 if((playersinput)==1)
  3699.                 {
  3700.                     for(new count=0;count < MAX_PLAYERS;count++)
  3701.                     {
  3702.                         if(IsPlayerAdmince(count,3))
  3703.                         {
  3704.                             new name[128];
  3705.                             GetPlayerName(playerid,name,sizeof(name));
  3706.                             format(string,sizeof(string),"%s has canceled moveing object id:%i",name,editobjnum[playerid]);
  3707.                             SendClientMessage(count,DARKBLUE,string);
  3708.                             format(string,sizeof(string),"[from] [%f - %f -%f -angle- %f - %f - %f]",oldx[playerid],oldy[playerid],oldz[playerid],oldxrot[playerid],oldyrot[playerid],oldzrot[playerid]);
  3709.                             SendClientMessage(count,DARKBLUE,string);
  3710.                         }
  3711.                     }
  3712.                 }
  3713.             }
  3714.         }
  3715.     }
  3716.     else if((edittype[playerid])==1)
  3717.     {
  3718.         if((editfirstcheck[playerid])==0)
  3719.         {
  3720.             editfirstcheck[playerid] = 1;
  3721.             oldx[playerid] = x;
  3722.             oldy[playerid] = y;
  3723.             oldz[playerid] = z;
  3724.             oldxrot[playerid] = rx;
  3725.             oldyrot[playerid] = ry;
  3726.             oldzrot[playerid] = rz;
  3727.             if((allowence[1][playerid])==1)
  3728.             {
  3729.                 if((playersinput)==1)
  3730.                 {
  3731.                     for(new count=0;count < MAX_PLAYERS;count++)
  3732.                     {
  3733.                         if(IsPlayerAdmince(count,3))
  3734.                         {
  3735.                             new name[128],string[128];
  3736.                             GetPlayerName(playerid,name,sizeof(name));
  3737.                             format(string,sizeof(string),"%s has started moveing object id:%i",name,editobjnum[playerid]);
  3738.                             SendClientMessage(count,DARKBLUE,string);
  3739.                         }
  3740.                     }
  3741.                 }
  3742.             }
  3743.         }
  3744.         if(response == EDIT_RESPONSE_UPDATE)
  3745.         {
  3746.             new string[128];
  3747.             format(string,128,"object:%s--ID:%i-Objectid-%i",objectstring[editobjnum[playerid]],editobjnum[playerid],jbobjectid[editobjnum[playerid]]);
  3748.             objx[editobjnum[playerid]] =x;
  3749.             objy[editobjnum[playerid]] =y;
  3750.             objz[editobjnum[playerid]] =z;
  3751.             objxrot[editobjnum[playerid]] = rx;
  3752.             objyrot[editobjnum[playerid]] = ry;
  3753.             objzrot[editobjnum[playerid]] = rz;
  3754.             for(new i=0;i < MAX_PLAYERS;i++)
  3755.             {
  3756.                 if(IsPlayerConnected(i))
  3757.                 {
  3758.                     if((showlabel[i])==1)
  3759.                     {
  3760.                         DeletePlayer3DTextLabel(i,objectlabel[editobjnum[playerid]]);
  3761.                         objectlabel[editobjnum[playerid]] = CreatePlayer3DTextLabel(i,string,COLOR,objx[editobjnum[playerid]],objy[editobjnum[playerid]],objz[editobjnum[playerid]],DISTANCELABEL,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0);
  3762.                     }
  3763.                 }
  3764.             }
  3765.             MoveDynamicObject(objects[editobjnum[playerid]],objx[editobjnum[playerid]],objy[editobjnum[playerid]],objz[editobjnum[playerid]],10,objxrot[editobjnum[playerid]],objyrot[editobjnum[playerid]],objzrot[editobjnum[playerid]]);
  3766.         }
  3767.         if(response == EDIT_RESPONSE_FINAL)
  3768.         {
  3769.             new savestringname[128];
  3770.             new Float:xpos,Float:ypos,Float:zpos,Float:xposrot,Float:yposrot,Float:zposrot;
  3771.             GetDynamicObjectPos(objects[editobjnum[playerid]],xpos,ypos,zpos);
  3772.             GetDynamicObjectRot(objects[editobjnum[playerid]],xposrot,yposrot,zposrot);
  3773.             objx[editobjnum[playerid]] = xpos;
  3774.             objy[editobjnum[playerid]] = ypos;
  3775.             objz[editobjnum[playerid]] = zpos;
  3776.             objxrot[editobjnum[playerid]] = xposrot;
  3777.             objyrot[editobjnum[playerid]] = yposrot;
  3778.             objzrot[editobjnum[playerid]] = zposrot;
  3779.             SendClientMessage(playerid, LIGHTBLUE, "You have moved this object");
  3780.             format(savestringname,sizeof(savestringname),"objx[%i]",editobjnum[playerid]);
  3781.             dini_FloatSet(objectsfilename,savestringname,(objx[editobjnum[playerid]]));
  3782.             format(savestringname,sizeof(savestringname),"objy[%i]",editobjnum[playerid]);
  3783.             dini_FloatSet(objectsfilename,savestringname,(objy[editobjnum[playerid]]));
  3784.             format(savestringname,sizeof(savestringname),"objz[%i]",editobjnum[playerid]);
  3785.             dini_FloatSet(objectsfilename,savestringname,(objz[editobjnum[playerid]]));
  3786.             format(savestringname,sizeof(savestringname),"objxrot[%i]",editobjnum[playerid]);
  3787.             dini_FloatSet(objectsfilename,savestringname,(objxrot[editobjnum[playerid]]));
  3788.             format(savestringname,sizeof(savestringname),"objyrot[%i]",editobjnum[playerid]);
  3789.             dini_FloatSet(objectsfilename,savestringname,(objyrot[editobjnum[playerid]]));
  3790.             format(savestringname,sizeof(savestringname),"objzrot[%i]",editobjnum[playerid]);
  3791.             dini_FloatSet(objectsfilename,savestringname,(objzrot[editobjnum[playerid]]));
  3792.             editfirstcheck[playerid] = 0;
  3793.             edittype[playerid] = 0;
  3794.             if((allowence[1][playerid])==1)
  3795.             {
  3796.                 if((playersinput)==1)
  3797.                 {
  3798.                     for(new count=0;count < MAX_PLAYERS;count++)
  3799.                     {
  3800.                         if(IsPlayerAdmince(count,3))
  3801.                         {
  3802.                             new name[128],string[128];
  3803.                             GetPlayerName(playerid,name,sizeof(name));
  3804.                             format(string,sizeof(string),"%s has moved object id:%i",name,editobjnum[playerid]);
  3805.                             SendClientMessage(count,DARKBLUE,string);
  3806.                             format(string,sizeof(string),"[from] [%f - %f -%f -angle- %f - %f - %f]",oldx[playerid],oldy[playerid],oldz[playerid],oldxrot[playerid],oldyrot[playerid],oldzrot[playerid]);
  3807.                             SendClientMessage(count,DARKBLUE,string);
  3808.                             format(string,128,"[To] [%f - %f -%f -angle- %f - %f - %f]",objx[editobjnum[playerid]],objy[editobjnum[playerid]],objz[editobjnum[playerid]],objxrot[editobjnum[playerid]],objyrot[editobjnum[playerid]],objzrot[editobjnum[playerid]]);
  3809.                             SendClientMessage(count,DARKBLUE,string);
  3810.                         }
  3811.                     }
  3812.                 }
  3813.             }
  3814.             CancelEdit(playerid);
  3815.         }
  3816.         if(response == EDIT_RESPONSE_CANCEL)
  3817.         {
  3818.             new string[128], savestringname[128];
  3819.             format(savestringname,sizeof(savestringname),"objectlabel[%i]",editobjnum[playerid]);
  3820.             editfirstcheck[playerid] = 0;
  3821.             MoveDynamicObject(objectid,oldx[playerid],oldy[playerid],oldz[playerid],10,oldxrot[playerid],oldyrot[playerid],oldzrot[playerid]);
  3822.             editobjnum[playerid] = -1;
  3823.             objx[editobjnum[playerid]] = oldx[playerid];
  3824.             objy[editobjnum[playerid]] = oldy[playerid];
  3825.             objz[editobjnum[playerid]] = oldz[playerid];
  3826.             objxrot[editobjnum[playerid]] = oldxrot[playerid];
  3827.             objyrot[editobjnum[playerid]] = oldyrot[playerid];
  3828.             objzrot[editobjnum[playerid]] = oldzrot[playerid];
  3829.             format(savestringname,sizeof(savestringname),"objx[%i]",editobjnum[playerid]);
  3830.             dini_FloatSet(objectsfilename,savestringname,(oldx[playerid]));
  3831.             format(savestringname,sizeof(savestringname),"objy[%i]",editobjnum[playerid]);
  3832.             dini_FloatSet(objectsfilename,savestringname,(oldy[playerid]));
  3833.             format(savestringname,sizeof(savestringname),"objz[%i]",editobjnum[playerid]);
  3834.             dini_FloatSet(objectsfilename,savestringname,(oldz[playerid]));
  3835.             format(savestringname,sizeof(savestringname),"objxrot[%i]",editobjnum[playerid]);
  3836.             dini_FloatSet(objectsfilename,savestringname,(oldxrot[playerid]));
  3837.             format(savestringname,sizeof(savestringname),"objyrot[%i]",editobjnum[playerid]);
  3838.             dini_FloatSet(objectsfilename,savestringname,(oldyrot[playerid]));
  3839.             format(savestringname,sizeof(savestringname),"objzrot[%i]",editobjnum[playerid]);
  3840.             dini_FloatSet(objectsfilename,savestringname,(oldzrot[playerid]));
  3841.             edittype[playerid] = 0;
  3842.             format(string,128,"object:%s--ID:%i-Objectid-%i",objectstring[editobjnum[playerid]],editobjnum[playerid],jbobjectid[editobjnum[playerid]]);
  3843.             for(new i=0;i < MAX_PLAYERS;i++)
  3844.             {
  3845.                 if(IsPlayerConnected(i))
  3846.                 {
  3847.                     if((showlabel[i])==1)
  3848.                     {
  3849.                         DeletePlayer3DTextLabel(i,objectlabel[editobjnum[playerid]]);
  3850.                         objectlabel[editobjnum[playerid]] = CreatePlayer3DTextLabel(i,string,COLOR,objx[editobjnum[playerid]],objy[editobjnum[playerid]],objz[editobjnum[playerid]],DISTANCELABEL,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0);
  3851.                     }
  3852.                 }
  3853.             }
  3854.             if((allowence[1][playerid])==1)
  3855.             {
  3856.                 if((playersinput)==1)
  3857.                 {
  3858.                     for(new count=0;count < MAX_PLAYERS;count++)
  3859.                     {
  3860.                         if(IsPlayerAdmince(count,3))
  3861.                         {
  3862.                             new name[128];
  3863.                             GetPlayerName(playerid,name,sizeof(name));
  3864.                             format(string,sizeof(string),"%s has canceled moveing object id:%i",name,editobjnum[playerid]);
  3865.                             SendClientMessage(count,DARKBLUE,string);
  3866.                             format(string,sizeof(string),"[from] [%f - %f -%f -angle- %f - %f - %f]",oldx[playerid],oldy[playerid],oldz[playerid],oldxrot[playerid],oldyrot[playerid],oldzrot[playerid]);
  3867.                             SendClientMessage(count,DARKBLUE,string);
  3868.                         }
  3869.                     }
  3870.                 }
  3871.             }
  3872.         }
  3873.     }
  3874.     return 1;
  3875. }
  3876. public IsPlayerLoggingIntoAdmin()
  3877. {
  3878.     for(new i = 0; i < MAX_PLAYERS; i++)
  3879.     {
  3880.         if(IsPlayerConnected(i))
  3881.         {
  3882.             if(IsPlayerAdmince(i,3))
  3883.             {
  3884.                 for(new count; count < MAX_OPERATIONS;count++)
  3885.                 {
  3886.                     if((allowence[count][i])==1)
  3887.                     {
  3888.                         allowence[count][i] = 0;
  3889.                         new string[256],taskname[128];
  3890.                         if((count)==0)
  3891.                         {
  3892.                             taskname = "addobjects";
  3893.                         }
  3894.                         if((count)==1)
  3895.                         {
  3896.                             taskname = "moveobjects";
  3897.                         }
  3898.                         if((count)==2)
  3899.                         {
  3900.                             taskname = "deleteobjects";
  3901.                         }
  3902.                         format(string,256,"you logged into admin over 3 or RCON and you have an allowence for %s, it has been remove since you are permently allowed to use it",taskname);
  3903.                         SendClientMessage(i,PINK,string);
  3904.                     }
  3905.                 }
  3906.             }
  3907.         }
  3908.     }
  3909.     return 1;
  3910. }
  3911. public OnFilterScriptInit()
  3912. {
  3913.     format(objectsfilename,sizeof(objectsfilename),"JBobjects/jbobjects.ini");
  3914.     if(!dini_Exists(objectsfilename))
  3915.     {
  3916.         dini_Create(objectsfilename);
  3917.         dini_IntSet(objectsfilename,"labeldistance",floatround(DISTANCELABEL));
  3918.         print("Objects Save File has been created");
  3919.     }
  3920.     DISTANCELABEL = dini_Int(objectsfilename,"labeldistance");
  3921.     if((DISTANCELABEL) < 5)
  3922.     {
  3923.         DISTANCELABEL = 5;
  3924.     }
  3925.     SetTimer("IsPlayerLoggingIntoAdmin",1000,true);
  3926.     print("------------------JB-------------------");
  3927.     print("-------------Samp-objects--------------");
  3928.     print("----------------Loaded-----------------");
  3929.     print("-----------------V1.6------------------");
  3930.     new savestringname[128];
  3931.     for(new count =0;count <= MAX_OBJECTS;count++)
  3932.     {
  3933.         format(savestringname,sizeof(savestringname),"objectstate[%i]",count);
  3934.         objectstate[count] = dini_Int(objectsfilename,savestringname);
  3935.         if((objectstate[count])==1)
  3936.         {
  3937.             format(savestringname,sizeof(savestringname),"object[%i]",count);
  3938.             jbobjectid[count] = dini_Int(objectsfilename,savestringname);
  3939.             format(savestringname,sizeof(savestringname),"objx[%i]",count);
  3940.             objx[count] = dini_Int(objectsfilename,savestringname);
  3941.             format(savestringname,sizeof(savestringname),"objy[%i]",count);
  3942.             objy[count] = dini_Int(objectsfilename,savestringname);
  3943.             format(savestringname,sizeof(savestringname),"objz[%i]",count);
  3944.             objz[count] = dini_Int(objectsfilename,savestringname);
  3945.             format(savestringname,sizeof(savestringname),"objxrot[%i]",count);
  3946.             objxrot[count] = dini_Int(objectsfilename,savestringname);
  3947.             format(savestringname,sizeof(savestringname),"objyrot[%i]",count);
  3948.             objyrot[count] = dini_Int(objectsfilename,savestringname);
  3949.             format(savestringname,sizeof(savestringname),"objzrot[%i]",count);
  3950.             objzrot[count] = dini_Int(objectsfilename,savestringname);
  3951.             format(savestringname,sizeof(savestringname),"objectlabel[%i]",count);
  3952.             objectstring[count] = dini_Get(objectsfilename,savestringname);
  3953.             format(savestringname,sizeof(savestringname),"objectcolor[%i]",count);
  3954.             objectcolor[count] = dini_Int(objectsfilename,savestringname);
  3955.             format(savestringname,sizeof(savestringname),"object[%i]",count);
  3956.             jbobjectid[count] = dini_Int(objectsfilename,savestringname);
  3957.             objects[count] = CreateDynamicObject(jbobjectid[count],objx[count],objy[count],objz[count],objxrot[count],objyrot[count],objzrot[count],0);
  3958.             if((objectcolor[count])==0)
  3959.             {
  3960.                 SetDynamicObjectMaterial(objects[count],0,-1,"none","none",0);
  3961.             }
  3962.             else
  3963.             {
  3964.                 SetDynamicObjectMaterial(objects[count],0 ,2707, "Shopping", "white",objectcolor[count]);
  3965.             }
  3966.             for(new i = 0;i < MAX_PLAYERS;i++)
  3967.             {
  3968.                 if(IsPlayerConnected(i))
  3969.                 {
  3970.                     new name[128];
  3971.                     GetPlayerName(i,name,sizeof(name));
  3972.                     format(savestringname,sizeof(savestringname),"showlabel[%s]",name);
  3973.                     showlabel[i] = dini_Int(objectsfilename,savestringname);
  3974.                     if((showlabel[i])==1)
  3975.                     {
  3976.                         new string[128];
  3977.                         format(string,128,"object:%s--ID:%i-Objectid-%i",objectstring[count],count,jbobjectid[count]);
  3978.                         objectlabel[count] = CreatePlayer3DTextLabel(i,string,COLOR,objx[count],objy[count],objz[count],DISTANCELABEL,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0);
  3979.                     }
  3980.                 }
  3981.             }
  3982.         }
  3983.     }
  3984.     return 1;
  3985. }
  3986. public OnPlayerConnect(playerid)
  3987. {
  3988.     new string[128],name[128];
  3989.     new savestringname[128];
  3990.     GetPlayerName(playerid,name,sizeof(name));
  3991.     format(savestringname,sizeof(savestringname),"showlabel[%s]",name);
  3992.     showlabel[playerid] = dini_Int(objectsfilename,savestringname);
  3993.     if((showlabel[playerid])==1)
  3994.     {
  3995.         for(new count=0;count <= MAX_OBJECTS;count++)
  3996.         {
  3997.             if((objectstate[count])==1)
  3998.             {
  3999.                 format(string,128,"object:%s--ID:%i-Objectid-%i",objectstring[count],count,jbobjectid[count]);
  4000.                 objectlabel[count] = CreatePlayer3DTextLabel(playerid,string,COLOR,objx[count],objy[count],objz[count],DISTANCELABEL,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0);
  4001.             }
  4002.         }
  4003.     }
  4004.     for(new count=0;count < MAX_OPERATIONS;count ++)
  4005.     {
  4006.         if((allowencejoin[count])==1)
  4007.         {
  4008.             if(IsPlayerAdmince(count,3))
  4009.             {
  4010.  
  4011.             }
  4012.             else
  4013.             {
  4014.                 new command[128];
  4015.                 if((count)==0)
  4016.                 {
  4017.                     format(command,128,"addobjects");
  4018.                 }
  4019.                 if((count)==1)
  4020.                 {
  4021.                     format(command,128,"moveobjects");
  4022.                 }
  4023.                 if((count) == 2)
  4024.                 {
  4025.                     format(command,128,"deleteobjects");
  4026.                 }
  4027.                 if((count)==3)
  4028.                 {
  4029.                     format(command,128,"editmap");
  4030.                 }
  4031.                 GetPlayerName(playerid,name,sizeof(name));
  4032.                 allowence[count][playerid]=1;
  4033.                 format(string,128, "%s has joined and has been give autorization for the %s command",name,command);
  4034.                 SendClientMessageToAll(GREY,string);
  4035.             }
  4036.         }
  4037.     }
  4038.     return 1;
  4039. }
  4040. public OnPlayerDisconnect(playerid, reason)
  4041. {
  4042.     for(new count;count < MAX_OPERATIONS;count++)
  4043.     {
  4044.         if((allowence[count][playerid])==1)
  4045.         {
  4046.             allowence[count][playerid] = 0;
  4047.         }
  4048.     }
  4049.     new slotid = mapplayerslotid[playerid];
  4050.     if((mapplayerslot[slotid])==1)
  4051.     {
  4052.         CloseMap(playerid);
  4053.     }
  4054.     return 1;
  4055. }
  4056. public OnFilterScriptExit()
  4057. {
  4058.     for(new count=0;count <= MAX_OBJECTS;count++)
  4059.     {
  4060.         if((objectstate[count])==1)
  4061.         {
  4062.             DestroyDynamicObject(objects[count]);
  4063.             for(new i;i < MAX_PLAYERS;i++)
  4064.             {
  4065.                 if(IsPlayerConnected(i))
  4066.                 {
  4067.                     DeletePlayer3DTextLabel(i,objectlabel[count]);
  4068.                 }
  4069.             }
  4070.         }
  4071.     }
  4072.     for(new i;i < MAX_PLAYERS;i++)
  4073.     {
  4074.         if(IsPlayerConnected(i))
  4075.         {
  4076.             if((mapplayerslotid[i])==1)
  4077.             {
  4078.                 CloseMap(i);
  4079.             }
  4080.         }
  4081.     }
  4082.     for(new count;count < 12;count++)
  4083.     {
  4084.         if((viewslot[count])==1)
  4085.         {
  4086.             viewslot[count] = 0;
  4087.             format(viewstring[count],sizeof(viewstring),"");
  4088.             for(new count2;count2 < MAX_OBJECTS;count2++)
  4089.             {
  4090.                 if(IsValidDynamicObject(viewobject[count][count2]))
  4091.                 {
  4092.                     DestroyDynamicObject(viewobject[count][count2]);
  4093.                 }
  4094.             }
  4095.         }
  4096.     }
  4097.     print("------------------JB-------------------");
  4098.     print("-------------Samp-objects--------------");
  4099.     print("----------------UnLoaded---------------");
  4100.     print("-----------------V1.6----------------");
  4101.     return 1;
  4102. }
  4103.  
  4104. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  4105. {
  4106.     new string[256],savestringname[256];
  4107.     if(dialogid == CLOSEMAP)
  4108.     {
  4109.         if(response)
  4110.         {
  4111.             if((mapplayereditstate[playerid])==1)
  4112.             {
  4113.                 ShowPlayerDialog(playerid,CLOSEMAPEDIT,DIALOG_STYLE_MSGBOX,"Confirmation","Are you sure you want to close the map","Yes","No");
  4114.             }
  4115.             else
  4116.             {
  4117.                 SendClientMessage(playerid,RED, "You can't close a map if you don't even have one open");
  4118.             }
  4119.         }
  4120.         else
  4121.         {
  4122.             if(IsPlayerAdmince(playerid, 3))
  4123.             {
  4124.                 string = "";
  4125.                 for(new count;count < 12;count++)
  4126.                 {
  4127.                     if((viewslot[count])==1)
  4128.                     {
  4129.                         new addstr[128];
  4130.                         new storestring[128];
  4131.                         format(storestring,sizeof(storestring),"%s",string);
  4132.                         format(addstr,sizeof(addstr),"%s",viewstring[count]);
  4133.                         if(isnull(string))
  4134.                         {
  4135.                             format(string,sizeof(string),"%s",addstr);
  4136.                         }
  4137.                         else
  4138.                         {
  4139.                             format(string,sizeof(string),"%s\n%s",storestring,addstr);
  4140.                         }
  4141.                     }
  4142.                     else
  4143.                     {
  4144.                         new addstr[128];
  4145.                         new storestring[128];
  4146.                         format(storestring,sizeof(storestring),"%s",string);
  4147.                         format(addstr,sizeof(addstr),"emptyslot\n");
  4148.                         if(isnull(string))
  4149.                         {
  4150.                             format(string,sizeof(string),"%s",addstr);
  4151.                         }
  4152.                         else
  4153.                         {
  4154.                             format(string,sizeof(string),"%s\n%s",storestring,addstr);
  4155.                         }
  4156.                     }
  4157.                 }
  4158.                 ShowPlayerDialog(playerid,CLOSEMAPVIEW,DIALOG_STYLE_LIST,"Select map to close",string,"Ok","Close");//view
  4159.             }
  4160.             else
  4161.             {
  4162.                 SendClientMessage(playerid, RED, "You have to be admin inorder to use this function");
  4163.             }
  4164.         }
  4165.     }
  4166.     else if(dialogid == CLOSEMAPVIEW)
  4167.     {
  4168.         if(response)
  4169.         {
  4170.             if((viewslot[viewselected[playerid]])==1)
  4171.             {
  4172.                 viewslot[listitem] = 0;
  4173.                 format(viewstring[listitem],sizeof(viewstring),"");
  4174.                 for(new count;count < MAX_OBJECTS;count++)
  4175.                 {
  4176.                     if(IsValidDynamicObject(viewobject[viewselected[playerid]][count]))
  4177.                     {
  4178.                         DestroyDynamicObject(viewobject[viewselected[playerid]][count]);
  4179.                     }
  4180.                 }
  4181.             }
  4182.             else
  4183.             {
  4184.                 SendClientMessage(playerid, RED, "This slot is unoccupide you can't close it");
  4185.             }
  4186.         }
  4187.         else
  4188.         {
  4189.             SendClientMessage(playerid, RED, "You have canceled closeing a map");
  4190.         }
  4191.     }
  4192.     else if(dialogid == CLOSEMAPEDIT)
  4193.     {
  4194.         if(response)
  4195.         {
  4196.             viewselected[playerid] =0;
  4197.             SendClientMessage(playerid, LIGHTBLUE, "You have closed a map");
  4198.             CloseMap(playerid);
  4199.         }
  4200.         else
  4201.         {
  4202.             SendClientMessage(playerid,RED,"You have canceled closeing a map");
  4203.         }
  4204.     }
  4205.     else if(dialogid == MAPDOSENOTEXITS)
  4206.     {
  4207.         if(response)
  4208.         {
  4209.             ShowPlayerDialog(playerid,OPENMAP,DIALOG_STYLE_MSGBOX,"Select","you can ether edit a map or open it just for viewing purposes","Edit","View");
  4210.         }
  4211.         else
  4212.         {
  4213.             SendClientMessage(playerid, RED, "You have canceled opening this map");
  4214.         }
  4215.     }
  4216.     else if(dialogid == OPENMAPINPUTEDIT)
  4217.     {
  4218.         if(response)
  4219.         {
  4220.             new mname[128];
  4221.             format(mname,sizeof(mname),"JBobjects/%s.map",inputtext);
  4222.             if(dini_Exists(mname))
  4223.             {
  4224.                 for(new count;count < MAX;count++)
  4225.                 {
  4226.                     if(!isnull(mapname[count]))
  4227.                     {
  4228.                         if(strcmp(mapname[count],mname,true,64)==0)
  4229.                         {
  4230.                             format(string,sizeof(string),"%s is currently edit this map you can not edit a map that some one else is already editing",mapplayereditingname[count]);
  4231.                             SendClientMessage(playerid,RED,string);
  4232.                             return 1;
  4233.                         }
  4234.                     }
  4235.                 }
  4236.                 for(new count;count < MAX;count++)
  4237.                 {
  4238.                     if((mapplayerslot[count])==0)
  4239.                     {
  4240.                         format(mapname[count],sizeof(mapname),"%s",dini_Get(mname,"mapname"));
  4241.                         format(mapplayereditingname[count],sizeof(mapplayereditingname),"%s",dini_Get(mapname[count],"mapplayereditingname"));
  4242.                         new name[128];
  4243.                         GetPlayerName(playerid,name,sizeof(name));
  4244.                         if(!IsPlayerAdmince(playerid,4))
  4245.                         {
  4246.                             if(strcmp(name,mapplayereditingname[count],true,128)!=0)
  4247.                             {
  4248.                                 return SendClientMessage(playerid,RED,"you have to be admin level4 or the creater of this map inorder to edit it");
  4249.                             }
  4250.                         }
  4251.                         mapplayereditstate[playerid] = 1;
  4252.                         mapplayerslot[count] = 1;
  4253.                         mapplayerslotid[playerid] = count;
  4254.                         for(new count2;count2 < MAX_OBJECTS;count2++)
  4255.                         {
  4256.                             format(savestringname,sizeof(savestringname),"mapobjectstate[%i]",count2);
  4257.                             mapobjectstate[count][count2] = dini_Int(mapname[count],savestringname);
  4258.                             if((mapobjectstate[count][count2])==1)
  4259.                             {
  4260.                                 format(savestringname,sizeof(savestringname),"playermapx[%i]",count2);
  4261.                                 playermapx[count][count2] = dini_Int(mapname[count],savestringname);
  4262.                                 format(savestringname,sizeof(savestringname),"playermapy[%i]",count2);
  4263.                                 playermapy[count][count2] = dini_Int(mapname[count],savestringname);
  4264.                                 format(savestringname,sizeof(savestringname),"playermapz[%i]",count2);
  4265.                                 playermapz[count][count2] = dini_Int(mapname[count],savestringname);
  4266.                                 format(savestringname,sizeof(savestringname),"playermapxrot[%i]",count2);
  4267.                                 playermapxrot[count][count2] = dini_Int(mapname[count],savestringname);
  4268.                                 format(savestringname,sizeof(savestringname),"playermapyrot[%i]",count2);
  4269.                                 playermapyrot[count][count2] = dini_Int(mapname[count],savestringname);
  4270.                                 format(savestringname,sizeof(savestringname),"playermapzrot[%i]",count2);
  4271.                                 playermapzrot[count][count2] = dini_Int(mapname[count],savestringname);
  4272.                                 format(savestringname,sizeof(savestringname),"mapobjectstring[%i]",count2);
  4273.                                 new mapstring[128];
  4274.                                 format(mapstring,sizeof(mapstring),"%s",dini_Get(mapname[count],savestringname));
  4275.                                 format(savestringname,sizeof(savestringname),"mapobjectmid[%i]",count2);
  4276.                                 mapobjectmid[count][count2] = dini_Int(mapname[count],savestringname);
  4277.                                 format(string,sizeof(string),"object:%s--ID:Objectid-%i-%i-Mid:%i-mapname:%s",mapstring,count2,count,mapobjectmid[count][count2],mapname[count]);
  4278.                                 mapobject[count][count2] = CreateDynamicObject(mapobjectmid[count][count2],playermapx[count][count2],playermapy[count][count2],playermapz[count][count2],playermapxrot[count][count2],playermapyrot[count][count2],playermapzrot[count][count2]);
  4279.                                 printf("loading object:%i objectmid-%i-x-%f-y-%f-z-%f-xr-%f-yr-%f-zr-%f-objstring-%s-state-%i",count2,mapobjectmid[count][count2],playermapx[count][count2],playermapy[count][count2],playermapz[count][count2],playermapxrot[count][count2],playermapyrot[count][count2],playermapzrot[count][count2],mapstring,mapobjectstate[count][count2]);
  4280.                                 for(new i;i < MAX_PLAYERS;i++)
  4281.                                 {
  4282.                                     if((showlabel[i])==1)
  4283.                                     {
  4284.                                         mapobjectlabel[count][count2] = CreatePlayer3DTextLabel(i,string,COLOR,playermapx[count][count2],playermapy[count][count2],playermapz[count][count2],DISTANCELABEL,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0);
  4285.                                     }
  4286.                                 }
  4287.                             }
  4288.                         }
  4289.                         SendClientMessage(playerid, LIGHTBLUE,"You have opened a map");
  4290.                         return 1;
  4291.                     }
  4292.                 }
  4293.                 return SendClientMessage(playerid, RED," There are no avaliable slots");
  4294.             }
  4295.             else
  4296.             {
  4297.                 ShowPlayerDialog(playerid,MAPDOSENOTEXITS,DIALOG_STYLE_MSGBOX,"ERROR","The name you entered does not exist","Back","Close");
  4298.             }
  4299.         }
  4300.         else
  4301.         {
  4302.             SendClientMessage(playerid, RED, "You canceled editing a map");
  4303.         }
  4304.     }
  4305.     else if(dialogid == OPENMAPINPUTVIEW)
  4306.     {
  4307.         if(response)
  4308.         {
  4309.             new mname[128];
  4310.             format(mname,sizeof(mname),"JBobjects/%s.map",inputtext);
  4311.             if(dini_Exists(mname))
  4312.             {
  4313.                 for(new count;count < 12;count++)
  4314.                 {
  4315.                     if(!isnull(viewstring[count]))
  4316.                     {
  4317.                         if(strcmp(mname,viewstring[count],true,128)==0)
  4318.                         {
  4319.                             SendClientMessage(playerid, RED, "this map is already open");
  4320.                             return 1;
  4321.                         }
  4322.                     }
  4323.                 }
  4324.                 format(viewstring[viewselected[playerid]],sizeof(viewstring),"%s",mname);
  4325.                 viewslot[viewselected[playerid]] = 1;
  4326.                 new playerfilename[128];
  4327.                 format(playerfilename,sizeof(playerfilename),"%s",viewstring[viewselected[playerid]]);
  4328.                 new maxobj = dini_Int(playerfilename,"mapobjectscount");
  4329.                 for(new count;count < maxobj;count++)
  4330.                 {
  4331.                     format(savestringname,sizeof(savestringname),"mapobjectstate[%i]",count);
  4332.                     new objstate = dini_Int(playerfilename,savestringname);
  4333.                     if((objstate)==1)
  4334.                     {
  4335.                         new Float:x,Float:y,Float:z,Float:xrot,Float:yrot,Float:zrot;
  4336.                         new objectmid;
  4337.                         format(savestringname,sizeof(savestringname),"playermapx[%i]",count);
  4338.                         x = dini_Int(playerfilename,savestringname);
  4339.                         format(savestringname,sizeof(savestringname),"playermapy[%i]",count);
  4340.                         y = dini_Int(playerfilename,savestringname);
  4341.                         format(savestringname,sizeof(savestringname),"playermapz[%i]",count);
  4342.                         z = dini_Int(playerfilename,savestringname);
  4343.                         format(savestringname,sizeof(savestringname),"playermapxrot[%i]",count);
  4344.                         xrot = dini_Int(playerfilename,savestringname);
  4345.                         format(savestringname,sizeof(savestringname),"playermapyrot[%i]",count);
  4346.                         yrot = dini_Int(playerfilename,savestringname);
  4347.                         format(savestringname,sizeof(savestringname),"playermapzrot[%i]",count);
  4348.                         zrot = dini_Int(playerfilename,savestringname);
  4349.                         format(savestringname,sizeof(savestringname),"mapobjectmid[%i]",count);
  4350.                         objectmid = dini_Int(playerfilename,savestringname);
  4351.                         viewobject[viewselected[playerid]][count] = CreateDynamicObject(objectmid,x,y,z,xrot,yrot,zrot);
  4352.                     }
  4353.                 }
  4354.                 SendClientMessage(playerid, LIGHTBLUE, "You have opened a map in view mode");
  4355.             }
  4356.             else
  4357.             {
  4358.                 format(viewstring[viewselected[playerid]],sizeof(viewstring),"");
  4359.                 ShowPlayerDialog(playerid,MAPDOSENOTEXITS,DIALOG_STYLE_MSGBOX,"ERROR","this map does not exist","Back","Close");
  4360.             }
  4361.         }
  4362.         else
  4363.         {
  4364.             SendClientMessage(playerid, RED, "You canceled viewing a map");
  4365.         }
  4366.     }
  4367.     else if(dialogid == OPENMAP)
  4368.     {
  4369.         if(response)
  4370.         {
  4371.             ShowPlayerDialog(playerid,OPENMAPINPUTEDIT,DIALOG_STYLE_INPUT,"mapname","please enter the name of the map you want to edit","Ok","Cancel");
  4372.         }
  4373.         else
  4374.         {
  4375.             if(IsPlayerAdmince(playerid,3))
  4376.             {
  4377.                 string = "";
  4378.                 for(new count;count< 12;count++)
  4379.                 {
  4380.                     if((viewslot[count])==1)
  4381.                     {
  4382.                         new addstr[128];
  4383.                         new storestring[128];
  4384.                         format(storestring,sizeof(storestring),"%s",string);
  4385.                         format(addstr,sizeof(addstr),"%s",viewstring[count]);
  4386.                         if(isnull(string))
  4387.                         {
  4388.                             format(string,sizeof(string),"%s",addstr);
  4389.                         }
  4390.                         else
  4391.                         {
  4392.                             format(string,sizeof(string),"%s\n%s",storestring,addstr);
  4393.                         }
  4394.                     }
  4395.                     else
  4396.                     {
  4397.                         new addstr[128];
  4398.                         new storestring[128];
  4399.                         format(storestring,sizeof(storestring),"%s",string);
  4400.                         format(addstr,sizeof(addstr),"emptyslot\n");
  4401.                         if(isnull(string))
  4402.                         {
  4403.                             format(string,sizeof(string),"%s",addstr);
  4404.                         }
  4405.                         else
  4406.                         {
  4407.                             format(string,sizeof(string),"%s\n%s",storestring,addstr);
  4408.                         }
  4409.                     }
  4410.                 }
  4411.                 ShowPlayerDialog(playerid,OPENMAPLISTVIEW,DIALOG_STYLE_LIST,"select a slot",string,"Ok","Back");
  4412.             }
  4413.             else
  4414.             {
  4415.                 SendClientMessage(playerid,RED, "You have to be atleast adminlevel 3 inorder to use this command");
  4416.             }
  4417.         }
  4418.     }
  4419.     else if(dialogid == OPENMAPLISTVIEW)
  4420.     {
  4421.         if(response)
  4422.         {
  4423.             if((viewslot[listitem])==0)
  4424.             {
  4425.                 viewselected[playerid] = listitem;
  4426.                 ShowPlayerDialog(playerid,OPENMAPINPUTVIEW,DIALOG_STYLE_INPUT,"mapname","please enter the name of the map you want to view","Ok","Cancel");
  4427.             }
  4428.             else
  4429.             {
  4430.                 SendClientMessage(playerid, RED, "This Slot is already occupide");
  4431.             }
  4432.         }
  4433.         else
  4434.         {
  4435.             ShowPlayerDialog(playerid,OPENMAP,DIALOG_STYLE_MSGBOX,"Select","you can ether edit a map or open it just for viewing purposes","Edit","View");
  4436.         }
  4437.     }
  4438.     else if(dialogid == MAPNAMEEXITS)
  4439.     {
  4440.         if(response)
  4441.         {
  4442.             ShowPlayerDialog(playerid,MAPNAME,DIALOG_STYLE_INPUT,"Input","Please input the name of the map you wish to create","Ok","Cancel");
  4443.         }
  4444.         else
  4445.         {
  4446.             SendClientMessage(playerid, RED, "you have canceled makeing a map");
  4447.         }
  4448.     }
  4449.     else if(dialogid == MAPNAME)
  4450.     {
  4451.         if(response)
  4452.         {
  4453.             if(isnull(inputtext))
  4454.             {
  4455.                 return SendClientMessage(playerid, RED, "You can't name the map nothing");
  4456.             }
  4457.             for(new count;count < MAX;count++)
  4458.             {
  4459.                 if((mapplayerslot[count])==0)
  4460.                 {
  4461.                     format(mapname[count],sizeof(mapname),"JBobjects/%s.map",inputtext);
  4462.                     if(dini_Exists(mapname[count]))
  4463.                     {
  4464.                         format(mapname[count],sizeof(mapname),"");
  4465.                         ShowPlayerDialog(playerid,MAPNAMEEXITS,DIALOG_STYLE_MSGBOX,"ERROR","the map name you have enter is invalid","Ok","Close");
  4466.                         return 1;
  4467.                     }
  4468.                     new name[128];
  4469.                     GetPlayerName(playerid,name,sizeof(name));
  4470.                     mapplayereditstate[playerid] = 1;
  4471.                     mapplayerslot[count] = 1;
  4472.                     mapplayerslotid[playerid] = count;
  4473.                     format(mapplayereditingname[count],sizeof(mapplayereditingname),"%s",name);
  4474.                     format(mapname[count],sizeof(mapname),"JBobjects/%s.map",inputtext);
  4475.                     dini_Create(mapname[count]);
  4476.                     dini_Set(mapname[count],"mapname",(mapname[count]));
  4477.                     dini_Set(mapname[count],"mapplayereditingname",(mapplayereditingname[count]));
  4478.                     SendClientMessage(playerid, LIGHTBLUE, "You have created a map");
  4479.                     return 1;
  4480.                 }
  4481.             }
  4482.             return SendClientMessage(playerid, RED, "all slots are currently taken");
  4483.         }
  4484.         else
  4485.         {
  4486.             SendClientMessage(playerid, RED, "You have cancel makeing a map");
  4487.         }
  4488.     }
  4489.     else if(dialogid == DIALOG_ADDOBJECTS)
  4490.     {
  4491.         if(response)
  4492.         {
  4493.             if(listitem == 0)
  4494.             {
  4495.                 ShowPlayerDialog(playerid, DIALOG_CUSTOMINPUT, DIALOG_STYLE_INPUT,"Manualy enter","Enter the id of the object you want to add","OK","Back");
  4496.             }
  4497.             else if(listitem ==1)
  4498.             {
  4499.                 ShowPlayerDialog(playerid,DIALOG_SAMPLOGOS,DIALOG_STYLE_LIST,"SAMP logos","SAMPLogoSmall\nSAMPLogoBig","Ok","Back");
  4500.             }
  4501.             //I did not include partical effects becuse it lasts only like one second for some of them if you want it follow these instruction
  4502.             //ShowPlayerDialog(playerid,DIALOG_ADDOBJECTS,DIALOG_STYLE_LIST, "Main Menu 'JBobjects'","Custom Input\nSA:MP Logos\nLand Masses\nBase Sections\nElevator from VC\nDM Cages\nRacing\nParkour\nSky Diving Platforms\nTunnel Sections\nRamps\nModular Road Sections\nModular Bridge Sections\nTubes and Funnels\nSpheres\nOthers\nFavorite","Ok","Cancel");
  4503.             //make sure you put it as the third one(after SA:MP Logos)
  4504.             //uncomment the section below.. if(listitem ==2)
  4505.             //make sure in this catagory you change the number back to the right order EXAPLE: if(listitem ==0) --next-- if(listitem ==1)
  4506.             //make sure you uncomment the section bellow that has the labels DIALOG_PARTICLEEFFECTSP1,DIALOG_PARTICLEEFFECTSP2,DIALOG_PARTICLEEFFECTSP3,DIALOG_PARTICLEEFFECTSP4,DIALOG_PARTICLEEFFECTSP5)
  4507.             //make sure you uncomment the section called DIALOG_PARTICLEEFFECTS for the pages
  4508.             //you are done and ready to use the script if you don't do one this chances are that the script will not work
  4509.             //if you want to revers it ether redownload or reverse these steps
  4510.             /*else if(listitem ==2)
  4511.             {
  4512.                 ShowPlayerDialog(playerid,DIALOG_PARTICLEEFFECTS,DIALOG_STYLE_LIST,"Particle effects","Page1\nPage2\nPage3\nPage4\nPage5","Ok","Back");
  4513.             }*/
  4514.             else if(listitem ==2)
  4515.             {
  4516.                 ShowPlayerDialog(playerid,DIALOG_LANDMASSES,DIALOG_STYLE_LIST,"Land Masses","Volcano\nIslandBase1","Ok","Back");
  4517.             }
  4518.             else if(listitem ==3)
  4519.             {
  4520.                 ShowPlayerDialog(playerid,DIALOG_BASES,DIALOG_STYLE_LIST,"Base Sections","Base125mx125m1\nBase250mx250m1","Ok","Back");
  4521.             }
  4522.             else if(listitem ==4)
  4523.             {
  4524.                 ShowPlayerDialog(playerid,DIALOG_ELEVATOR,DIALOG_STYLE_LIST,"Elevators","VCElevator1\nElevatorDoor1\nElevatorDoor2\nVCElevatorFront1","Ok","Back");
  4525.             }
  4526.             else if(listitem ==5)
  4527.             {
  4528.                 ShowPlayerDialog(playerid,DIALOG_DMCAGES,DIALOG_STYLE_LIST,"DM Cages","DMCage1\nDMCage2","Ok","Back");
  4529.             }
  4530.             else if(listitem ==6)
  4531.             {
  4532.                 //18761 RaceFinishLine1
  4533.                 playerpick[playerid]=1;
  4534.                 format(objectstring[objectindex[playerid]],128,"RaceFinishLine1");
  4535.                 jbobjectid[objectindex[playerid]]= 18761;
  4536.             }
  4537.             else if(listitem ==7)
  4538.             {
  4539.                 ShowPlayerDialog(playerid,DIALOG_PARKOUR,DIALOG_STYLE_LIST,"ParkOur","Concrete1mx1mx5m\nConcrete3mx3mx5m\nConcrete5mx5mx5m\nConcrete10mx10mx5m\nConcrete10mx1mx5m\nConcreteStair1","Ok","Back");
  4540.             }
  4541.             else if(listitem ==8)
  4542.             {
  4543.                 ShowPlayerDialog(playerid,DIALOG_PLATFORMS,DIALOG_STYLE_LIST,"Platforms","SkyDivePlatform1\nSkyDivePlatform1a\nSkyDivePlatform1b\nSpiralStair1","Ok","Back");
  4544.             }
  4545.             else if(listitem ==9)
  4546.             {
  4547.                 ShowPlayerDialog(playerid,DIALOG_TUNNELS,DIALOG_STYLE_LIST,"Tunnels","TunnelSection1\nTunnelJoinSection1\nTunnelJoinSection2\nTunnelJoinSection3\nTunnelJoinSection4\nTunnelSpiral1","Ok","Back");
  4548.             }
  4549.             else if(listitem ==10)
  4550.             {
  4551.                 ShowPlayerDialog(playerid,DIALOG_RAMPS,DIALOG_STYLE_LIST,"Ramps","RampT1\nRampT2\nRampT3\nMeshRampBig\nCookieRamp1\nFunBoxTop1\nFunBoxRamp1\nFunBoxRamp2\nFunBoxRamp3\nFunBoxRamp4","Ok","Back");
  4552.             }
  4553.             else if(listitem ==11)
  4554.             {
  4555.                 ShowPlayerDialog(playerid,DIALOG_ROADS,DIALOG_STYLE_LIST,"Roads","MRoad40m\nMRoad150m\nMRoadBend180Deg1\nMRoadBend45Deg\nMRoadTwist15DegL\nMRoadTwist15DegR\nMRoadBend15Deg1\nMRoadBend15Deg2\nMRoadBend15Deg3\nMRoadBend15Deg4\nMRoadB45T15DegL\nMRoadB45T15DegR\nMRoadHelix1\nMRoadLoop1","Ok","Back");
  4556.             }
  4557.             else if(listitem ==12)
  4558.             {
  4559.                 ShowPlayerDialog(playerid,DIALOG_BRIDGES,DIALOG_STYLE_LIST,"Bridges","MBridgeRamp1\nMBridge150m1\nMBridge150m2\nMBridge150m3\nMBridge150m4\nMBridge75mHalf","Ok","Back");
  4560.             }
  4561.             else if(listitem ==13)
  4562.             {
  4563.                 ShowPlayerDialog(playerid,DIALOG_TUBES,DIALOG_STYLE_LIST,"Tubes","Page1\nPage2","Ok","Back");
  4564.             }
  4565.             else if(listitem ==14)
  4566.             {
  4567.                 ShowPlayerDialog(playerid,DIALOG_SPHERES,DIALOG_STYLE_LIST,"Spheres","GlassSphere1\nWaterUVAnimSphere1\nRTexturesphere","Ok","Back");
  4568.             }
  4569.             else if(listitem ==15)
  4570.             {
  4571.                 ShowPlayerDialog(playerid,DIALOG_OTHERS,DIALOG_STYLE_LIST,"Others","HugeHalfPipe1\nSamSiteNonDynamic\nParaDropNonDynamic\nHeliPad1","Ok","Back");
  4572.             }
  4573.             else if(listitem ==16)
  4574.             {
  4575.                 ShowPlayerDialog(playerid,DIALOG_FAVORITEADDDELETE,DIALOG_STYLE_LIST,"Delete&Add","Addobject\nDeleteobject\nInport object to game","Ok","Back");
  4576.             }
  4577.         }
  4578.         else
  4579.         {
  4580.             SendClientMessage(playerid, RED, "You have closed the diolog boxes");
  4581.         }
  4582.     }
  4583.     //main screen ends
  4584.     else if(dialogid == DIALOG_CUSTOMINPUT)
  4585.     {
  4586.         if(response)
  4587.         {
  4588.             new val;
  4589.             val = strval(inputtext);
  4590.             if((val)==0)
  4591.             {
  4592.                 return SendClientMessage(playerid, RED, "You have to enter a valid number, you entered 0 or a string");
  4593.             }
  4594.             jbobjectid[objectindex[playerid]] = strval(inputtext);
  4595.             ShowPlayerDialog(playerid,DIALOG_CUSTOMINPUTSTRING,DIALOG_STYLE_INPUT,"Object Name","please enter the name of you object if you don't want to the just click defualt","Ok","defualt");
  4596.         }
  4597.         else
  4598.         {
  4599.             ShowPlayerDialog(playerid,DIALOG_ADDOBJECTS,DIALOG_STYLE_LIST, "Main Menu 'JBobjects'","Custom Input\nSA:MP Logos\nLand Masses\nBase Sections\nElevator from VC\nDM Cages\nRacing\nParkour\nSky Diving Platforms\nTunnel Sections\nRamps\nModular Road Sections\nModular Bridge Sections\nTubes and Funnels\nSpheres\nOthers\nFavorite","Ok","Cancel");
  4600.         }
  4601.     }
  4602.     else if(dialogid == DIALOG_SAMPLOGOS)
  4603.     {
  4604.         if(response)
  4605.         {
  4606.             if(listitem ==0)
  4607.             {
  4608.                 //18749 SAMPLogoSmall
  4609.                 playerpick[playerid]=1;
  4610.                 format(objectstring[objectindex[playerid]],128,"SAMPLogoSmall");
  4611.                 jbobjectid[objectindex[playerid]]= 18749;
  4612.             }
  4613.             else if(listitem ==1)
  4614.             {
  4615.             //18750 SAMPLogoBig
  4616.             playerpick[playerid]=1;
  4617.             format(objectstring[objectindex[playerid]],128,"SAMPLogoBig");
  4618.             jbobjectid[objectindex[playerid]]= 18750;
  4619.             }
  4620.         }
  4621.         else
  4622.         {
  4623.             ShowPlayerDialog(playerid,DIALOG_ADDOBJECTS,DIALOG_STYLE_LIST, "Main Menu 'JBobjects'","Custom Input\nSA:MP Logos\nLand Masses\nBase Sections\nElevator from VC\nDM Cages\nRacing\nParkour\nSky Diving Platforms\nTunnel Sections\nRamps\nModular Road Sections\nModular Bridge Sections\nTubes and Funnels\nSpheres\nOthers\nFavorite","Ok","Cancel");
  4624.         }
  4625.     }
  4626.     //remove this becuse it disapears after 1 second
  4627.     /*else if(dialogid == DIALOG_PARTICLEEFFECTS)
  4628.     {
  4629.         if(response)
  4630.         {
  4631.             if(listitem == 0)
  4632.             {
  4633.                 ShowPlayerDialog(playerid,DIALOG_PARTICLEEFFECTSP1,DIALOG_STYLE_LIST,"Particle effects","blood_heli\nboat_prop\ncamflash\ncarwashspray\ncementp\ncigarette_smoke\ncloudfast\ncoke_puff\ncoke_trail\nexhale\nexplosion_barrel\nexplosion_crate\nexplosion_door\nexplosion_fuel_car\nexplosion_large\nexplosion_medium\nexplosion_molotov\nexplosion_small\nexplosion_tiny\n nextpage","Ok","Back");
  4634.             }
  4635.             else if(listitem == 1)
  4636.             {
  4637.                 ShowPlayerDialog(playerid,DIALOG_PARTICLEEFFECTSP2,DIALOG_STYLE_LIST,"Particle effects","extinguisher\nfire\nfire_bike+\nfire_car\nfire_large\nfire_med\nFlame\nflamethrower\ngunflash\ngunsmoke\nheli_dust\n nextpage\nbackpage","Ok","Back");
  4638.             }
  4639.             else if(listitem == 2)
  4640.             {
  4641.                 ShowPlayerDialog(playerid,DIALOG_PARTICLEEFFECTSP3,DIALOG_STYLE_LIST,"Particle effects","insects\njetpack\njetthrust\nmolotov_flame\nnitro\noverheat_car\noverheat_car_elec\npetrolcan\nprt_blood\nprt_boatsplash\nprt_bubble\nprt_cardebris\nprt_collisionsmoke\nprt_glass\nprt_gunshell\nprt_sand2\nprt_sand\n Next page\nbackpage","Ok","Back");
  4642.             }
  4643.             else if(listitem == 3)
  4644.             {
  4645.                 ShowPlayerDialog(playerid,DIALOG_PARTICLEEFFECTSP4,DIALOG_STYLE_LIST,"Particle effects","prt_smoke_huge\nprt_smoke_expand\nprt_spark\nprt_spark_2\nprt_wake\nprt_watersplash\nprt_wheeldirt\npuke\nriot_smoke\nshootlight\nsmoke30lit\nsmoke30m\nsmoke50lit\nsmoke_flare\nspraycan\n nextpage\nbackpage","Ok","Back");
  4646.             }
  4647.             else if(listitem == 4)
  4648.             {
  4649.                 ShowPlayerDialog(playerid,DIALOG_PARTICLEEFFECTSP5,DIALOG_STYLE_LIST,"Particle effects","tank_fire\nteargas\nteargasAD\ntree_hit_fir\ntree_hit_palm\nvent2\nvent\nwallbust\nwater_fnt_tme\nwater_fountain\nwater_hydrant\nwater_ripples\nwater_speed\nwater_splash\nwater_splash_big\nwater_splsh_sml\nwater_swim\nwaterfall_end\nWS_factorysmoke\nbackpage","Ok","Back");
  4650.             }
  4651.         }
  4652.         else
  4653.         {
  4654.             ShowPlayerDialog(playerid,DIALOG_ADDOBJECTS,DIALOG_STYLE_LIST, "Main Menu 'JBobjects'","Custom Input\nSA:MP Logos\nLand Masses\nBase Sections\nElevator from VC\nDM Cages\nRacing\nParkour\nSky Diving Platforms\nTunnel Sections\nRamps\nModular Road Sections\nModular Bridge Sections\nTubes and Funnels\nSpheres\nOthers\nFavorite","Ok","Cancel");
  4655.         }
  4656.     }*/
  4657.     else if(dialogid == DIALOG_LANDMASSES)
  4658.     {
  4659.         if(response)
  4660.         {
  4661.             if(listitem ==0)
  4662.             {
  4663.                 //18751 IslandBase1
  4664.                 playerpick[playerid]=1;
  4665.                 format(objectstring[objectindex[playerid]],128,"IslandBase1");
  4666.                 jbobjectid[objectindex[playerid]]= 18751;
  4667.             }
  4668.             else if(listitem ==1)
  4669.             {
  4670.                 //18752 Volcano
  4671.                 playerpick[playerid]=1;
  4672.                 format(objectstring[objectindex[playerid]],128,"Volcano");
  4673.                 jbobjectid[objectindex[playerid]]= 18752;
  4674.             }
  4675.         }
  4676.         else
  4677.         {
  4678.             ShowPlayerDialog(playerid,DIALOG_ADDOBJECTS,DIALOG_STYLE_LIST, "Main Menu 'JBobjects'","Custom Input\nSA:MP Logos\nLand Masses\nBase Sections\nElevator from VC\nDM Cages\nRacing\nParkour\nSky Diving Platforms\nTunnel Sections\nRamps\nModular Road Sections\nModular Bridge Sections\nTubes and Funnels\nSpheres\nOthers\nFavorite","Ok","Cancel");
  4679.         }
  4680.     }
  4681.     else if(dialogid == DIALOG_BASES)
  4682.     {
  4683.         if(response)
  4684.         {
  4685.             if(listitem ==0)
  4686.             {
  4687.                 //18753 Base125mx125m1
  4688.                 playerpick[playerid]=1;
  4689.                 format(objectstring[objectindex[playerid]],128,"Base125mx125m1");
  4690.                 jbobjectid[objectindex[playerid]]= 18753;
  4691.             }
  4692.             else if(listitem ==1)
  4693.             {
  4694.                 //18754 Base250mx250m1
  4695.                 playerpick[playerid]=1;
  4696.                 format(objectstring[objectindex[playerid]],128,"Base250mx250m1");
  4697.                 jbobjectid[objectindex[playerid]]= 18754;
  4698.             }
  4699.         }
  4700.         else
  4701.         {
  4702.             ShowPlayerDialog(playerid,DIALOG_ADDOBJECTS,DIALOG_STYLE_LIST, "Main Menu 'JBobjects'","Custom Input\nSA:MP Logos\nLand Masses\nBase Sections\nElevator from VC\nDM Cages\nRacing\nParkour\nSky Diving Platforms\nTunnel Sections\nRamps\nModular Road Sections\nModular Bridge Sections\nTubes and Funnels\nSpheres\nOthers\nFavorite","Ok","Cancel");
  4703.         }
  4704.     }
  4705.     else if(dialogid == DIALOG_ELEVATOR)
  4706.     {
  4707.         if(response)
  4708.         {
  4709.             if(listitem ==0)
  4710.             {
  4711.                 //18755 VCElevator1
  4712.                 playerpick[playerid]=1;
  4713.                 format(objectstring[objectindex[playerid]],128,"VCElevator1");
  4714.                 jbobjectid[objectindex[playerid]]= 18755;
  4715.             }
  4716.             else if(listitem ==1)
  4717.             {
  4718.                 //18756 ElevatorDoor1
  4719.                 playerpick[playerid]=1;
  4720.                 format(objectstring[objectindex[playerid]],128,"ElevatorDoor1");
  4721.                 jbobjectid[objectindex[playerid]]= 18756;
  4722.             }
  4723.             else if(listitem ==2)
  4724.             {
  4725.                 //18757 ElevatorDoor2
  4726.                 playerpick[playerid]=1;
  4727.                 format(objectstring[objectindex[playerid]],128,"ElevatorDoor2");
  4728.                 jbobjectid[objectindex[playerid]]= 18757;
  4729.             }
  4730.             else if(listitem ==3)
  4731.             {
  4732.                 //18758 VCElevatorFront1
  4733.                 playerpick[playerid]=1;
  4734.                 format(objectstring[objectindex[playerid]],128,"VCElevatorFront1");
  4735.                 jbobjectid[objectindex[playerid]]= 18758;
  4736.             }
  4737.         }
  4738.         else
  4739.         {
  4740.             ShowPlayerDialog(playerid,DIALOG_ADDOBJECTS,DIALOG_STYLE_LIST, "Main Menu 'JBobjects'","Custom Input\nSA:MP Logos\nLand Masses\nBase Sections\nElevator from VC\nDM Cages\nRacing\nParkour\nSky Diving Platforms\nTunnel Sections\nRamps\nModular Road Sections\nModular Bridge Sections\nTubes and Funnels\nSpheres\nOthers\nFavorite","Ok","Cancel");
  4741.         }
  4742.     }
  4743.     else if(dialogid == DIALOG_DMCAGES)
  4744.     {
  4745.         if(response)
  4746.         {
  4747.             if(listitem ==0)
  4748.             {
  4749.                 //18759 DMCage1
  4750.                 playerpick[playerid]=1;
  4751.                 format(objectstring[objectindex[playerid]],128,"DMCage1");
  4752.                 jbobjectid[objectindex[playerid]]= 18759;
  4753.             }
  4754.             else if(listitem ==1)
  4755.             {
  4756.                 //18760 DMCage2
  4757.                 playerpick[playerid]=1;
  4758.                 format(objectstring[objectindex[playerid]],128,"DMCage2");
  4759.                 jbobjectid[objectindex[playerid]]= 18760;
  4760.             }
  4761.         }
  4762.         else
  4763.         {
  4764.             ShowPlayerDialog(playerid,DIALOG_ADDOBJECTS,DIALOG_STYLE_LIST, "Main Menu 'JBobjects'","Custom Input\nSA:MP Logos\nLand Masses\nBase Sections\nElevator from VC\nDM Cages\nRacing\nParkour\nSky Diving Platforms\nTunnel Sections\nRamps\nModular Road Sections\nModular Bridge Sections\nTubes and Funnels\nSpheres\nOthers\nFavorite","Ok","Cancel");
  4765.         }
  4766.     }
  4767.     else if(dialogid == DIALOG_PARKOUR)
  4768.     {
  4769.         if(response)
  4770.         {
  4771.             if(listitem ==0)
  4772.             {
  4773.                 //18762 Concrete1mx1mx5m
  4774.                 playerpick[playerid]=1;
  4775.                 format(objectstring[objectindex[playerid]],128,"Concrete1mx1mx5m");
  4776.                 jbobjectid[objectindex[playerid]]= 18762;
  4777.             }
  4778.             else if(listitem ==1)
  4779.             {
  4780.                 //18763 Concrete3mx3mx5m
  4781.                 playerpick[playerid]=1;
  4782.                 format(objectstring[objectindex[playerid]],128,"Concrete3mx3mx5m");
  4783.                 jbobjectid[objectindex[playerid]]= 18763;
  4784.             }
  4785.             else if(listitem ==2)
  4786.             {
  4787.                 //18764 Concrete5mx5mx5m
  4788.                 playerpick[playerid]=1;
  4789.                 format(objectstring[objectindex[playerid]],128,"Concrete5mx5mx5m");
  4790.                 jbobjectid[objectindex[playerid]]= 18764;
  4791.             }
  4792.             else if(listitem ==3)
  4793.             {
  4794.                 //18765 Concrete10mx10mx5m
  4795.                 playerpick[playerid]=1;
  4796.                 format(objectstring[objectindex[playerid]],128,"Concrete10mx10mx5m");
  4797.                 jbobjectid[objectindex[playerid]]= 18765;
  4798.             }
  4799.             else if(listitem ==4)
  4800.             {
  4801.                 //18766 Concrete10mx1mx5m
  4802.                 playerpick[playerid]=1;
  4803.                 format(objectstring[objectindex[playerid]],128,"Concrete10mx1mx5m");
  4804.                 jbobjectid[objectindex[playerid]]= 18766;
  4805.             }
  4806.             else if(listitem ==5)
  4807.             {
  4808.                 //18767 ConcreteStair1
  4809.                 playerpick[playerid]=1;
  4810.                 format(objectstring[objectindex[playerid]],128,"ConcreteStair1");
  4811.                 jbobjectid[objectindex[playerid]]= 18767;
  4812.             }
  4813.         }
  4814.         else
  4815.         {
  4816.             ShowPlayerDialog(playerid,DIALOG_ADDOBJECTS,DIALOG_STYLE_LIST, "Main Menu 'JBobjects'","Custom Input\nSA:MP Logos\nLand Masses\nBase Sections\nElevator from VC\nDM Cages\nRacing\nParkour\nSky Diving Platforms\nTunnel Sections\nRamps\nModular Road Sections\nModular Bridge Sections\nTubes and Funnels\nSpheres\nOthers\nFavorite","Ok","Cancel");
  4817.         }
  4818.     }
  4819.     else if(dialogid == DIALOG_PLATFORMS)
  4820.     {
  4821.         if(response)
  4822.         {
  4823.             if(listitem ==0)
  4824.             {
  4825.                 //18768 SkyDivePlatform1
  4826.                 playerpick[playerid]=1;
  4827.                 format(objectstring[objectindex[playerid]],128,"SkyDivePlatform1");
  4828.                 jbobjectid[objectindex[playerid]]= 18768;
  4829.             }
  4830.             else if(listitem ==1)
  4831.             {
  4832.                 //18769 SkyDivePlatform1a
  4833.                 playerpick[playerid]=1;
  4834.                 format(objectstring[objectindex[playerid]],128,"SkyDivePlatform1a");
  4835.                 jbobjectid[objectindex[playerid]]= 18769;
  4836.             }
  4837.             else if(listitem ==2)
  4838.             {
  4839.                 //18770 SkyDivePlatform1b
  4840.                 playerpick[playerid]=1;
  4841.                 format(objectstring[objectindex[playerid]],128,"SkyDivePlatform1b");
  4842.                 jbobjectid[objectindex[playerid]]= 18770;
  4843.             }
  4844.             else if(listitem ==3)
  4845.             {
  4846.                 //18771 SpiralStair1
  4847.                 playerpick[playerid]=1;
  4848.                 format(objectstring[objectindex[playerid]],128,"SpiralStair1");
  4849.                 jbobjectid[objectindex[playerid]]= 18771;
  4850.             }
  4851.         }
  4852.         else
  4853.         {
  4854.             ShowPlayerDialog(playerid,DIALOG_ADDOBJECTS,DIALOG_STYLE_LIST, "Main Menu 'JBobjects'","Custom Input\nSA:MP Logos\nLand Masses\nBase Sections\nElevator from VC\nDM Cages\nRacing\nParkour\nSky Diving Platforms\nTunnel Sections\nRamps\nModular Road Sections\nModular Bridge Sections\nTubes and Funnels\nSpheres\nOthers\nFavorite","Ok","Cancel");
  4855.         }
  4856.     }
  4857.     else if(dialogid == DIALOG_TUNNELS)
  4858.     {
  4859.         if(response)
  4860.         {
  4861.             if(listitem ==0)
  4862.             {
  4863.                 //18772 TunnelSection1
  4864.                 playerpick[playerid]=1;
  4865.                 format(objectstring[objectindex[playerid]],128,"TunnelSection1");
  4866.                 jbobjectid[objectindex[playerid]]= 18772;
  4867.             }
  4868.             else if(listitem ==1)
  4869.             {
  4870.                 //18773 TunnelJoinSection1
  4871.                 playerpick[playerid]=1;
  4872.                 format(objectstring[objectindex[playerid]],128,"TunnelJoinSection1");
  4873.                 jbobjectid[objectindex[playerid]]= 18773;
  4874.             }
  4875.             else if(listitem ==2)
  4876.             {
  4877.                 //18774 TunnelJoinSection2
  4878.                 playerpick[playerid]=1;
  4879.                 format(objectstring[objectindex[playerid]],128,"TunnelJoinSection2");
  4880.                 jbobjectid[objectindex[playerid]]= 18774;
  4881.             }
  4882.             else if(listitem ==3)
  4883.             {
  4884.                 //18775 TunnelJoinSection3
  4885.                 playerpick[playerid]=1;
  4886.                 format(objectstring[objectindex[playerid]],128,"TunnelJoinSection3");
  4887.                 jbobjectid[objectindex[playerid]]= 18775;
  4888.             }
  4889.             else if(listitem ==4)
  4890.             {
  4891.                 //18776 TunnelJoinSection4
  4892.                 playerpick[playerid]=1;
  4893.                 format(objectstring[objectindex[playerid]],128,"TunnelJoinSection4");
  4894.                 jbobjectid[objectindex[playerid]]= 18776;
  4895.             }
  4896.             else if(listitem ==5)
  4897.             {
  4898.                 //18777 TunnelSpiral1
  4899.                 playerpick[playerid]=1;
  4900.                 format(objectstring[objectindex[playerid]],128,"TunnelSpiral1");
  4901.                 jbobjectid[objectindex[playerid]]= 18777;
  4902.             }
  4903.         }
  4904.         else
  4905.         {
  4906.             ShowPlayerDialog(playerid,DIALOG_ADDOBJECTS,DIALOG_STYLE_LIST, "Main Menu 'JBobjects'","Custom Input\nSA:MP Logos\nLand Masses\nBase Sections\nElevator from VC\nDM Cages\nRacing\nParkour\nSky Diving Platforms\nTunnel Sections\nRamps\nModular Road Sections\nModular Bridge Sections\nTubes and Funnels\nSpheres\nOthers\nFavorite","Ok","Cancel");
  4907.         }
  4908.     }
  4909.     else if(dialogid == DIALOG_RAMPS)
  4910.     {
  4911.         if(response)
  4912.         {
  4913.             if(listitem ==0)
  4914.             {
  4915.                 //18778 RampT1
  4916.                 playerpick[playerid]=1;
  4917.                 format(objectstring[objectindex[playerid]],128,"RampT1");
  4918.                 jbobjectid[objectindex[playerid]]= 18778;
  4919.             }
  4920.             else if(listitem ==1)
  4921.             {
  4922.                 //18779 RampT2
  4923.                 playerpick[playerid]=1;
  4924.                 format(objectstring[objectindex[playerid]],128,"RampT2");
  4925.                 jbobjectid[objectindex[playerid]]= 18779;
  4926.             }
  4927.             else if(listitem ==2)
  4928.             {
  4929.                 //18780 RampT3
  4930.                 playerpick[playerid]=1;
  4931.                 format(objectstring[objectindex[playerid]],128,"RampT3");
  4932.                 jbobjectid[objectindex[playerid]]= 18780;
  4933.             }
  4934.             else if(listitem ==3)
  4935.             {
  4936.                 //18781 MeshRampBig
  4937.                 playerpick[playerid]=1;
  4938.                 format(objectstring[objectindex[playerid]],128,"MeshRampBig");
  4939.                 jbobjectid[objectindex[playerid]]= 18781;
  4940.             }
  4941.             else if(listitem ==4)
  4942.             {
  4943.                 //18782 CookieRamp1
  4944.                 playerpick[playerid]=1;
  4945.                 format(objectstring[objectindex[playerid]],128,"CookieRamp1");
  4946.                 jbobjectid[objectindex[playerid]]= 18782 ;
  4947.             }
  4948.             else if(listitem ==5)
  4949.             {
  4950.                 //18783 FunBoxTop1
  4951.                 playerpick[playerid]=1;
  4952.                 format(objectstring[objectindex[playerid]],128,"FunBoxTop1");
  4953.                 jbobjectid[objectindex[playerid]]= 18783;
  4954.             }
  4955.             else if(listitem ==6)
  4956.             {
  4957.                 //18784 FunBoxRamp1
  4958.                 playerpick[playerid]=1;
  4959.                 format(objectstring[objectindex[playerid]],128,"FunBoxRamp1");
  4960.                 jbobjectid[objectindex[playerid]]= 18784;
  4961.             }
  4962.             else if(listitem ==7)
  4963.             {
  4964.                 //18785 FunBoxRamp2
  4965.                 playerpick[playerid]=1;
  4966.                 format(objectstring[objectindex[playerid]],128,"FunBoxRamp2");
  4967.                 jbobjectid[objectindex[playerid]]= 18785;
  4968.             }
  4969.             else if(listitem ==8)
  4970.             {
  4971.                 //18786 FunBoxRamp3
  4972.                 playerpick[playerid]=1;
  4973.                 format(objectstring[objectindex[playerid]],128,"FunBoxRamp3");
  4974.                 jbobjectid[objectindex[playerid]]= 18786;
  4975.             }
  4976.             else if(listitem ==9)
  4977.             {
  4978.                 //18787 FunBoxRamp4
  4979.                 playerpick[playerid]=1;
  4980.                 format(objectstring[objectindex[playerid]],128,"FunBoxRamp4");
  4981.                 jbobjectid[objectindex[playerid]]= 18787;
  4982.             }
  4983.         }
  4984.         else
  4985.         {
  4986.             ShowPlayerDialog(playerid,DIALOG_ADDOBJECTS,DIALOG_STYLE_LIST, "Main Menu 'JBobjects'","Custom Input\nSA:MP Logos\nLand Masses\nBase Sections\nElevator from VC\nDM Cages\nRacing\nParkour\nSky Diving Platforms\nTunnel Sections\nRamps\nModular Road Sections\nModular Bridge Sections\nTubes and Funnels\nSpheres\nOthers\nFavorite","Ok","Cancel");
  4987.         }
  4988.     }
  4989.     else if(dialogid == DIALOG_ROADS)
  4990.     {
  4991.         if(response)
  4992.         {
  4993.             if(listitem ==0)
  4994.             {
  4995.                 //18788 MRoad40m
  4996.                 playerpick[playerid]=1;
  4997.                 format(objectstring[objectindex[playerid]],128,"MRoad40m");
  4998.                 jbobjectid[objectindex[playerid]]= 18788;
  4999.             }
  5000.             else if(listitem ==1)
  5001.             {
  5002.                 //18789 MRoad150m
  5003.                 playerpick[playerid]=1;
  5004.                 format(objectstring[objectindex[playerid]],128,"MRoad150m");
  5005.                 jbobjectid[objectindex[playerid]]= 18789;
  5006.             }
  5007.             else if(listitem ==2)
  5008.             {
  5009.                 //18790 MRoadBend180Deg1
  5010.                 playerpick[playerid]=1;
  5011.                 format(objectstring[objectindex[playerid]],128,"MRoadBend180Deg1");
  5012.                 jbobjectid[objectindex[playerid]]= 18790;
  5013.             }
  5014.             else if(listitem ==3)
  5015.             {
  5016.                 //18791 MRoadBend45Deg
  5017.                 playerpick[playerid]=1;
  5018.                 format(objectstring[objectindex[playerid]],128,"MRoadBend45Deg");
  5019.                 jbobjectid[objectindex[playerid]]= 18791;
  5020.             }
  5021.             else if(listitem ==4)
  5022.             {
  5023.                 //18792 MRoadTwist15DegL
  5024.                 playerpick[playerid]=1;
  5025.                 format(objectstring[objectindex[playerid]],128,"MRoadTwist15DegL");
  5026.                 jbobjectid[objectindex[playerid]]= 18792;
  5027.             }
  5028.             else if(listitem ==5)
  5029.             {
  5030.                 //18793 MRoadTwist15DegR
  5031.                 playerpick[playerid]=1;
  5032.                 format(objectstring[objectindex[playerid]],128,"MRoadTwist15DegR");
  5033.                 jbobjectid[objectindex[playerid]]= 18793;
  5034.             }
  5035.             else if(listitem ==6)
  5036.             {
  5037.                 //18794 MRoadBend15Deg1
  5038.                 playerpick[playerid]=1;
  5039.                 format(objectstring[objectindex[playerid]],128,"MRoadBend15Deg1");
  5040.                 jbobjectid[objectindex[playerid]]= 18794;
  5041.             }
  5042.             else if(listitem ==7)
  5043.             {
  5044.                 //18795 MRoadBend15Deg2
  5045.                 playerpick[playerid]=1;
  5046.                 format(objectstring[objectindex[playerid]],128,"MRoadBend15Deg2");
  5047.                 jbobjectid[objectindex[playerid]]= 18795;
  5048.             }
  5049.             else if(listitem ==8)
  5050.             {
  5051.                 //18796 MRoadBend15Deg3
  5052.                 playerpick[playerid]=1;
  5053.                 format(objectstring[objectindex[playerid]],128,"MRoadBend15Deg3");
  5054.                 jbobjectid[objectindex[playerid]]= 18796;
  5055.             }
  5056.             else if(listitem ==9)
  5057.             {
  5058.                 //18797 MRoadBend15Deg4
  5059.                 playerpick[playerid]=1;
  5060.                 format(objectstring[objectindex[playerid]],128,"MRoadBend15Deg4");
  5061.                 jbobjectid[objectindex[playerid]]= 18797;
  5062.             }
  5063.             else if(listitem ==10)
  5064.             {
  5065.                 //18798 MRoadB45T15DegL
  5066.                 playerpick[playerid]=1;
  5067.                 format(objectstring[objectindex[playerid]],128,"MRoadB45T15DegL");
  5068.                 jbobjectid[objectindex[playerid]]= 18798;
  5069.             }
  5070.             else if(listitem ==11)
  5071.             {
  5072.                 //18799 MRoadB45T15DegR
  5073.                 playerpick[playerid]=1;
  5074.                 format(objectstring[objectindex[playerid]],128,"MRoadB45T15DegR");
  5075.                 jbobjectid[objectindex[playerid]]= 18799;
  5076.             }
  5077.             else if(listitem ==12)
  5078.             {
  5079.                 //18800 MRoadHelix1
  5080.                 playerpick[playerid]=1;
  5081.                 format(objectstring[objectindex[playerid]],128,"MRoadHelix1");
  5082.                 jbobjectid[objectindex[playerid]]= 18800;
  5083.             }
  5084.             else if(listitem ==13)
  5085.             {
  5086.                 //18801 MRoadLoop1
  5087.                 playerpick[playerid]=1;
  5088.                 format(objectstring[objectindex[playerid]],128,"MRoadLoop1");
  5089.                 jbobjectid[objectindex[playerid]]= 18801;
  5090.             }
  5091.         }
  5092.         else
  5093.         {
  5094.             ShowPlayerDialog(playerid,DIALOG_ADDOBJECTS,DIALOG_STYLE_LIST, "Main Menu 'JBobjects'","Custom Input\nSA:MP Logos\nLand Masses\nBase Sections\nElevator from VC\nDM Cages\nRacing\nParkour\nSky Diving Platforms\nTunnel Sections\nRamps\nModular Road Sections\nModular Bridge Sections\nTubes and Funnels\nSpheres\nOthers\nFavorite","Ok","Cancel");
  5095.         }
  5096.     }
  5097.     else if(dialogid == DIALOG_BRIDGES)
  5098.     {
  5099.         if(response)
  5100.         {
  5101.             if(listitem ==0)
  5102.             {
  5103.                 //18802 MBridgeRamp1
  5104.                 playerpick[playerid]=1;
  5105.                 format(objectstring[objectindex[playerid]],128,"MBridgeRamp1");
  5106.                 jbobjectid[objectindex[playerid]]= 18802;
  5107.             }
  5108.             else if(listitem ==1)
  5109.             {
  5110.                 //18803 MBridge150m1
  5111.                 playerpick[playerid]=1;
  5112.                 format(objectstring[objectindex[playerid]],128,"MBridge150m1");
  5113.                 jbobjectid[objectindex[playerid]]= 18803;
  5114.             }
  5115.             else if(listitem ==2)
  5116.             {
  5117.                 //18804 MBridge150m2
  5118.                 playerpick[playerid]=1;
  5119.                 format(objectstring[objectindex[playerid]],128,"MBridge150m2");
  5120.                 jbobjectid[objectindex[playerid]]= 18804;
  5121.             }
  5122.             else if(listitem ==3)
  5123.             {
  5124.                 //18805 MBridge150m3
  5125.                 playerpick[playerid]=1;
  5126.                 format(objectstring[objectindex[playerid]],128,"MBridge150m3");
  5127.                 jbobjectid[objectindex[playerid]]= 18805;
  5128.             }
  5129.             else if(listitem ==4)
  5130.             {
  5131.                 //18806 MBridge150m4
  5132.                 playerpick[playerid]=1;
  5133.                 format(objectstring[objectindex[playerid]],128,"MBridge150m4");
  5134.                 jbobjectid[objectindex[playerid]]= 18806;
  5135.             }
  5136.             else if(listitem ==5)
  5137.             {
  5138.                 //18807 MBridge75mHalf
  5139.                 playerpick[playerid]=1;
  5140.                 format(objectstring[objectindex[playerid]],128,"MBridge75mHalf");
  5141.                 jbobjectid[objectindex[playerid]]= 18807;
  5142.             }
  5143.         }
  5144.         else
  5145.         {
  5146.             ShowPlayerDialog(playerid,DIALOG_ADDOBJECTS,DIALOG_STYLE_LIST, "Main Menu 'JBobjects'","Custom Input\nSA:MP Logos\nLand Masses\nBase Sections\nElevator from VC\nDM Cages\nRacing\nParkour\nSky Diving Platforms\nTunnel Sections\nRamps\nModular Road Sections\nModular Bridge Sections\nTubes and Funnels\nSpheres\nOthers\nFavorite","Ok","Cancel");
  5147.         }
  5148.     }
  5149.     else if(dialogid == DIALOG_TUBES)
  5150.     {
  5151.         if(response)
  5152.         {
  5153.             if(listitem == 0)
  5154.             {
  5155.                 ShowPlayerDialog(playerid,DIALOG_TUBESP1,DIALOG_STYLE_LIST,"Tubes","Tube50m1\nTube50mGlass1\nTube50mBulge1\nTube50mGlassBulge1\nTube50mFunnel1\nTube50mGlassFunnel1\nTube50mFunnel2\nTube50mFunnel3\nTube50mFunnel4\nTube50mTSection1\nTube50mGlassT1\nTube50mPlus1\nTube50mGlassPlus1\nTube50m45Bend1\nTube50mGlass45Bend1\nTube50m90Bend1\nTube50mGlass90Bend1\n nextpage","Ok","Back");
  5156.             }
  5157.             else if(listitem == 1)
  5158.             {
  5159.                 ShowPlayerDialog(playerid,DIALOG_TUBESP2,DIALOG_STYLE_LIST,"Tubes","Tube50m180Bend1\nTube50mGlass180Bend\nTube100m2\nSpiralTube1\nRTexturetube\nRTexturebridge\nRT25mBend90Tube1\nRT25mBend180Tube1\nRT50mBend45Tube1\nRT50mBend180Tube1\nRBFunnel\nRBHalfpipe\nRB25mBend90Tube\nRB25mBend180Tube\nRB50mBend45Tube\nRB50mBend90Tube\nRB50mBend180Tube\nRB50mTube\n prevpage","Ok","Back");
  5160.             }
  5161.         }
  5162.         else
  5163.         {
  5164.             ShowPlayerDialog(playerid,DIALOG_ADDOBJECTS,DIALOG_STYLE_LIST, "Main Menu 'JBobjects'","Custom Input\nSA:MP Logos\nLand Masses\nBase Sections\nElevator from VC\nDM Cages\nRacing\nParkour\nSky Diving Platforms\nTunnel Sections\nRamps\nModular Road Sections\nModular Bridge Sections\nTubes and Funnels\nSpheres\nOthers\nFavorite","Ok","Cancel");
  5165.         }
  5166.     }
  5167.     else if(dialogid == DIALOG_SPHERES)
  5168.     {
  5169.         if(response)
  5170.         {
  5171.             if(listitem ==0)
  5172.             {
  5173.                 //18843 GlassSphere1
  5174.                 playerpick[playerid]=1;
  5175.                 format(objectstring[objectindex[playerid]],128,"GlassSphere1");
  5176.                 jbobjectid[objectindex[playerid]]= 18843;
  5177.             }
  5178.             else if(listitem ==1)
  5179.             {
  5180.                 //18844 WaterUVAnimSphere1
  5181.                 playerpick[playerid]=1;
  5182.                 format(objectstring[objectindex[playerid]],128,"WaterUVAnimSphere1");
  5183.                 jbobjectid[objectindex[playerid]]= 18844;
  5184.             }
  5185.             else if(listitem ==2)
  5186.             {
  5187.                 //18845 RTexturesphere
  5188.                 playerpick[playerid]=1;
  5189.                 format(objectstring[objectindex[playerid]],128,"RTexturesphere");
  5190.                 jbobjectid[objectindex[playerid]]= 18845;
  5191.             }
  5192.         }
  5193.         else
  5194.         {
  5195.             ShowPlayerDialog(playerid,DIALOG_ADDOBJECTS,DIALOG_STYLE_LIST, "Main Menu 'JBobjects'","Custom Input\nSA:MP Logos\nLand Masses\nBase Sections\nElevator from VC\nDM Cages\nRacing\nParkour\nSky Diving Platforms\nTunnel Sections\nRamps\nModular Road Sections\nModular Bridge Sections\nTubes and Funnels\nSpheres\nOthers\nFavorite","Ok","Cancel");
  5196.         }
  5197.     }
  5198.     else if(dialogid == DIALOG_OTHERS)
  5199.     {
  5200.         if(response)
  5201.         {
  5202.             if(listitem ==0)
  5203.             {
  5204.                 //18847 HugeHalfPipe1
  5205.                 playerpick[playerid]=1;
  5206.                 format(objectstring[objectindex[playerid]],128,"HugeHalfPipe1");
  5207.                 jbobjectid[objectindex[playerid]]= 18847;
  5208.             }
  5209.             else if(listitem ==1)
  5210.             {
  5211.                 //18848 SamSiteNonDynamic
  5212.                 playerpick[playerid]=1;
  5213.                 format(objectstring[objectindex[playerid]],128,"SamSiteNonDynamic");
  5214.                 jbobjectid[objectindex[playerid]]= 18848;
  5215.             }
  5216.             else if(listitem ==2)
  5217.             {
  5218.                 //18849 ParaDropNonDynamic
  5219.                 playerpick[playerid]=1;
  5220.                 format(objectstring[objectindex[playerid]],128,"ParaDropNonDynamic");
  5221.                 jbobjectid[objectindex[playerid]]= 18849;
  5222.             }
  5223.             else if(listitem ==3)
  5224.             {
  5225.                 //18850 HeliPad1
  5226.                 playerpick[playerid]=1;
  5227.                 format(objectstring[objectindex[playerid]],128,"HeliPad1");
  5228.                 jbobjectid[objectindex[playerid]]= 18850;
  5229.             }
  5230.         }
  5231.         else
  5232.         {
  5233.             ShowPlayerDialog(playerid,DIALOG_ADDOBJECTS,DIALOG_STYLE_LIST, "Main Menu 'JBobjects'","Custom Input\nSA:MP Logos\nLand Masses\nBase Sections\nElevator from VC\nDM Cages\nRacing\nParkour\nSky Diving Platforms\nTunnel Sections\nRamps\nModular Road Sections\nModular Bridge Sections\nTubes and Funnels\nSpheres\nOthers\nFavorite","Ok","Cancel");
  5234.         }
  5235.     }
  5236.     else if(dialogid == DIALOG_TUBESP1)
  5237.     {
  5238.         if(response)
  5239.         {
  5240.             if(listitem ==0)
  5241.             {
  5242.                 //18808 Tube50m1
  5243.                 playerpick[playerid]=1;
  5244.                 format(objectstring[objectindex[playerid]],128,"Tube50m1");
  5245.                 jbobjectid[objectindex[playerid]]= 18808;
  5246.             }
  5247.             else if(listitem ==1)
  5248.             {
  5249.                 //18809 Tube50mGlass1
  5250.                 playerpick[playerid]=1;
  5251.                 format(objectstring[objectindex[playerid]],128,"Tube50mGlass1");
  5252.                 jbobjectid[objectindex[playerid]]= 18809;
  5253.             }
  5254.             else if(listitem ==2)
  5255.             {
  5256.                 //18810 Tube50mBulge1
  5257.                 playerpick[playerid]=1;
  5258.                 format(objectstring[objectindex[playerid]],128,"Tube50mBulge1");
  5259.                 jbobjectid[objectindex[playerid]]= 18810;
  5260.             }
  5261.             else if(listitem ==3)
  5262.             {
  5263.                 //18811 Tube50mGlassBulge1
  5264.                 playerpick[playerid]=1;
  5265.                 format(objectstring[objectindex[playerid]],128,"Tube50mGlassBulge1");
  5266.                 jbobjectid[objectindex[playerid]]= 18811;
  5267.             }
  5268.             else if(listitem ==4)
  5269.             {
  5270.                 //18812 Tube50mFunnel1
  5271.                 playerpick[playerid]=1;
  5272.                 format(objectstring[objectindex[playerid]],128,"Tube50mFunnel1");
  5273.                 jbobjectid[objectindex[playerid]]= 18812;
  5274.             }
  5275.             else if(listitem ==5)
  5276.             {
  5277.                 //18813 Tube50mGlassFunnel1
  5278.                 playerpick[playerid]=1;
  5279.                 format(objectstring[objectindex[playerid]],128,"Tube50mGlassFunnel1");
  5280.                 jbobjectid[objectindex[playerid]]= 18813;
  5281.             }
  5282.             else if(listitem ==6)
  5283.             {
  5284.                 //18814 Tube50mFunnel2
  5285.                 playerpick[playerid]=1;
  5286.                 format(objectstring[objectindex[playerid]],128,"Tube50mFunnel2");
  5287.                 jbobjectid[objectindex[playerid]]= 18814;
  5288.             }
  5289.             else if(listitem ==7)
  5290.             {
  5291.                 //18815 Tube50mFunnel3
  5292.                 playerpick[playerid]=1;
  5293.                 format(objectstring[objectindex[playerid]],128,"Tube50mFunnel3");
  5294.                 jbobjectid[objectindex[playerid]]= 18815;
  5295.             }
  5296.             else if(listitem ==8)
  5297.             {
  5298.                 //18816 Tube50mFunnel4
  5299.                 playerpick[playerid]=1;
  5300.                 format(objectstring[objectindex[playerid]],128,"Tube50mFunnel4");
  5301.                 jbobjectid[objectindex[playerid]]= 18816;
  5302.             }
  5303.             else if(listitem ==9)
  5304.             {
  5305.                 //18817 Tube50mTSection1
  5306.                 playerpick[playerid]=1;
  5307.                 format(objectstring[objectindex[playerid]],128,"Tube50mTSection1");
  5308.                 jbobjectid[objectindex[playerid]]= 18817;
  5309.             }
  5310.             else if(listitem ==10)
  5311.             {
  5312.                 //18818 Tube50mGlassT1
  5313.                 playerpick[playerid]=1;
  5314.                 format(objectstring[objectindex[playerid]],128,"Tube50mGlassT1");
  5315.                 jbobjectid[objectindex[playerid]]= 18818;
  5316.             }
  5317.             else if(listitem ==11)
  5318.             {
  5319.                 //18819 Tube50mPlus1
  5320.                 playerpick[playerid]=1;
  5321.                 format(objectstring[objectindex[playerid]],128,"Tube50mPlus1");
  5322.                 jbobjectid[objectindex[playerid]]= 18819;
  5323.             }
  5324.             else if(listitem ==12)
  5325.             {
  5326.                 //18820 Tube50mGlassPlus1
  5327.                 playerpick[playerid]=1;
  5328.                 format(objectstring[objectindex[playerid]],128,"Tube50mGlassPlus1");
  5329.                 jbobjectid[objectindex[playerid]]= 18820;
  5330.             }
  5331.             else if(listitem ==13)
  5332.             {
  5333.                 //18821 Tube50m45Bend1
  5334.                 playerpick[playerid]=1;
  5335.                 format(objectstring[objectindex[playerid]],128,"Tube50m45Bend1");
  5336.                 jbobjectid[objectindex[playerid]]= 18821;
  5337.             }
  5338.             else if(listitem ==14)
  5339.             {
  5340.                 //18822 Tube50mGlass45Bend1
  5341.                 playerpick[playerid]=1;
  5342.                 format(objectstring[objectindex[playerid]],128,"Tube50mGlass45Bend1");
  5343.                 jbobjectid[objectindex[playerid]]= 18822;
  5344.             }
  5345.             else if(listitem ==15)
  5346.             {
  5347.                 //18823 Tube50m90Bend1
  5348.                 playerpick[playerid]=1;
  5349.                 format(objectstring[objectindex[playerid]],128,"Tube50m90Bend1");
  5350.                 jbobjectid[objectindex[playerid]]= 18823;
  5351.             }
  5352.             else if(listitem ==16)
  5353.             {
  5354.                 //18824 Tube50mGlass90Bend1
  5355.                 playerpick[playerid]=1;
  5356.                 format(objectstring[objectindex[playerid]],128,"Tube50mGlass90Bend1");
  5357.                 jbobjectid[objectindex[playerid]]= 18824;
  5358.             }
  5359.             else if(listitem ==17)
  5360.             {
  5361.                 ShowPlayerDialog(playerid,DIALOG_TUBESP1,DIALOG_STYLE_LIST,"Tubes","Tube50m1\nTube50mGlass1\nTube50mBulge1\nTube50mGlassBulge1\nTube50mFunnel1\nTube50mGlassFunnel1\nTube50mFunnel2\nTube50mFunnel3\nTube50mFunnel4\nTube50mTSection1\nTube50mGlassT1\nTube50mPlus1\nTube50mGlassPlus1\nTube50m45Bend1\nTube50mGlass45Bend1\nTube50m90Bend1\nTube50mGlass90Bend1\n nextpage","Ok","Back");
  5362.             }
  5363.         }
  5364.         else
  5365.         {
  5366.             ShowPlayerDialog(playerid,DIALOG_TUBES,DIALOG_STYLE_LIST,"Tubes","Page1\nPage2","Ok","Back");
  5367.         }
  5368.     }
  5369.     else if(dialogid == DIALOG_TUBESP2)
  5370.     {
  5371.         if(response)
  5372.         {
  5373.             if(listitem ==0)
  5374.             {
  5375.                 //18825 Tube50m180Bend1
  5376.                 playerpick[playerid]=1;
  5377.                 format(objectstring[objectindex[playerid]],128,"Tube50m180Bend1");
  5378.                 jbobjectid[objectindex[playerid]]= 18825;
  5379.             }
  5380.             else if(listitem ==1)
  5381.             {
  5382.                 //18826 Tube50mGlass180Bend
  5383.                 playerpick[playerid]=1;
  5384.                 format(objectstring[objectindex[playerid]],128,"Tube50mGlass180Bend");
  5385.                 jbobjectid[objectindex[playerid]]= 18826;
  5386.             }
  5387.             else if(listitem ==2)
  5388.             {
  5389.                 //18827 Tube100m2
  5390.                 playerpick[playerid]=1;
  5391.                 format(objectstring[objectindex[playerid]],128,"Tube100m2");
  5392.                 jbobjectid[objectindex[playerid]]= 18827;
  5393.             }
  5394.             else if(listitem ==3)
  5395.             {
  5396.                 //18828 SpiralTube1
  5397.                 playerpick[playerid]=1;
  5398.                 format(objectstring[objectindex[playerid]],128,"SpiralTube1");
  5399.                 jbobjectid[objectindex[playerid]]= 18828;
  5400.             }
  5401.             else if(listitem ==4)
  5402.             {
  5403.                 //18829 RTexturetube
  5404.                 playerpick[playerid]=1;
  5405.                 format(objectstring[objectindex[playerid]],128,"RTexturetube");
  5406.                 jbobjectid[objectindex[playerid]]= 18829;
  5407.             }
  5408.             else if(listitem ==5)
  5409.             {
  5410.                 //18830 RTexturebridge
  5411.                 playerpick[playerid]=1;
  5412.                 format(objectstring[objectindex[playerid]],128,"RTexturebridge");
  5413.                 jbobjectid[objectindex[playerid]]= 18830;
  5414.             }
  5415.             else if(listitem ==6)
  5416.             {
  5417.                 //18831 RT25mBend90Tube1
  5418.                 playerpick[playerid]=1;
  5419.                 format(objectstring[objectindex[playerid]],128,"RT25mBend90Tube1");
  5420.                 jbobjectid[objectindex[playerid]]= 18831;
  5421.             }
  5422.             else if(listitem ==7)
  5423.             {
  5424.                 //18832 RT25mBend180Tube1
  5425.                 playerpick[playerid]=1;
  5426.                 format(objectstring[objectindex[playerid]],128,"RT25mBend180Tube1");
  5427.                 jbobjectid[objectindex[playerid]]= 18832;
  5428.             }
  5429.             else if(listitem ==8)
  5430.             {
  5431.                 //18833 RT50mBend45Tube1
  5432.                 playerpick[playerid]=1;
  5433.                 format(objectstring[objectindex[playerid]],128,"RT50mBend45Tube1");
  5434.                 jbobjectid[objectindex[playerid]]= 18833;
  5435.             }
  5436.             else if(listitem ==9)
  5437.             {
  5438.                 //18834 RT50mBend180Tube1
  5439.                 playerpick[playerid]=1;
  5440.                 format(objectstring[objectindex[playerid]],128,"RT50mBend180Tube1");
  5441.                 jbobjectid[objectindex[playerid]]= 18834;
  5442.             }
  5443.             else if(listitem ==10)
  5444.             {
  5445.                 //18835 RBFunnel
  5446.                 playerpick[playerid]=1;
  5447.                 format(objectstring[objectindex[playerid]],128,"RBFunnel");
  5448.                 jbobjectid[objectindex[playerid]]= 18835;
  5449.             }
  5450.             else if(listitem ==11)
  5451.             {
  5452.                 //18836 RBHalfpipe
  5453.                 playerpick[playerid]=1;
  5454.                 format(objectstring[objectindex[playerid]],128,"RBHalfpipe");
  5455.                 jbobjectid[objectindex[playerid]]= 18836;
  5456.             }
  5457.             else if(listitem ==12)
  5458.             {
  5459.                 //18837 RB25mBend90Tube
  5460.                 playerpick[playerid]=1;
  5461.                 format(objectstring[objectindex[playerid]],128,"RB25mBend90Tube");
  5462.                 jbobjectid[objectindex[playerid]]= 18837;
  5463.             }
  5464.             else if(listitem ==13)
  5465.             {
  5466.                 //18838 RB25mBend180Tube
  5467.                 playerpick[playerid]=1;
  5468.                 format(objectstring[objectindex[playerid]],128,"RB25mBend180Tube");
  5469.                 jbobjectid[objectindex[playerid]]= 18838;
  5470.             }
  5471.             else if(listitem ==14)
  5472.             {
  5473.                 //18839 RB50mBend45Tube
  5474.                 playerpick[playerid]=1;
  5475.                 format(objectstring[objectindex[playerid]],128,"RB50mBend45Tube");
  5476.                 jbobjectid[objectindex[playerid]]= 18839;
  5477.             }
  5478.             else if(listitem ==15)
  5479.             {
  5480.                 //18840 RB50mBend90Tube
  5481.                 playerpick[playerid]=1;
  5482.                 format(objectstring[objectindex[playerid]],128,"RB50mBend90Tube");
  5483.                 jbobjectid[objectindex[playerid]]= 18840;
  5484.             }
  5485.             else if(listitem ==16)
  5486.             {
  5487.                 //18841 RB50mBend180Tube
  5488.                 playerpick[playerid]=1;
  5489.                 format(objectstring[objectindex[playerid]],128,"RB50mBend180Tube");
  5490.                 jbobjectid[objectindex[playerid]]= 18841;
  5491.             }
  5492.             else if(listitem ==17)
  5493.             {
  5494.                 //18842 RB50mTube
  5495.                 playerpick[playerid]=1;
  5496.                 format(objectstring[objectindex[playerid]],128,"RB50mTube");
  5497.                 jbobjectid[objectindex[playerid]]= 18842;
  5498.             }
  5499.             else if(listitem ==18)
  5500.             {
  5501.                 ShowPlayerDialog(playerid,DIALOG_TUBESP2,DIALOG_STYLE_LIST,"Tubes","Tube50m180Bend1\nTube50mGlass180Bend\nTube100m2\nSpiralTube1\nRTexturetube\nRTexturebridge\nRT25mBend90Tube1\nRT25mBend180Tube1\nRT50mBend45Tube1\nRT50mBend180Tube1\nRBFunnel\nRBHalfpipe\nRB25mBend90Tube\nRB25mBend180Tube\nRB50mBend45Tube\nRB50mBend90Tube\nRB50mBend180Tube\nRB50mTube\n prevpage","Ok","Back");
  5502.             }
  5503.         }
  5504.         else
  5505.         {
  5506.             ShowPlayerDialog(playerid,DIALOG_TUBES,DIALOG_STYLE_LIST,"Tubes","Page1\nPage2","Ok","Back");
  5507.         }
  5508.     }
  5509.     //--------------------------------------------------------------------------------------------------------------//
  5510.     //-------------------Removed-this-becuse-there-was-no-point-most-of-the-action-disapear-in-1-sec----------------//
  5511.     //--------------------------------------------------------------------------------------------------------------//
  5512.     /*else if(dialogid == DIALOG_PARTICLEEFFECTSP1)
  5513.     {
  5514.         if(response)
  5515.         {
  5516.             if(listitem ==0)
  5517.             {    //18668 blood_heli
  5518.                 playerpick[playerid]=1;
  5519.                 format(objectstring[objectindex[playerid]],128,"blood_heli");
  5520.                 jbobjectid[objectindex[playerid]]= 18668;
  5521.             }
  5522.             else if(listitem ==1)
  5523.             {
  5524.                 //18669 boat_prop
  5525.                 playerpick[playerid]=1;
  5526.                 format(objectstring[objectindex[playerid]],128,"boat_prop");
  5527.                 jbobjectid[objectindex[playerid]]= 18669;
  5528.             }
  5529.             else if(listitem ==2)
  5530.             {
  5531.                 //18670 camflash
  5532.                 playerpick[playerid]=1;
  5533.                 format(objectstring[objectindex[playerid]],128,"camflash");
  5534.                 jbobjectid[objectindex[playerid]]= 18670;
  5535.             }
  5536.             else if(listitem ==3)
  5537.             {
  5538.                 //18671 carwashspray
  5539.                 playerpick[playerid]=1;
  5540.                 format(objectstring[objectindex[playerid]],128,"carwashspray");
  5541.                 jbobjectid[objectindex[playerid]]= 18671;
  5542.             }
  5543.             else if(listitem ==4)
  5544.             {
  5545.                 //18672 cementp
  5546.                 playerpick[playerid]=1;
  5547.                 format(objectstring[objectindex[playerid]],128,"cementp");
  5548.                 jbobjectid[objectindex[playerid]]= 18672;
  5549.             }
  5550.             else if(listitem ==5)
  5551.             {
  5552.                 //18673 cigarette_smoke
  5553.                 playerpick[playerid]=1;
  5554.                 format(objectstring[objectindex[playerid]],128,"cigarette_smoke");
  5555.                 jbobjectid[objectindex[playerid]]= 18673;
  5556.             }
  5557.             else if(listitem ==6)
  5558.             {
  5559.                 //18674 cloudfast
  5560.                 playerpick[playerid]=1;
  5561.                 format(objectstring[objectindex[playerid]],128,"cloudfast");
  5562.                 jbobjectid[objectindex[playerid]]= 18674;
  5563.             }
  5564.             else if(listitem ==7)
  5565.             {
  5566.                 //18676 coke_trail
  5567.                 playerpick[playerid]=1;
  5568.                 format(objectstring[objectindex[playerid]],128,"coke_trail");
  5569.                 jbobjectid[objectindex[playerid]]= 18676;
  5570.             }
  5571.             else if(listitem ==8)
  5572.             {
  5573.                 //18677 exhale
  5574.                 playerpick[playerid]=1;
  5575.                 format(objectstring[objectindex[playerid]],128,"exhale");
  5576.                 jbobjectid[objectindex[playerid]]= 18677;
  5577.             }
  5578.             else if(listitem ==9)
  5579.             {//blood_heli\nboat_prop\ncamflash\ncarwashspray\ncementp\ncigarette_smoke\ncloudfast\ncoke_puff\ncoke_trail\nexhale\nexplosion_barrel\nexplosion_crate\nexplosion_door\nexplosion_fuel_car\nexplosion_large\nexplosion_medium\nexplosion_molotov\nexplosion_small\nexplosion_tiny\n nextpage
  5580.                 //18678 explosion_barrel
  5581.                 playerpick[playerid]=1;
  5582.                 format(objectstring[objectindex[playerid]],128,"explosion_barrel");
  5583.                 jbobjectid[objectindex[playerid]]= 18678;
  5584.             }
  5585.             else if(listitem ==10)
  5586.             {
  5587.                 //18679 explosion_crate
  5588.                 playerpick[playerid]=1;
  5589.                 format(objectstring[objectindex[playerid]],128,"explosion_crate");
  5590.                 jbobjectid[objectindex[playerid]]= 18679;
  5591.             }
  5592.             else if(listitem ==11)
  5593.             {
  5594.                 //18680 explosion_door
  5595.                 playerpick[playerid]=1;
  5596.                 format(objectstring[objectindex[playerid]],128,"explosion_door");
  5597.                 jbobjectid[objectindex[playerid]]= 18680;
  5598.             }
  5599.             else if(listitem ==12)
  5600.             {
  5601.                 //18681 explosion_fuel_car
  5602.                 playerpick[playerid]=1;
  5603.                 format(objectstring[objectindex[playerid]],128,"explosion_fuel_car");
  5604.                 jbobjectid[objectindex[playerid]]= 18681;
  5605.             }
  5606.             else if(listitem ==13)
  5607.             {
  5608.                 //18682 explosion_large
  5609.                 playerpick[playerid]=1;
  5610.                 format(objectstring[objectindex[playerid]],128,"explosion_large");
  5611.                 jbobjectid[objectindex[playerid]]= 18682;
  5612.             }
  5613.             else if(listitem ==14)
  5614.             {
  5615.                 //18683 explosion_medium
  5616.                 playerpick[playerid]=1;
  5617.                 format(objectstring[objectindex[playerid]],128,"explosion_medium");
  5618.                 jbobjectid[objectindex[playerid]]= 18683;
  5619.             }
  5620.             else if(listitem ==15)
  5621.             {
  5622.                 //18684 explosion_molotov
  5623.                 playerpick[playerid]=1;
  5624.                 format(objectstring[objectindex[playerid]],128,"explosion_molotov");
  5625.                 jbobjectid[objectindex[playerid]]= 18684;
  5626.             }
  5627.             else if(listitem ==16)
  5628.             {
  5629.                 //18685 explosion_small
  5630.                 playerpick[playerid]=1;
  5631.                 format(objectstring[objectindex[playerid]],128,"explosion_small");
  5632.                 jbobjectid[objectindex[playerid]]= 18685;
  5633.             }
  5634.             else if(listitem ==17)
  5635.             {
  5636.                 //18686 explosion_tiny
  5637.                 playerpick[playerid]=1;
  5638.                 format(objectstring[objectindex[playerid]],128,"explosion_tiny");
  5639.                 jbobjectid[objectindex[playerid]]= 18686;
  5640.             }
  5641.             else if(listitem ==18)
  5642.             {
  5643.                 ShowPlayerDialog(playerid,DIALOG_PARTICLEEFFECTSP2,DIALOG_STYLE_LIST,"Particle effects","extinguisher\nfire\nfire_bike+\nfire_car\nfire_large\nfire_med\nFlame\nflamethrower\ngunflash\ngunsmoke\nheli_dust\n nextpage\nbackpage","Ok","Back");
  5644.             }
  5645.         }
  5646.         else
  5647.         {
  5648.             ShowPlayerDialog(playerid,DIALOG_PARTICLEEFFECTS,DIALOG_STYLE_LIST,"Particle effects","Page1\nPage2\nPage3\nPage4\nPage5","Ok","Back");
  5649.         }
  5650.     }
  5651.     else if(dialogid == DIALOG_PARTICLEEFFECTSP2)
  5652.     {
  5653.         if(response)
  5654.         {
  5655.             if(listitem ==0)
  5656.             {
  5657.                 //18687 extinguisher
  5658.                 playerpick[playerid]=1;
  5659.                 format(objectstring[objectindex[playerid]],128,"extinguisher");
  5660.                 jbobjectid[objectindex[playerid]]= 18687;
  5661.             }
  5662.             else if(listitem ==1)
  5663.             {
  5664.                 //18688 fire
  5665.                 playerpick[playerid]=1;
  5666.                 format(objectstring[objectindex[playerid]],128,"fire");
  5667.                 jbobjectid[objectindex[playerid]]= 18688;
  5668.             }
  5669.             else if(listitem ==2)
  5670.             {
  5671.                 //18689 fire_bike+
  5672.                 playerpick[playerid]=1;
  5673.                 format(objectstring[objectindex[playerid]],128,"fire_bike+");
  5674.                 jbobjectid[objectindex[playerid]]= 18689;
  5675.             }
  5676.             else if(listitem ==3)
  5677.             {
  5678.                 //18690 fire_car
  5679.                 playerpick[playerid]=1;
  5680.                 format(objectstring[objectindex[playerid]],128,"fire_car");
  5681.                 jbobjectid[objectindex[playerid]]= 18690;
  5682.             }
  5683.             else if(listitem ==4)
  5684.             {
  5685.                 //fire_large 18691
  5686.                 playerpick[playerid]=1;
  5687.                 format(objectstring[objectindex[playerid]],128,"fire_large");
  5688.                 jbobjectid[objectindex[playerid]]= 18691;
  5689.             }
  5690.             else if(listitem ==5)
  5691.             {
  5692.                 //18692 fire_med
  5693.                 playerpick[playerid]=1;
  5694.                 format(objectstring[objectindex[playerid]],128,"fire_med");
  5695.                 jbobjectid[objectindex[playerid]]= 18692;
  5696.             }
  5697.             else if(listitem ==6)
  5698.             {
  5699.                 //18693 Flame99
  5700.                 playerpick[playerid]=1;
  5701.                 format(objectstring[objectindex[playerid]],128,"Flame99");
  5702.                 jbobjectid[objectindex[playerid]]= 18693;
  5703.             }
  5704.             else if(listitem ==7)
  5705.             {
  5706.                 //18694 flamethrower
  5707.                 playerpick[playerid]=1;
  5708.                 format(objectstring[objectindex[playerid]],128,"flamethrower");
  5709.                 jbobjectid[objectindex[playerid]]= 18694;
  5710.             }
  5711.             else if(listitem ==8)
  5712.             {
  5713.                 //18695 gunflash
  5714.                 playerpick[playerid]=1;
  5715.                 format(objectstring[objectindex[playerid]],128,"gunflash");
  5716.                 jbobjectid[objectindex[playerid]]= 18695;
  5717.             }
  5718.             else if(listitem ==9)
  5719.             {
  5720.                 //18696 gunsmoke
  5721.                 playerpick[playerid]=1;
  5722.                 format(objectstring[objectindex[playerid]],128,"gunsmoke");
  5723.                 jbobjectid[objectindex[playerid]]= 18696;
  5724.             }
  5725.             else if(listitem ==10)
  5726.             {
  5727.                 //18697 heli_dust
  5728.                 playerpick[playerid]=1;
  5729.                 format(objectstring[objectindex[playerid]],128,"heli_dust");
  5730.                 jbobjectid[objectindex[playerid]]= 18697;
  5731.             }
  5732.             else if(listitem ==11)
  5733.             {
  5734.                 ShowPlayerDialog(playerid,DIALOG_PARTICLEEFFECTSP3,DIALOG_STYLE_LIST,"Particle effects","insects\njetpack\njetthrust\nmolotov_flame\nnitro\noverheat_car\noverheat_car_elec\npetrolcan\nprt_blood\nprt_boatsplash\nprt_bubble\nprt_cardebris\nprt_collisionsmoke\nprt_glass\nprt_gunshell\nprt_sand2\nprt_sand\n Next page\nbackpage","Ok","Back");
  5735.             }
  5736.             else if(listitem ==12)
  5737.             {
  5738.                 ShowPlayerDialog(playerid,DIALOG_PARTICLEEFFECTSP1,DIALOG_STYLE_LIST,"Particle effects","blood_heli\nboat_prop\ncamflash\ncarwashspray\ncementp\ncigarette_smoke\ncloudfast\ncoke_puff\ncoke_trail\nexhale\nexplosion_barrel\nexplosion_crate\nexplosion_door\nexplosion_fuel_car\nexplosion_large\nexplosion_medium\nexplosion_molotov\nexplosion_small\nexplosion_tiny\n nextpage","Ok","Back");
  5739.             }
  5740.         }
  5741.         else
  5742.         {
  5743.             ShowPlayerDialog(playerid,DIALOG_PARTICLEEFFECTS,DIALOG_STYLE_LIST,"Particle effects","Page1\nPage2\nPage3\nPage4\nPage5","Ok","Back");
  5744.         }
  5745.     }
  5746.     else if(dialogid == DIALOG_PARTICLEEFFECTSP3)
  5747.     {
  5748.         if(response)
  5749.         {
  5750.             if(listitem ==0)
  5751.             {
  5752.                 //18698 insects
  5753.                 playerpick[playerid]=1;
  5754.                 format(objectstring[objectindex[playerid]],128,"insects");
  5755.                 jbobjectid[objectindex[playerid]]= 18698;
  5756.             }
  5757.             else if(listitem ==1)
  5758.             {
  5759.                 //18699 jetpack
  5760.                 playerpick[playerid]=1;
  5761.                 format(objectstring[objectindex[playerid]],128,"jetpack");
  5762.                 jbobjectid[objectindex[playerid]]= 18699;
  5763.             }
  5764.             else if(listitem ==2)
  5765.             {
  5766.                 //18700 jetthrust
  5767.                 playerpick[playerid]=1;
  5768.                 format(objectstring[objectindex[playerid]],128,"jetthrust");
  5769.                 jbobjectid[objectindex[playerid]]= 18700;
  5770.             }
  5771.             else if(listitem ==3)
  5772.             {
  5773.                 //18701 molotov_flame
  5774.                 playerpick[playerid]=1;
  5775.                 format(objectstring[objectindex[playerid]],128,"molotov_flame");
  5776.                 jbobjectid[objectindex[playerid]]= 18701;
  5777.             }
  5778.             else if(listitem ==4)
  5779.             {
  5780.                 //18702 nitro
  5781.                 playerpick[playerid]=1;
  5782.                 format(objectstring[objectindex[playerid]],128,"nitro");
  5783.                 jbobjectid[objectindex[playerid]]= 18702;
  5784.             }
  5785.             else if(listitem ==5)
  5786.             {
  5787.                 //18703 overheat_car
  5788.                 playerpick[playerid]=1;
  5789.                 format(objectstring[objectindex[playerid]],128,"overheat_car");
  5790.                 jbobjectid[objectindex[playerid]]= 18703;
  5791.             }
  5792.             else if(listitem ==6)
  5793.             {
  5794.                 //18704 overheat_car_elec
  5795.                 playerpick[playerid]=1;
  5796.                 format(objectstring[objectindex[playerid]],128,"overheat_car_elec");
  5797.                 jbobjectid[objectindex[playerid]]= 18704;
  5798.             }
  5799.             else if(listitem ==7)
  5800.             {
  5801.                 //18705 petrolcan
  5802.                 playerpick[playerid]=1;
  5803.                 format(objectstring[objectindex[playerid]],128,"petrolcan");
  5804.                 jbobjectid[objectindex[playerid]]= 18705;
  5805.             }
  5806.             else if(listitem ==8)
  5807.             {
  5808.                 //18706 prt_blood
  5809.                 playerpick[playerid]=1;
  5810.                 format(objectstring[objectindex[playerid]],128,"prt_blood");
  5811.                 jbobjectid[objectindex[playerid]]= 18706;
  5812.             }
  5813.             else if(listitem ==9)
  5814.             {
  5815.                 //18707 prt_boatsplash
  5816.                 playerpick[playerid]=1;
  5817.                 format(objectstring[objectindex[playerid]],128,"prt_boatsplash");
  5818.                 jbobjectid[objectindex[playerid]]= 18707;
  5819.             }
  5820.             else if(listitem ==10)
  5821.             {
  5822.                 //18708 prt_bubble
  5823.                 playerpick[playerid]=1;
  5824.                 format(objectstring[objectindex[playerid]],128,"prt_bubble");
  5825.                 jbobjectid[objectindex[playerid]]= 18708;
  5826.             }
  5827.             else if(listitem ==11)
  5828.             {
  5829.                 //18709 prt_cardebris
  5830.                 playerpick[playerid]=1;
  5831.                 format(objectstring[objectindex[playerid]],128,"prt_cardebris");
  5832.                 jbobjectid[objectindex[playerid]]= 18709;
  5833.             }
  5834.             else if(listitem ==12)
  5835.             {
  5836.                 //18710 prt_collisionsmoke
  5837.                 playerpick[playerid]=1;
  5838.                 format(objectstring[objectindex[playerid]],128,"prt_collisionsmoke");
  5839.                 jbobjectid[objectindex[playerid]]= 18710;
  5840.             }
  5841.             else if(listitem ==13)
  5842.             {
  5843.                 //18711 prt_glass
  5844.                 playerpick[playerid]=1;
  5845.                 format(objectstring[objectindex[playerid]],128,"prt_glass");
  5846.                 jbobjectid[objectindex[playerid]]= 18711;
  5847.             }
  5848.             else if(listitem ==14)
  5849.             {
  5850.                 //18712 prt_gunshell
  5851.                 playerpick[playerid]=1;
  5852.                 format(objectstring[objectindex[playerid]],128,"prt_gunshell");
  5853.                 jbobjectid[objectindex[playerid]]= 18712;
  5854.             }
  5855.             else if(listitem ==15)
  5856.             {
  5857.                 //18713 prt_sand2
  5858.                 playerpick[playerid]=1;
  5859.                 format(objectstring[objectindex[playerid]],128,"prt_sand2");
  5860.                 jbobjectid[objectindex[playerid]]= 18713;
  5861.             }
  5862.             else if(listitem ==16)
  5863.             {
  5864.                 //18714 prt_sand
  5865.                 playerpick[playerid]=1;
  5866.                 format(objectstring[objectindex[playerid]],128,"prt_sand");
  5867.                 jbobjectid[objectindex[playerid]]= 18714;
  5868.             }
  5869.             else if(listitem ==17)
  5870.             {
  5871.                 ShowPlayerDialog(playerid,DIALOG_PARTICLEEFFECTSP4,DIALOG_STYLE_LIST,"Particle effects","prt_smoke_huge\nprt_smoke_expand\nprt_spark\nprt_spark_2\nprt_wake\nprt_watersplash\nprt_wheeldirt\npuke\nriot_smoke\nshootlight\nsmoke30lit\nsmoke30m\nsmoke50lit\nsmoke_flare\nspraycan\n nextpage\nbackpage","Ok","Back");
  5872.             }
  5873.             else if(listitem ==18)
  5874.             {
  5875.                 ShowPlayerDialog(playerid,DIALOG_PARTICLEEFFECTSP2,DIALOG_STYLE_LIST,"Particle effects","extinguisher\nfire\nfire_bike+\nfire_car\nfire_large\nfire_med\nFlame\nflamethrower\ngunflash\ngunsmoke\nheli_dust\n nextpage\nbackpage","Ok","Back");
  5876.             }
  5877.         }
  5878.         else
  5879.         {
  5880.             ShowPlayerDialog(playerid,DIALOG_PARTICLEEFFECTS,DIALOG_STYLE_LIST,"Particle effects","Page1\nPage2\nPage3\nPage4\nPage5","Ok","Back");
  5881.         }
  5882.     }
  5883.     else if(dialogid == DIALOG_PARTICLEEFFECTSP4)
  5884.     {
  5885.         if(response)
  5886.         {
  5887.             if(listitem ==0)
  5888.             {
  5889.                 //18715 prt_smoke_huge
  5890.                 playerpick[playerid]=1;
  5891.                 format(objectstring[objectindex[playerid]],128,"prt_smoke_huge");
  5892.                 jbobjectid[objectindex[playerid]]= 18715;
  5893.             }
  5894.             else if(listitem ==1)
  5895.             {
  5896.                 //18716 prt_smoke_expand
  5897.                 playerpick[playerid]=1;
  5898.                 format(objectstring[objectindex[playerid]],128,"prt_smoke_expand");
  5899.                 jbobjectid[objectindex[playerid]]= 18716;
  5900.             }
  5901.             else if(listitem ==2)
  5902.             {
  5903.                 //prt_spark 18717
  5904.                 playerpick[playerid]=1;
  5905.                 format(objectstring[objectindex[playerid]],128,"prt_spark");
  5906.                 jbobjectid[objectindex[playerid]]= 18717;
  5907.             }
  5908.             else if(listitem ==3)
  5909.             {
  5910.                 //18718 prt_spark_2
  5911.                 playerpick[playerid]=1;
  5912.                 format(objectstring[objectindex[playerid]],128,"prt_spark_2");
  5913.                 jbobjectid[objectindex[playerid]]= 18718;
  5914.             }
  5915.             else if(listitem ==4)
  5916.             {
  5917.                 //18719 prt_wake
  5918.                 playerpick[playerid]=1;
  5919.                 format(objectstring[objectindex[playerid]],128,"prt_wake");
  5920.                 jbobjectid[objectindex[playerid]]= 18719;
  5921.             }
  5922.             else if(listitem ==5)
  5923.             {
  5924.                 //18720 prt_watersplash
  5925.                 playerpick[playerid]=1;
  5926.                 format(objectstring[objectindex[playerid]],128,"prt_watersplash");
  5927.                 jbobjectid[objectindex[playerid]]= 18720;
  5928.             }
  5929.             else if(listitem ==6)
  5930.             {
  5931.                 //18721 prt_wheeldirt
  5932.                 playerpick[playerid]=1;
  5933.                 format(objectstring[objectindex[playerid]],128,"prt_wheeldirt");
  5934.                 jbobjectid[objectindex[playerid]]= 18721;
  5935.             }
  5936.             else if(listitem ==7)
  5937.             {
  5938.                 //18722 puke
  5939.                 playerpick[playerid]=1;
  5940.                 format(objectstring[objectindex[playerid]],128,"puke");
  5941.                 jbobjectid[objectindex[playerid]]= 18722;
  5942.             }
  5943.             else if(listitem ==8)
  5944.             {
  5945.                 //18723 riot_smoke
  5946.                 playerpick[playerid]=1;
  5947.                 format(objectstring[objectindex[playerid]],128,"riot_smoke");
  5948.                 jbobjectid[objectindex[playerid]]= 18723;
  5949.             }
  5950.             else if(listitem ==9)
  5951.             {
  5952.                 //18724 shootlight
  5953.                 playerpick[playerid]=1;
  5954.                 format(objectstring[objectindex[playerid]],128,"shootlight");
  5955.                 jbobjectid[objectindex[playerid]]= 18724;
  5956.             }
  5957.             else if(listitem ==10)
  5958.             {
  5959.                 //18725 smoke30lit
  5960.                 playerpick[playerid]=1;
  5961.                 format(objectstring[objectindex[playerid]],128,"smoke30lit");
  5962.                 jbobjectid[objectindex[playerid]]= 18725;
  5963.             }
  5964.             else if(listitem ==11)
  5965.             {
  5966.                 //18726 smoke30m
  5967.                 playerpick[playerid]=1;
  5968.                 format(objectstring[objectindex[playerid]],128,"smoke30m");
  5969.                 jbobjectid[objectindex[playerid]]= 18726;
  5970.             }
  5971.             else if(listitem ==12)
  5972.             {
  5973.                 //18727 smoke50lit
  5974.                 playerpick[playerid]=1;
  5975.                 format(objectstring[objectindex[playerid]],128,"smoke50lit");
  5976.                 jbobjectid[objectindex[playerid]]= 18727;
  5977.             }
  5978.             else if(listitem ==13)
  5979.             {
  5980.                 //18728 smoke_flare
  5981.                 playerpick[playerid]=1;
  5982.                 format(objectstring[objectindex[playerid]],128,"smoke_flare");
  5983.                 jbobjectid[objectindex[playerid]]= 18728;
  5984.             }
  5985.             else if(listitem ==14)
  5986.             {
  5987.                 //18729 spraycan
  5988.                 playerpick[playerid]=1;
  5989.                 format(objectstring[objectindex[playerid]],128,"spraycan");
  5990.                 jbobjectid[objectindex[playerid]]= 18729;
  5991.             }
  5992.             else if(listitem ==15)
  5993.             {
  5994.                 ShowPlayerDialog(playerid,DIALOG_PARTICLEEFFECTSP5,DIALOG_STYLE_LIST,"Particle effects","tank_fire\nteargas\nteargasAD\ntree_hit_fir\ntree_hit_palm\nvent2\nvent\nwallbust\nwater_fnt_tme\nwater_fountain\nwater_hydrant\nwater_ripples\nwater_speed\nwater_splash\nwater_splash_big\nwater_splsh_sml\nwater_swim\nwaterfall_end\nWS_factorysmoke\nbackpage","Ok","Back");
  5995.             }
  5996.             else if(listitem ==16)
  5997.             {
  5998.                 ShowPlayerDialog(playerid,DIALOG_PARTICLEEFFECTSP3,DIALOG_STYLE_LIST,"Particle effects","insects\njetpack\njetthrust\nmolotov_flame\nnitro\noverheat_car\noverheat_car_elec\npetrolcan\nprt_blood\nprt_boatsplash\nprt_bubble\nprt_cardebris\nprt_collisionsmoke\nprt_glass\nprt_gunshell\nprt_sand2\nprt_sand\n Next page\nbackpage","Ok","Back");
  5999.             }
  6000.         }
  6001.         else
  6002.         {
  6003.             ShowPlayerDialog(playerid,DIALOG_PARTICLEEFFECTS,DIALOG_STYLE_LIST,"Particle effects","Page1\nPage2\nPage3\nPage4\nPage5","Ok","Back");
  6004.         }
  6005.     }
  6006.     else if(dialogid == DIALOG_PARTICLEEFFECTSP5)
  6007.     {
  6008.         if(response)
  6009.         {
  6010.             if(listitem ==0)
  6011.             {
  6012.                 //18730 tank_fire
  6013.                 playerpick[playerid]=1;
  6014.                 format(objectstring[objectindex[playerid]],128,"tank_fire");
  6015.                 jbobjectid[objectindex[playerid]]= 18730;
  6016.             }
  6017.             else if(listitem ==1)
  6018.             {
  6019.                 //18731 teargas99
  6020.                 playerpick[playerid]=1;
  6021.                 format(objectstring[objectindex[playerid]],128,"teargas99");
  6022.                 jbobjectid[objectindex[playerid]]= 18731;
  6023.             }
  6024.             else if(listitem ==2)
  6025.             {
  6026.                 //18732 teargasAD
  6027.                 playerpick[playerid]=1;
  6028.                 format(objectstring[objectindex[playerid]],128,"teargasAD");
  6029.                 jbobjectid[objectindex[playerid]]= 18732;
  6030.             }
  6031.             else if(listitem ==3)
  6032.             {
  6033.                 //18733 tree_hit_fir
  6034.                 playerpick[playerid]=1;
  6035.                 format(objectstring[objectindex[playerid]],128,"tree_hit_fir");
  6036.                 jbobjectid[objectindex[playerid]]= 18733;
  6037.             }
  6038.             else if(listitem ==4)
  6039.             {
  6040.                 //18734 tree_hit_palm
  6041.                 playerpick[playerid]=1;
  6042.                 format(objectstring[objectindex[playerid]],128,"tree_hit_palm");
  6043.                 jbobjectid[objectindex[playerid]]= 18734;
  6044.             }
  6045.             else if(listitem ==5)
  6046.             {
  6047.                 //18735 vent2
  6048.                 playerpick[playerid]=1;
  6049.                 format(objectstring[objectindex[playerid]],128,"vent2");
  6050.                 jbobjectid[objectindex[playerid]]= 18735;
  6051.             }
  6052.             else if(listitem ==6)
  6053.             {
  6054.                 //18736 vent
  6055.                 playerpick[playerid]=1;
  6056.                 format(objectstring[objectindex[playerid]],128,"vent");
  6057.                 jbobjectid[objectindex[playerid]]= 18736;
  6058.             }
  6059.             else if(listitem ==7)
  6060.             {
  6061.                 //18737 wallbust
  6062.                 playerpick[playerid]=1;
  6063.                 format(objectstring[objectindex[playerid]],128,"wallbust");
  6064.                 jbobjectid[objectindex[playerid]]= 18737;
  6065.             }
  6066.             else if(listitem ==8)
  6067.             {
  6068.                 //18738 water_fnt_tme
  6069.                 playerpick[playerid]=1;
  6070.                 format(objectstring[objectindex[playerid]],128,"water_fnt_tme");
  6071.                 jbobjectid[objectindex[playerid]]= 18738;
  6072.             }
  6073.             else if(listitem ==9)
  6074.             {
  6075.                 //18739 water_fountain
  6076.                 playerpick[playerid]=1;
  6077.                 format(objectstring[objectindex[playerid]],128,"water_fountain");
  6078.                 jbobjectid[objectindex[playerid]]= 18739;
  6079.             }
  6080.             else if(listitem ==10)
  6081.             {
  6082.                 //18740 water_hydrant
  6083.                 playerpick[playerid]=1;
  6084.                 format(objectstring[objectindex[playerid]],128,"water_hydrant");
  6085.                 jbobjectid[objectindex[playerid]]= 18740;
  6086.             }
  6087.             else if(listitem ==11)
  6088.             {
  6089.                 //18741 water_ripples
  6090.                 playerpick[playerid]=1;
  6091.                 format(objectstring[objectindex[playerid]],128,"water_ripples");
  6092.                 jbobjectid[objectindex[playerid]]= 18741;
  6093.             }
  6094.             else if(listitem ==12)
  6095.             {
  6096.                 //18742 water_speed
  6097.                 playerpick[playerid]=1;
  6098.                 format(objectstring[objectindex[playerid]],128,"water_speed");
  6099.                 jbobjectid[objectindex[playerid]]= 18742;
  6100.             }
  6101.             else if(listitem ==13)
  6102.             {
  6103.                 //18743 water_splash
  6104.                 playerpick[playerid]=1;
  6105.                 format(objectstring[objectindex[playerid]],128,"water_splash");
  6106.                 jbobjectid[objectindex[playerid]]= 18743;
  6107.             }
  6108.             else if(listitem ==14)
  6109.             {
  6110.                 //18744 water_splash_big
  6111.                 playerpick[playerid]=1;
  6112.                 format(objectstring[objectindex[playerid]],128,"water_splash_big");
  6113.                 jbobjectid[objectindex[playerid]]= 18744;
  6114.             }
  6115.             else if(listitem ==15)
  6116.             {
  6117.                 //18745 water_splsh_sml
  6118.                 playerpick[playerid]=1;
  6119.                 format(objectstring[objectindex[playerid]],128,"water_splsh_sml");
  6120.                 jbobjectid[objectindex[playerid]]= 18745;
  6121.             }
  6122.             else if(listitem ==16)
  6123.             {
  6124.                 //18746 water_swim
  6125.                 playerpick[playerid]=1;
  6126.                 format(objectstring[objectindex[playerid]],128,"water_swim");
  6127.                 jbobjectid[objectindex[playerid]]= 18746;
  6128.             }
  6129.             else if(listitem ==17)
  6130.             {
  6131.                 //18747 waterfall_end
  6132.                 playerpick[playerid]=1;
  6133.                 format(objectstring[objectindex[playerid]],128,"waterfall_end");
  6134.                 jbobjectid[objectindex[playerid]]= 18747;
  6135.             }
  6136.             else if(listitem ==18)
  6137.             {
  6138.                 //18748 WS_factorysmoke
  6139.                 playerpick[playerid]=1;
  6140.                 format(objectstring[objectindex[playerid]],128,"WS_factorysmoke");
  6141.                 jbobjectid[objectindex[playerid]]= 18748;
  6142.             }
  6143.             else if(listitem ==19)
  6144.             {
  6145.                 ShowPlayerDialog(playerid,DIALOG_PARTICLEEFFECTSP4,DIALOG_STYLE_LIST,"Particle effects","prt_smoke_huge\nprt_smoke_expand\nprt_spark\nprt_spark_2\nprt_wake\nprt_watersplash\nprt_wheeldirt\npuke\nriot_smoke\nshootlight\nsmoke30lit\nsmoke30m\nsmoke50lit\nsmoke_flare\nspraycan\n nextpage\nbackpage","Ok","Back");
  6146.             }
  6147.         }
  6148.         else
  6149.         {
  6150.             ShowPlayerDialog(playerid,DIALOG_PARTICLEEFFECTS,DIALOG_STYLE_LIST,"Particle effects","Page1\nPage2\nPage3\nPage4\nPage5","Ok","Back");
  6151.         }
  6152.     }*/
  6153.     else if(dialogid == DIALOG_CUSTOMINPUTSTRING)
  6154.     {
  6155.         if(response)
  6156.         {
  6157.             playerpick[playerid]=1;
  6158.             format(objectstring[objectindex[playerid]],128,"%s",inputtext);
  6159.         }
  6160.         else
  6161.         {
  6162.             format(objectstring[objectindex[playerid]],128,"Custom Object");
  6163.             playerpick[playerid] = 1;
  6164.         }
  6165.     }
  6166.     else if(dialogid == DIALOG_FAVORITEADDDELETE)
  6167.     {//Addobject\nDeleteobject\nInport object to game
  6168.         if(response)
  6169.         {
  6170.             favoritedialogstring = "";
  6171.             for(new count =0;count < 11;count++)
  6172.             {
  6173.                 format(savestringname,sizeof(savestringname),"slotstate[%i]",count);
  6174.                 slotstate[count] = dini_Int(objectsfilename,savestringname);
  6175.                 if((slotstate[count])==1)
  6176.                 {
  6177.                     format(savestringname,sizeof(savestringname),"slotstring[%i]",count);
  6178.                     format(slotstring[count],sizeof(slotstring), "%s",dini_Get(objectsfilename,savestringname));
  6179.                     format(savestringname,sizeof(savestringname),"slotobjectid[%i]",count);
  6180.                     slotobjectid[count] = dini_Int(objectsfilename,savestringname);
  6181.                 }
  6182.                 else if((slotstate[count])==0)
  6183.                 {
  6184.                     format(slotstring[count],sizeof(slotstring),"Empty");
  6185.                     slotobjectid[count] =0;
  6186.                 }
  6187.                 format(string,sizeof(string),"%s",favoritedialogstring);
  6188.                 format(favoritedialogstring,sizeof(favoritedialogstring),"%s\n%s",string,slotstring[count]);
  6189.             }
  6190.             if(listitem ==0)
  6191.             {
  6192.                 ShowPlayerDialog(playerid,DIALOG_FAVORITEADD,DIALOG_STYLE_LIST,"Add favorite object",favoritedialogstring,"Ok","back");
  6193.             }
  6194.             else if(listitem ==1)
  6195.             {
  6196.                 ShowPlayerDialog(playerid,DIALOG_FAVORITEDELETE,DIALOG_STYLE_LIST,"Delete favorite object",favoritedialogstring,"Ok","back");
  6197.             }
  6198.             else if(listitem ==2)
  6199.             {
  6200.                 ShowPlayerDialog(playerid,DIALOG_FAVORITEINPORT,DIALOG_STYLE_LIST,"Inport favorite object",favoritedialogstring,"Ok","back");
  6201.             }
  6202.         }
  6203.         else
  6204.         {
  6205.             ShowPlayerDialog(playerid,DIALOG_ADDOBJECTS,DIALOG_STYLE_LIST, "Main Menu 'JBobjects'","Custom Input\nSA:MP Logos\nLand Masses\nBase Sections\nElevator from VC\nDM Cages\nRacing\nParkour\nSky Diving Platforms\nTunnel Sections\nRamps\nModular Road Sections\nModular Bridge Sections\nTubes and Funnels\nSpheres\nOthers\nFavorite","Ok","Cancel");
  6206.         }
  6207.     }
  6208.     else if(dialogid == DIALOG_FAVORITEADD)
  6209.     {
  6210.         if(response)
  6211.         {
  6212.             if(IsPlayerAdmince(playerid,4))
  6213.             {
  6214.                 if((slotstate[listitem])==0)
  6215.                 {
  6216.                     listitempicked[playerid] = listitem;
  6217.                     ShowPlayerDialog(playerid,DIALOG_FAVORITEINPUTOBJECTID,DIALOG_STYLE_INPUT,"Input object id","Please insert the object id you would like to save","Ok","Back");
  6218.                 }
  6219.                 else
  6220.                 {
  6221.                     ShowPlayerDialog(playerid,DIALOG_NOT,DIALOG_STYLE_MSGBOX,"ERROR","ERROR this box already has a favorite item in it delete it if you would like to but a diffrent object in this catagory","back","close");
  6222.                 }
  6223.             }
  6224.             else
  6225.             {
  6226.                 ShowPlayerDialog(playerid,DIALOG_NOT,DIALOG_STYLE_MSGBOX,"Not High Enough Admin","You are not High Enought Level Admin addobjects To Favorite, You have to be level 4 or Rcon Admin","back","close");
  6227.             }
  6228.         }
  6229.         else
  6230.         {
  6231.             ShowPlayerDialog(playerid,DIALOG_FAVORITEADDDELETE,DIALOG_STYLE_LIST,"Delete&Add","Addobject\nDeleteobject\nInport object to game","Ok","Back");
  6232.         }
  6233.     }
  6234.     else if(dialogid == DIALOG_FAVORITEDELETE)
  6235.     {
  6236.         if(response)
  6237.         {
  6238.             if(IsPlayerAdmince(playerid,4))
  6239.             {
  6240.                 if((slotstate[listitem]) ==1)
  6241.                 {
  6242.                     format(slotstring[listitem],sizeof(slotstring),"Empty");
  6243.                     dini_Set(objectsfilename, string,(""));
  6244.                     format(string,sizeof(string),"slotobjectid[%i]",listitem);
  6245.                     slotobjectid[listitem] = 0;
  6246.                     dini_IntSet(objectsfilename, string,(slotobjectid[listitem]));
  6247.                     slotstate[listitem] = 0;
  6248.                     format(string,sizeof(string),"slotstate[%i]",listitem);
  6249.                     dini_IntSet(objectsfilename, string, (slotstate[listitem]));
  6250.                 }
  6251.                 else
  6252.                 {
  6253.                     ShowPlayerDialog(playerid,DIALOG_NOT,DIALOG_STYLE_MSGBOX,"ERROR","ERROR this box does not contain and object in it","back","close");
  6254.                 }
  6255.             }
  6256.             else
  6257.             {
  6258.                 ShowPlayerDialog(playerid,DIALOG_NOT,DIALOG_STYLE_MSGBOX,"Not High Enough Admin","You are not High Enought Level Admin addobjects To Favorite, You have to be level 5 or Rcon Admin","back","close");
  6259.             }
  6260.         }
  6261.         else
  6262.         {
  6263.             ShowPlayerDialog(playerid,DIALOG_FAVORITEADDDELETE,DIALOG_STYLE_LIST,"Delete&Add","Addobject\nDeleteobject\nInport object to game","Ok","Back");
  6264.         }
  6265.     }
  6266.     else if(dialogid == DIALOG_FAVORITEINPORT)
  6267.     {
  6268.         if(response)
  6269.         {
  6270.             if((slotstate[listitem]) ==1)
  6271.             {
  6272.                 playerpick[playerid]=1;
  6273.                 format(objectstring[objectindex[playerid]],128,"%s",slotstring[listitem]);
  6274.                 jbobjectid[objectindex[playerid]]= slotobjectid[listitem];
  6275.             }
  6276.             else
  6277.             {
  6278.                 ShowPlayerDialog(playerid,DIALOG_NOT,DIALOG_STYLE_MSGBOX,"ERROR","ERROR you must have and object in the box inorder to spawn it","back","close");
  6279.             }
  6280.         }
  6281.         else
  6282.         {
  6283.             ShowPlayerDialog(playerid,DIALOG_FAVORITEADDDELETE,DIALOG_STYLE_LIST,"Delete&Add","Addobject\nDeleteobject\nInport object to game","Ok","Back");
  6284.         }
  6285.     }
  6286.     else if(dialogid == DIALOG_NOT)
  6287.     {
  6288.         if(response)
  6289.         {
  6290.             ShowPlayerDialog(playerid,DIALOG_FAVORITEADDDELETE,DIALOG_STYLE_LIST,"Delete&Add","Addobject\nDeleteobject\nInport object to game","Ok","Back");
  6291.         }
  6292.         else
  6293.         {
  6294.             SendClientMessage(playerid, RED, "You have closed the diolog boxes");
  6295.         }
  6296.     }
  6297.     else if(dialogid == DIALOG_FAVORITEINPUTOBJECTID)
  6298.     {
  6299.         if(response)
  6300.         {
  6301.             slotobjectid[listitempicked[playerid]] = strval(inputtext);
  6302.             ShowPlayerDialog(playerid,DIALOG_FAVORITEINPUTSTRING,DIALOG_STYLE_INPUT,"Input object name","Please enter the name of the object you would like to save","Ok","Back");
  6303.         }
  6304.         else
  6305.         {
  6306.             slotobjectid[listitempicked[playerid]] = 0;
  6307.             ShowPlayerDialog(playerid,DIALOG_FAVORITEADDDELETE,DIALOG_STYLE_LIST,"Delete&Add","Addobject\nDeleteobject\nInport object to game","Ok","Back");
  6308.         }
  6309.     }
  6310.     else if(dialogid == DIALOG_FAVORITEINPUTSTRING)
  6311.     {
  6312.         if(response)
  6313.         {
  6314.             format(slotstring[listitempicked[playerid]],sizeof(listitempicked),"%s",inputtext);
  6315.             format(string,sizeof(string),"slotstring[%i]",listitempicked[playerid]);
  6316.             dini_Set(objectsfilename, string,(slotstring[listitempicked[playerid]]));
  6317.             format(string,sizeof(string),"slotobjectid[%i]",listitempicked[playerid]);
  6318.             dini_IntSet(objectsfilename, string,(slotobjectid[listitempicked[playerid]]));
  6319.             slotstate[listitempicked[playerid]] = 1;
  6320.             format(string,sizeof(string),"slotstate[%i]",listitempicked[playerid]);
  6321.             dini_IntSet(objectsfilename, string, (slotstate[listitempicked[playerid]]));
  6322.             listitempicked[playerid] = 0;
  6323.         }
  6324.         else
  6325.         {
  6326.             ShowPlayerDialog(playerid,DIALOG_FAVORITEADDDELETE,DIALOG_STYLE_LIST,"Delete&Add","Addobject\nDeleteobject\nInport object to game","Ok","Back");
  6327.         }
  6328.     }
  6329.     if((playerpick[playerid])==1)
  6330.     {
  6331.         if((mapplayereditstate[playerid])==1)
  6332.         {
  6333.             new playerfilename[128];
  6334.             new slotid = mapplayerslotid[playerid];
  6335.             playerpick[playerid]=0;
  6336.             mapobjectmid[slotid][objectindex[playerid]] = jbobjectid[objectindex[playerid]];
  6337.             jbobjectid[objectindex[playerid]] = 0;
  6338.             format(playerfilename,sizeof(playerfilename),"%s",mapname[slotid]);
  6339.             GetPlayerPos(playerid,playermapx[slotid][objectindex[playerid]],playermapy[slotid][objectindex[playerid]],playermapz[slotid][objectindex[playerid]]);
  6340.             mapobject[slotid][objectindex[playerid]] = CreateDynamicObject(mapobjectmid[slotid][objectindex[playerid]],playermapx[slotid][objectindex[playerid]],playermapy[slotid][objectindex[playerid]],playermapz[slotid][objectindex[playerid]],playermapxrot[slotid][objectindex[playerid]],playermapyrot[slotid][objectindex[playerid]],playermapzrot[slotid][objectindex[playerid]]);
  6341.             SendClientMessage(playerid, LIGHTBLUE, "You have created an object");
  6342.             mapobjectstate[slotid][objectindex[playerid]] = 1;
  6343.             format(savestringname,sizeof(savestringname),"mapobjectstring[%i]",objectindex[playerid]);
  6344.             new mapstring[128];
  6345.             format(mapstring,sizeof(mapstring),"%s",objectstring[objectindex[playerid]]);
  6346.             format(objectstring[objectindex[playerid]],sizeof(objectstring),"");
  6347.             for(new i;i < MAX_PLAYERS;i++)
  6348.             {
  6349.                 if((showlabel[i])==1)
  6350.                 {
  6351.                     format(string,sizeof(string),"object:%s--ID:Objectid-%i-%i-Mid:%i-mapname:%s",mapstring,objectindex[playerid],slotid,mapobjectmid[slotid][objectindex[playerid]],mapname[slotid]);
  6352.                     mapobjectlabel[slotid][objectindex[playerid]] = CreatePlayer3DTextLabel(i,string,COLOR,playermapx[slotid][objectindex[playerid]],playermapy[slotid][objectindex[playerid]],playermapz[slotid][objectindex[playerid]],DISTANCELABEL,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0);
  6353.                 }
  6354.             }
  6355.             format(savestringname,sizeof(savestringname),"playermapx[%i]",objectindex[playerid]);
  6356.             dini_FloatSet(playerfilename,savestringname,(playermapx[slotid][objectindex[playerid]]));
  6357.             format(savestringname,sizeof(savestringname),"playermapy[%i]",objectindex[playerid]);
  6358.             dini_FloatSet(playerfilename,savestringname,(playermapy[slotid][objectindex[playerid]]));
  6359.             format(savestringname,sizeof(savestringname),"playermapz[%i]",objectindex[playerid]);
  6360.             dini_FloatSet(playerfilename,savestringname,(playermapz[slotid][objectindex[playerid]]));
  6361.             format(savestringname,sizeof(savestringname),"playermapxrot[%i]",objectindex[playerid]);
  6362.             dini_FloatSet(playerfilename,savestringname,(playermapxrot[slotid][objectindex[playerid]]));
  6363.             format(savestringname,sizeof(savestringname),"playermapyrot[%i]",objectindex[playerid]);
  6364.             dini_FloatSet(playerfilename,savestringname,(playermapyrot[slotid][objectindex[playerid]]));
  6365.             format(savestringname,sizeof(savestringname),"playermapzrot[%i]",objectindex[playerid]);
  6366.             dini_FloatSet(playerfilename,savestringname,(playermapzrot[slotid][objectindex[playerid]]));
  6367.             format(savestringname,sizeof(savestringname),"mapobjectstring[%i]",objectindex[playerid]);
  6368.             dini_Set(playerfilename,savestringname,(mapstring));
  6369.             format(savestringname,sizeof(savestringname),"mapobjectmid[%i]",objectindex[playerid]);
  6370.             dini_IntSet(playerfilename,savestringname,(mapobjectmid[slotid][objectindex[playerid]]));
  6371.             format(savestringname,sizeof(savestringname),"mapobjectstate[%i]",objectindex[playerid]);
  6372.             dini_IntSet(playerfilename,savestringname,(mapobjectstate[slotid][objectindex[playerid]]));
  6373.             if((allowence[0][playerid])==1)
  6374.             {
  6375.                 if((playersinput)==1)
  6376.                 {
  6377.                     for(new count=0;count < MAX_PLAYERS;count++)
  6378.                     {
  6379.                         if(IsPlayerConnected(count))
  6380.                         {
  6381.                             if(IsPlayerAdmince(count,3))
  6382.                             {
  6383.                                 new name[128];
  6384.                                 GetPlayerName(playerid,name,sizeof(name));
  6385.                                 format(string,128,"%s has addobject id:%i-%i. The objectid of this is %i. mapname: %s",name,objectindex[playerid],slotid,mapobjectmid[slotid][objectindex[playerid]],mapname[slotid]);
  6386.                                 SendClientMessage(count,DARKBLUE,string);
  6387.                             }
  6388.                         }
  6389.                     }
  6390.                 }
  6391.             }
  6392.             return 1;
  6393.         }
  6394.         playerpick[playerid]=0;
  6395.         objectcolor[objectindex[playerid]] = 0;
  6396.         objectstate[objectindex[playerid]] = 1;
  6397.         GetPlayerPos(playerid,objx[objectindex[playerid]],objy[objectindex[playerid]],objz[objectindex[playerid]]);
  6398.         objx[objectindex[playerid]] = objx[objectindex[playerid]]+5;
  6399.         objects[objectindex[playerid]] = CreateDynamicObject(jbobjectid[objectindex[playerid]],objx[objectindex[playerid]],objy[objectindex[playerid]],objz[objectindex[playerid]],objxrot[objectindex[playerid]],objyrot[objectindex[playerid]],objzrot[objectindex[playerid]],0);
  6400.         format(savestringname,sizeof(savestringname),"objx[%i]",objectindex[playerid]);
  6401.         dini_FloatSet(objectsfilename,savestringname,(objx[objectindex[playerid]]));
  6402.         format(savestringname,sizeof(savestringname),"objy[%i]",objectindex[playerid]);
  6403.         dini_FloatSet(objectsfilename,savestringname,(objy[objectindex[playerid]]));
  6404.         format(savestringname,sizeof(savestringname),"objz[%i]",objectindex[playerid]);
  6405.         dini_FloatSet(objectsfilename,savestringname,(objz[objectindex[playerid]]));
  6406.         format(savestringname,sizeof(savestringname),"objxrot[%i]",objectindex[playerid]);
  6407.         dini_FloatSet(objectsfilename,savestringname,(objxrot[objectindex[playerid]]));
  6408.         format(savestringname,sizeof(savestringname),"objyrot[%i]",objectindex[playerid]);
  6409.         dini_FloatSet(objectsfilename,savestringname,(objyrot[objectindex[playerid]]));
  6410.         format(savestringname,sizeof(savestringname),"objzrot[%i]",objectindex[playerid]);
  6411.         dini_FloatSet(objectsfilename,savestringname,(objzrot[objectindex[playerid]]));
  6412.         format(savestringname,sizeof(savestringname),"object[%i]",objectindex[playerid]);
  6413.         dini_IntSet(objectsfilename,savestringname,(jbobjectid[objectindex[playerid]]));
  6414.         format(savestringname,sizeof(savestringname),"objectcolor[%i]",objectindex[playerid]);
  6415.         dini_IntSet(objectsfilename,savestringname,(objectcolor[objectindex[playerid]]));
  6416.         format(savestringname,sizeof(savestringname),"objectlabel[%i]",objectindex[playerid]);
  6417.         dini_Set(objectsfilename,savestringname,(objectstring[objectindex[playerid]]));
  6418.         format(savestringname,sizeof(savestringname),"objectstate[%i]",objectindex[playerid]);
  6419.         dini_IntSet(objectsfilename,savestringname,(objectstate[objectindex[playerid]]));
  6420.         for(new i; i < MAX_PLAYERS;i++)
  6421.         {
  6422.             if(IsPlayerConnected(i))
  6423.             {
  6424.                 if((showlabel[i])==1)
  6425.                 {
  6426.                     format(string,128,"object:%s--ID:%i-Objectid-%i",objectstring[objectindex[playerid]],objectindex[playerid],jbobjectid[objectindex[playerid]]);
  6427.                     objectlabel[objectindex[playerid]] = CreatePlayer3DTextLabel(i,string,COLOR,objx[objectindex[playerid]],objy[objectindex[playerid]],objz[objectindex[playerid]],DISTANCELABEL,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0);
  6428.                 }
  6429.             }
  6430.         }
  6431.         if((allowence[0][playerid])==1)
  6432.         {
  6433.             if((playersinput)==1)
  6434.             {
  6435.                 for(new count=0;count < MAX_PLAYERS;count++)
  6436.                 {
  6437.                     if(IsPlayerConnected(count))
  6438.                     {
  6439.                         if(IsPlayerAdmince(count,3))
  6440.                         {
  6441.                             new name[128];
  6442.                             GetPlayerName(playerid,name,sizeof(name));
  6443.                             format(string,128,"%s has addobject id:%i. The objectid of this is %i.",name,objectindex[playerid],jbobjectid[playerid]);
  6444.                             SendClientMessage(count,DARKBLUE,string);
  6445.                         }
  6446.                     }
  6447.                 }
  6448.             }
  6449.         }
  6450.     }
  6451.     return 0;
  6452. }
  6453. CloseMap(playerid)
  6454. {
  6455.     new slotid = mapplayerslotid[playerid];
  6456.     for(new count;count < MAX_OBJECTS;count++)
  6457.     {
  6458.         if((mapobjectstate[slotid][count])==1)
  6459.         {
  6460.             DestroyDynamicObject(mapobject[slotid][count]);
  6461.             for(new i;i < MAX_PLAYERS;i++)
  6462.             {
  6463.                 if(IsPlayerConnected(i))
  6464.                 {
  6465.                     DeletePlayer3DTextLabel(i, mapobjectlabel[slotid][count]);
  6466.                 }
  6467.             }
  6468.             mapobjectmid[slotid][count] = 0;
  6469.             playermapx[slotid][count] = 0;
  6470.             playermapy[slotid][count] = 0;
  6471.             playermapz[slotid][count] = 0;
  6472.             playermapxrot[slotid][count] = 0;
  6473.             playermapyrot[slotid][count] = 0;
  6474.             playermapzrot[slotid][count] = 0;
  6475.             mapobjectstate[slotid][count] = 0;
  6476.         }
  6477.     }
  6478.     mapplayereditstate[playerid] = 0;
  6479.     mapplayerslot[slotid] = 0;
  6480.     mapplayereditingname[slotid] = "";
  6481.     viewselected[playerid] =0;
  6482.     format(mapname[slotid],sizeof(mapname),"");
  6483.     mapplayerslotid[playerid] = 0;
  6484.  
  6485. }
  6486. stock IsPlayerAdmince(playerid,level)
  6487. {
  6488.     if(IsPlayerAdmin(playerid)||CustomAdmin(playerid,level))
  6489.     {
  6490.         return true;
  6491.     }
  6492.     else
  6493.     {
  6494.         return false;
  6495.     }
  6496. }
  6497. stock CustomAdmin(playerid,level)
  6498. {
  6499.     return CallLocalFunction("InputAdminSystem","ii",playerid,level);
  6500. }
Add Comment
Please, Sign In to add comment