horsemeat

JBobjectV1.5

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