horsemeat

jbobjectv1.4R1

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