horsemeat

JbobjectV1.4

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