Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //----------------------------------JB-----------------------------------//
- //-----------------------------Samp-objects------------------------------//
- //---------------------------------V1.6----------------------------------//
- //------------------------Gameman87/horsemeat----------------------------//
- //-----------------------------built-on-0.3x-----------------------------//
- //--------------------LastUpdate-for-0.3x-2,4,2014----------------------//
- //go here for the latest updates -- http://forum.sa-mp.com/showthread.php?p=2491930#post2491930
- //----------------------------------------Changes------------------------------------------------------//
- //The was how objects are counted has been change rather then having a object count I have change it to check the state of an object
- //Import map is not functioning more accurately and any position issues have been fixed
- //-----------------------------------------------------------------------------------------------------//
- #include <a_samp>//Thanks SA-MP developers
- #include <zcmd>//Thanks Zeex
- #include <sscanf2>//Thanks Y_Less
- #include <dini>//Thanks DracoBlue
- #include <streamer>//Thanks Incognito
- #define RED 0xFF0000ff
- #define DARKBLUE 0x0000FFff
- #define LIGHTBLUE 0x00E1FFff
- #define GREEN 0x22D451ff
- #define YELLOW 0xEAFF00ff
- #define BLUEGREEN 0xA5C9B0ff
- #define PINK 0xFF00CCff
- #define WHITE 0xFFFFFFff
- #define GREY 0x969696ff
- #define PURPLE 0x74007AAA
- #define ORANGE 0xFF7700ff
- #define COLOR YELLOW//You can change the Color of labels
- #define MAX 50
- #define DIALOG_ADDOBJECTS 5
- #define DIALOG_CUSTOMINPUT 6
- #define DIALOG_SAMPLOGOS 7
- #define DIALOG_PARTICLEEFFECTS 8
- #define DIALOG_LANDMASSES 9
- #define DIALOG_BASES 10
- #define DIALOG_ELEVATOR 11
- #define DIALOG_DMCAGES 12
- #define DIALOG_PARKOUR 14
- #define DIALOG_PLATFORMS 15
- #define DIALOG_TUNNELS 16
- #define DIALOG_RAMPS 17
- #define DIALOG_ROADS 18
- #define DIALOG_BRIDGES 19
- #define DIALOG_TUBES 20
- #define DIALOG_SPHERES 21
- #define DIALOG_OTHERS 22
- #define DIALOG_PARTICLEEFFECTSP1 23
- #define DIALOG_PARTICLEEFFECTSP2 24
- #define DIALOG_PARTICLEEFFECTSP3 25
- #define DIALOG_PARTICLEEFFECTSP4 26
- #define DIALOG_PARTICLEEFFECTSP5 27
- #define DIALOG_TUBESP1 28
- #define DIALOG_TUBESP2 29
- #define DIALOG_CUSTOMINPUTSTRING 30
- #define DIALOG_FAVORITEADDDELETE 31
- #define DIALOG_FAVORITEADD 32
- #define DIALOG_FAVORITEDELETE 33
- #define DIALOG_FAVORITEINPORT 34
- #define DIALOG_FAVORITEINPUTSTRING 35
- #define DIALOG_FAVORITEINPUTOBJECTID 36
- #define DIALOG_NOT 37
- #define LESSTHENZERO 38
- #define MAX_OPERATIONS 4
- #define MAPNAME 39
- #define OPENMAP 40
- #define OPENMAPINPUTEDIT 41
- #define OPENMAPINPUTVIEW 42
- #define OPENMAPLISTVIEW 43
- #define MAPNAMEEXITS 44
- #define MAPDOSENOTEXITS 45
- #define CLOSEMAP 46
- #define CLOSEMAPVIEW 47
- #define CLOSEMAPEDIT 48
- #define HOLDING(%0) ((newkeys & (%0)) == (%0))
- #define PRESSED(%0) (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
- #define RELEASED(%0) (((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0)))
- new Float:DISTANCELABEL = 25.0;
- new objectsfilename[128];
- new objectstate[MAX_OBJECTS];
- new objectindex[MAX_PLAYERS];
- new PlayerText3D:objectlabel[MAX_OBJECTS];
- new objects[MAX_OBJECTS];
- new jbobjectid[MAX_OBJECTS],playerpick[MAX_PLAYERS],objectstring[128][MAX_OBJECTS];
- new Float:objx[MAX_OBJECTS],Float:objy[MAX_OBJECTS],Float:objz[MAX_OBJECTS],Float:objxrot[MAX_OBJECTS],Float:objyrot[MAX_OBJECTS],Float:objzrot[MAX_OBJECTS];
- new editobjnum[MAX_PLAYERS];
- 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];
- new slotobjectid[12],slotstring[128][12],slotstate[12],favoritedialogstring[128],listitempicked[MAX_PLAYERS];
- new showlabel[MAX_PLAYERS];
- new allowence[4][MAX_PLAYERS],allowencejoin[MAX_OPERATIONS],playersinput;
- new hex:objectcolor[MAX_OBJECTS];
- new mapplayereditstate[MAX_PLAYERS] = 0;
- new Float:playermapx[MAX][MAX_OBJECTS],Float:playermapy[MAX][MAX_OBJECTS],Float:playermapz[MAX][MAX_OBJECTS],Float:playermapxrot[MAX][MAX_OBJECTS],Float:playermapyrot[MAX][MAX_OBJECTS],Float:playermapzrot[MAX][MAX_OBJECTS];
- new mapname[128][MAX];
- new mapobject[MAX][MAX_OBJECTS];
- new PlayerText3D:mapobjectlabel[MAX][MAX_OBJECTS];
- new mapplayereditingname[128][MAX];
- new mapplayerslot[MAX];
- new mapplayerslotid[MAX_PLAYERS];
- new mapobjectstate[MAX][MAX_OBJECTS];
- new mapobjectmid[MAX][MAX_OBJECTS];
- new edittype[MAX_PLAYERS];
- new viewobject[13][MAX_OBJECTS];
- new viewslot[13];
- new viewstring[128][13];
- new viewselected[MAX_PLAYERS];
- //top
- forward IsPlayerLoggingIntoAdmin();
- forward InputAdminSystem(playerid,level);
- /*public InputAdminSystem(playerid,level)
- {
- //put your custom admin system here and uncomment (do not leave blank unless commented
- return 1;
- }*/
- CMD:objecthelp(playerid,params[])
- {
- SendClientMessage(playerid,YELLOW, "/enablelabels/disablelabels/moveawayfromobject/getobject/openmap/createmap/closemap");
- SendClientMessage(playerid,YELLOW, "/addobject-/moveobject-/deleteobject-/copyobject-/gotoobject/setobject/setobjectcolor");
- SendClientMessage(playerid,YELLOW, "/deletemap /renameobject/importmap/disallowplayerbuildonjoin-/allowplayerbuildonjoin-/setplayerlabelstate");
- SendClientMessage(playerid,YELLOW, "/deleteallobjects-/labeldistance-/jbobjectscheck-/allowplayer-/exportmap");
- return 1;
- }
- CMD:createmap(playerid,params[])
- {
- if(IsPlayerAdmince(playerid,3)||(allowence[3][playerid])==1)
- {
- if((mapplayereditstate[playerid])==0)
- {
- ShowPlayerDialog(playerid,MAPNAME,DIALOG_STYLE_INPUT,"Input","Please input the name of the map you wish to create","Ok","Cancel");
- }
- else
- {
- SendClientMessage(playerid, RED, "You have to close the map before you can create a new one");
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "You have to be allowed to edit for every thing or you have to be admin");
- }
- return 1;
- }
- CMD:openmap(playerid, params[])
- {
- if(IsPlayerAdmince(playerid,3)||(allowence[3][playerid])==1)
- {
- ShowPlayerDialog(playerid,OPENMAP,DIALOG_STYLE_MSGBOX,"Select","you can ether edit a map or open it just for viewing purposes","Edit","View");
- SendClientMessageToAll(ORANGE,"!Note someone is loading a map this might lag depening on the size of the map");
- }
- else
- {
- SendClientMessage(playerid, RED, "you have to be allowed to buildmaps or be admin inorder to use this command");
- }
- return 1;
- }
- CMD:closemap(playerid, params[])
- {
- if(IsPlayerAdmince(playerid,3)||(allowence[3][playerid])==1)
- {
- ShowPlayerDialog(playerid,CLOSEMAP,DIALOG_STYLE_MSGBOX,"select","please select the mode you want to close","Edit","View");
- }
- else
- {
- SendClientMessage(playerid, RED, "you have to be allowed to buildmaps or be admin inorder to use this command");
- }
- return 1;
- }
- CMD:deletemap(playerid, params[])
- {
- if(IsPlayerAdmince(playerid,3)||(allowence[3][playerid])==1)
- {
- new input[64],string[128];
- if((mapplayereditstate[playerid])==1)
- {
- return SendClientMessage(playerid, RED, "Please close any maps you are editing");
- }
- if(sscanf(params,"s["#64"]",input))
- {
- return SendClientMessage(playerid,RED,"SYNTAX deletemap [mapname]");
- }
- new addstr[64];
- format(addstr,sizeof(addstr),"%s",input);
- format(input,sizeof(input),"JBobjects/%s.map",addstr);
- if(dini_Exists(input))
- {
- for(new count;count < MAX;count++)
- {
- if(!isnull(mapname[count]))
- {
- if(strcmp(mapname[count],input,true,64)==0)
- {
- format(string,sizeof(string),"%s is currently editing the map you want to delete",mapplayereditingname[count]);
- SendClientMessage(playerid,RED,string);
- return 1;
- }
- }
- }
- new ownername[128];
- format(ownername,sizeof(ownername),"%s",dini_Get(input,"mapplayereditingname"));
- new name[128];
- GetPlayerName(playerid,name,sizeof(name));
- if(!IsPlayerAdmince(playerid,3))
- {
- if(strcmp(name,ownername,true,128)!=0)
- {
- return SendClientMessage(playerid, RED, "You cannot delete this map it is not yours only admins can delete other peoples maps");
- }
- }
- new slotid = mapplayerslotid[playerid];
- new savestringname[128];
- for(new count;count < MAX_OBJECTS;count++)
- {
- if((mapobjectstate[slotid][count])== 1)
- {
- format(savestringname,sizeof(savestringname),"playermapx[%i]",count);
- dini_FloatSet(input,savestringname,(0));
- dini_Unset(input,savestringname);
- format(savestringname,sizeof(savestringname),"playermapy[%i]",count);
- dini_FloatSet(input,savestringname,(0));
- dini_Unset(input,savestringname);
- format(savestringname,sizeof(savestringname),"playermapz[%i]",count);
- dini_FloatSet(input,savestringname,(0));
- dini_Unset(input,savestringname);
- format(savestringname,sizeof(savestringname),"playermapxrot[%i]",count);
- dini_FloatSet(input,savestringname,(0));
- dini_Unset(input,savestringname);
- format(savestringname,sizeof(savestringname),"playermapyrot[%i]",count);
- dini_FloatSet(input,savestringname,(0));
- dini_Unset(input,savestringname);
- format(savestringname,sizeof(savestringname),"playermapzrot[%i]",count);
- dini_FloatSet(input,savestringname,(0));
- dini_Unset(input,savestringname);
- format(savestringname,sizeof(savestringname),"mapobjectstring[%i]",count);
- dini_Set(input,savestringname,(""));
- dini_Unset(input,savestringname);
- format(savestringname,sizeof(savestringname),"mapobjectmid[%i]",count);
- dini_IntSet(input,savestringname,(0));
- dini_Unset(input,savestringname);
- format(savestringname,sizeof(savestringname),"mapobjectstate[%i]",count);
- dini_IntSet(input,savestringname,(0));
- dini_Unset(input,savestringname);
- }
- }
- CloseMap(playerid);
- dini_Remove(input);
- SendClientMessage(playerid, RED, "You have delete a map");
- }
- else
- {
- SendClientMessage(playerid, RED, "This Map Does Not exists");
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "you have to be allowed to buildmaps or be admin inorder to use this command");
- }
- return 1;
- }
- CMD:importmap(playerid, params[])
- {
- if(IsPlayerAdmince(playerid, 5))
- {
- new loadfilename[64],savefilename[64];
- if((mapplayereditstate[playerid])==1)
- {
- return SendClientMessage(playerid,RED, "Please Close any maps you are currently editing");
- }
- if(sscanf(params,"s["#64"]s["#64"]",loadfilename,savefilename))
- {
- return SendClientMessage(playerid,RED, "SYNTAX /importmap [inportname] [newfilename]");
- }
- new addstr[512];
- new string[512];
- format(addstr,sizeof(addstr),"%s",loadfilename);
- format(loadfilename,sizeof(loadfilename),"JBobjects/%s.txt",addstr);
- format(addstr,sizeof(addstr),"%s",savefilename);
- format(savefilename,sizeof(savefilename),"JBobjects/%s.map",addstr);
- if(dini_Exists(savefilename))
- {
- return SendClientMessage(playerid, RED, "This file already exists");
- }
- dini_Create(savefilename);
- new File:mapfile = fopen(loadfilename, io_read);
- if(mapfile)
- {
- new linecount;
- new savestringname[128];
- new name[128];
- SendClientMessageToAll(ORANGE, "!Note someone is importing a map it might lag depening on the size");
- while(fread(mapfile,string))
- {
- new stage = 0;
- new objstring[128];
- new objstringcount;
- new finish = 0;
- new Float:currentcharecterid[6];//Float:X,Float:Y,Float:Z,Float:XR,Float:YR,Float:ZR;
- new modelid;
- format(addstr,sizeof(addstr),"");
- if(!isnull(string))
- {
- for(new count = 0;count < sizeof(string)-3;count++)
- {
- new str[512];
- if((stage)==0)
- {
- format(str,sizeof(str),"%c%c%c%c%c%c%c%c%c%c%c%c",string[count],string[count+1],string[count+2],string[count+3],string[count+4],string[count+5],string[count+6],string[count+7],string[count+8],string[count+9],string[count+10],string[count+11]);
- while(strcmp(str,"CreateObject",false,sizeof(str))!=0)
- {
- if((count) < sizeof(string))
- {
- count ++;
- format(str,sizeof(str),"%c%c%c%c%c%c%c%c%c%c%c%c",string[count],string[count+1],string[count+2],string[count+3],string[count+4],string[count+5],string[count+6],string[count+7],string[count+8],string[count+9],string[count+10],string[count+11]);
- }
- else
- {
- break;
- }
- }
- stage = 1;
- continue;
- }
- else if((stage)==1)
- {
- if((count) > sizeof(string))
- {
- break;
- }
- while(string[count] != '(')
- {
- if((count) < sizeof(string))
- {
- count ++;
- }
- else
- {
- break;
- }
- }
- stage = 2;
- continue;
- }
- else if((stage)==2)
- {
- new tmpstr[256];
- while(string[count] != ',')
- {
- if((count) < sizeof(string))
- {
- while(string[count] == ' ')
- {
- if((count) < sizeof(string))
- {
- count++;
- }
- else
- {
- break;
- }
- }
- format(str,sizeof(str),"%s",tmpstr);
- format(tmpstr,sizeof(tmpstr),"%s%c",str,string[count]);
- count++;
- }
- else
- {
- break;
- }
- }
- modelid = strval(tmpstr);
- stage = 3;
- continue;
- }
- else if((stage)==3)
- {
- new tmpstr[256];
- while(string[count] != ',')
- {
- if((count) < sizeof(string))
- {
- while(string[count] == ' ')
- {
- if((count) < sizeof(string))
- {
- count++;
- }
- else
- {
- break;
- }
- }
- format(str,sizeof(str),"%s",tmpstr);
- format(tmpstr,sizeof(tmpstr),"%s%c",str,string[count]);
- count++;
- }
- else
- {
- break;
- }
- }
- currentcharecterid[0] = floatstr(tmpstr);
- stage = 4;
- continue;
- }
- else if((stage)==4)
- {
- new tmpstr[256];
- while(string[count] != ',')
- {
- if((count) < sizeof(string))
- {
- while(string[count] == ' ')
- {
- if((count) < sizeof(string))
- {
- count++;
- }
- else
- {
- break;
- }
- }
- format(str,sizeof(str),"%s",tmpstr);
- format(tmpstr,sizeof(tmpstr),"%s%c",str,string[count]);
- count++;
- }
- else
- {
- break;
- }
- }
- currentcharecterid[1] = floatstr(tmpstr);
- stage = 5;
- continue;
- }
- else if((stage)==5)
- {
- new tmpstr[256];
- while(string[count] != ',')
- {
- if((count) < sizeof(string))
- {
- while(string[count] == ' ')
- {
- if((count) < sizeof(string))
- {
- count++;
- }
- else
- {
- break;
- }
- }
- format(str,sizeof(str),"%s",tmpstr);
- format(tmpstr,sizeof(tmpstr),"%s%c",str,string[count]);
- count++;
- }
- else
- {
- break;
- }
- }
- currentcharecterid[2] = floatstr(tmpstr);
- stage = 6;
- continue;
- }
- else if((stage)==6)
- {
- new tmpstr[256];
- while(string[count] != ',')
- {
- if((count) < sizeof(string))
- {
- while(string[count] == ' ')
- {
- if((count) < sizeof(string))
- {
- count++;
- }
- else
- {
- break;
- }
- }
- format(str,sizeof(str),"%s",tmpstr);
- format(tmpstr,sizeof(tmpstr),"%s%c",str,string[count]);
- count++;
- }
- else
- {
- break;
- }
- }
- currentcharecterid[3] = floatstr(tmpstr);
- stage = 7;
- continue;
- }
- else if((stage)==7)
- {
- new tmpstr[256];
- while(string[count] != ',')
- {
- if((count) < sizeof(string))
- {
- while(string[count] == ' ')
- {
- if((count) < sizeof(string))
- {
- count++;
- }
- else
- {
- break;
- }
- }
- format(str,sizeof(str),"%s",tmpstr);
- format(tmpstr,sizeof(tmpstr),"%s%c",str,string[count]);
- count++;
- }
- else
- {
- break;
- }
- }
- currentcharecterid[4] = floatstr(tmpstr);
- stage = 8;
- continue;
- }
- else if((stage)==8)
- {
- new tmpstr[256];
- while(string[count] != ')')
- {
- if((count) < sizeof(string))
- {
- while(string[count] == ' ')
- {
- if((count) < sizeof(string))
- {
- count++;
- }
- else
- {
- break;
- }
- }
- format(str,sizeof(str),"%s",tmpstr);
- format(tmpstr,sizeof(tmpstr),"%s%c",str,string[count]);
- count++;
- }
- else
- {
- break;
- }
- }
- currentcharecterid[5] = floatstr(tmpstr);
- stage = 9;
- continue;
- }
- else if((stage)==9)
- {
- while(string[count] != ';')
- {
- if((count) < sizeof(string))
- {
- count++;
- }
- else
- {
- break;
- }
- }
- stage = 10;
- finish = 1;
- continue;
- }
- else if((stage)==10)
- {
- format(str,sizeof(str),"%c%c",string[count],string[count + 1]);
- while(strcmp(str,"//",false,sizeof(str))!=0)
- {
- if((count) < sizeof(string))
- {
- count++;
- format(str,sizeof(str),"%c%c",string[count],string[count + 1]);
- }
- else
- {
- break;
- }
- }
- count++;
- stage = 11;
- continue;
- }
- else if((stage)==11)
- {
- if((objstringcount) < 128)
- {
- format(addstr,sizeof(addstr),"%s%c",objstring,string[count]);
- format(objstring,sizeof(objstring),"%s",addstr);
- objstringcount++;
- }
- else
- {
- objstringcount = 0;
- stage = 0;
- break;
- }
- }
- }
- }
- if((finish)==1)
- {
- printf("line-%i CreateObject(modelid = %i,Float:X = %f,Float:Y = %f,Float:Z = %f,Float:XR = %f,Float:YR = %f,Float:ZR=%f);//%s",linecount,modelid,currentcharecterid[0],currentcharecterid[1],currentcharecterid[2],currentcharecterid[3],currentcharecterid[4],currentcharecterid[5],objstring);
- format(savestringname,sizeof(savestringname),"playermapx[%i]",linecount);
- dini_FloatSet(savefilename,savestringname,(currentcharecterid[0]));
- format(savestringname,sizeof(savestringname),"playermapy[%i]",linecount);
- dini_FloatSet(savefilename,savestringname,(currentcharecterid[1]));
- format(savestringname,sizeof(savestringname),"playermapz[%i]",linecount);
- dini_FloatSet(savefilename,savestringname,(currentcharecterid[2]));
- format(savestringname,sizeof(savestringname),"playermapxrot[%i]",linecount);
- dini_FloatSet(savefilename,savestringname,(currentcharecterid[3]));
- format(savestringname,sizeof(savestringname),"playermapyrot[%i]",linecount);
- dini_FloatSet(savefilename,savestringname,(currentcharecterid[4]));
- format(savestringname,sizeof(savestringname),"playermapzrot[%i]",linecount);
- dini_FloatSet(savefilename,savestringname,(currentcharecterid[5]));
- format(savestringname,sizeof(savestringname),"mapobjectmid[%i]",linecount);
- dini_IntSet(savefilename,savestringname,(modelid));
- format(savestringname,sizeof(savestringname),"mapobjectstate[%i]",linecount);
- dini_IntSet(savefilename,savestringname,(1));
- format(savestringname,sizeof(savestringname),"mapobjectstring[%i]",linecount);
- dini_Set(savefilename,savestringname,(objstring));
- linecount++;
- }
- else
- {
- printf("error with line-%i",linecount);
- }
- }
- dini_Set(savefilename,"mapname",(savefilename));
- GetPlayerName(playerid, name,sizeof(name));
- dini_Set(savefilename,"mapplayereditingname",(name));
- SendClientMessage(playerid, PINK, "!Done check the log for any error details");
- fclose(mapfile);
- for(new i;i < MAX_PLAYERS;i++)
- {
- if(IsPlayerConnected(i))
- {
- TogglePlayerControllable(i,1);
- SendClientMessage(i,GREEN,"you are free to rom around againg");
- }
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "This file does not exits");
- }
- }
- else
- {
- SendClientMessage(playerid,RED, "You have to be admin inorder to use this command");
- }
- return 1;
- }
- CMD:exportmap(playerid, params[])
- {
- if(IsPlayerAdmince(playerid, 4))
- {
- new input[64],exportname[128],savestringname[128];
- if((mapplayereditstate[playerid])==1)
- {
- if(sscanf(params,"s["#64"]",exportname))
- {
- SendClientMessage(playerid, RED, "SYNTAX /exportmap [exportmapname]");
- SendClientMessage(playerid, ORANGE, "!NOTE you currently have a map open that will be the one that is going to be exported");
- return 1;
- }
- format(input,sizeof(input),"%s",mapname[mapplayerslotid[playerid]]);
- }
- else
- {
- if(sscanf(params,"s["#64"]s["#64"]",input,exportname))
- {
- return SendClientMessage(playerid, RED, "SYNTAX /exportmap [mapname] [exportmapname]");
- }
- new addstr[128];
- format(addstr,sizeof(addstr),"%s",input);
- format(input,sizeof(input),"JBobjects/%s.map",addstr);
- }
- if(dini_Exists(input))
- {
- new addstr[128];
- format(addstr,sizeof(addstr),"%s",exportname);
- format(exportname,sizeof(exportname),"JBobjects/%s.txt",addstr);
- new File:exportfile = fopen(exportname, io_write);
- new playerfilename[128];
- format(playerfilename,sizeof(playerfilename),"%s",input);
- for(new count;count < MAX_OBJECTS;count++)
- {
- format(savestringname,sizeof(savestringname),"mapobjectstate[%i]",count);
- new objstate = dini_Int(playerfilename,savestringname);
- if((objstate)==1)
- {
- new Float:x,Float:y,Float:z,Float:xrot,Float:yrot,Float:zrot;
- new objectmid;
- new objstring[128];
- new string[128];
- format(savestringname,sizeof(savestringname),"playermapx[%i]",count);
- x = dini_Float(playerfilename,savestringname);
- format(savestringname,sizeof(savestringname),"playermapy[%i]",count);
- y = dini_Float(playerfilename,savestringname);
- format(savestringname,sizeof(savestringname),"playermapz[%i]",count);
- z = dini_Float(playerfilename,savestringname);
- format(savestringname,sizeof(savestringname),"playermapxrot[%i]",count);
- xrot = dini_Float(playerfilename,savestringname);
- format(savestringname,sizeof(savestringname),"playermapyrot[%i]",count);
- yrot = dini_Float(playerfilename,savestringname);
- format(savestringname,sizeof(savestringname),"playermapzrot[%i]",count);
- zrot = dini_Float(playerfilename,savestringname);
- format(savestringname,sizeof(savestringname),"mapobjectmid[%i]",count);
- objectmid = dini_Int(playerfilename,savestringname);
- format(savestringname,sizeof(savestringname),"mapobjectstring[%i]",count);
- format(objstring,sizeof(objstring),dini_Get(playerfilename,savestringname));
- format(string,sizeof(string),"CreateObject(%i,%f,%f,%f,%f,%f,%f);//%s",objectmid,x,y,z,xrot,yrot,zrot,objstring);
- fwrite(exportfile,string);
- fwrite(exportfile,"\n");
- }
- }
- fclose(exportfile);
- SendClientMessage(playerid, LIGHTBLUE, "The map has been exported to the scripting files folder");
- }
- else
- {
- SendClientMessage(playerid, RED, "This Map Does Not exist");
- }
- }
- else
- {
- SendClientMessage(playerid,RED,"You Have To Be Admin To Use This Command");
- }
- return 1;
- }
- CMD:renameobject(playerid, params[])
- {
- if((mapplayereditstate[playerid])==1)
- {
- new index,input[64],string[128];
- new slotid = mapplayerslotid[playerid];
- if(sscanf(params,"is["#64"]",index,input))
- {
- return SendClientMessage(playerid, RED, "SYNTAX /renameobject [playerjbobjectid] [input]");
- }
- if((mapobjectstate[slotid][index])==0)
- {
- return SendClientMessage(playerid, RED, "This object does not exist");
- }
- new savestringname[128];
- new playerfilename[128];
- format(playerfilename,sizeof(playerfilename),"%s",mapname[slotid]);
- format(savestringname,sizeof(savestringname),"mapobjectstring[%i]",index);
- dini_Set(playerfilename,savestringname,(input));
- format(string,sizeof(string),"You have renamed object %i-%i",index,slotid);
- SendClientMessage(playerid, LIGHTBLUE, string);
- format(string,sizeof(string),"object:%s--ID:Objectid-%i-%i-Mid:%i-mapname:%s",input,index,slotid,mapobjectmid[slotid][index],mapname[slotid]);
- for(new i;i < MAX_PLAYERS;i++)
- {
- if(IsPlayerConnected(i))
- {
- if((showlabel[i])==1)
- {
- DeletePlayer3DTextLabel(i, mapobjectlabel[slotid][index]);
- mapobjectlabel[slotid][index] = CreatePlayer3DTextLabel(i,string,COLOR,playermapx[slotid][index],playermapy[slotid][index],playermapz[slotid][index],DISTANCELABEL,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0);
- }
- }
- }
- return 1;
- }
- if(IsPlayerAdmince(playerid,3)||(allowence[0][playerid])==1)
- {
- new index,input[64],string[128];
- if(sscanf(params,"is["#64"]",index,input))
- {
- return SendClientMessage(playerid, RED, "SYNTAX /renameobject [jbobjectid] [input]");
- }
- if((objectstate[index])==0)
- {
- return SendClientMessage(playerid, RED, "This object does not exist");
- }
- new savestringname[128];
- format(savestringname,sizeof(savestringname),"objectlabel[%i]",index);
- format(objectstring[index],sizeof(objectstring),"%s",input);
- dini_Set(objectsfilename,savestringname,(objectstring[index]));
- format(string,sizeof(string),"You have renamed object %i",index);
- SendClientMessage(playerid, LIGHTBLUE, string);
- for(new i;i < MAX_PLAYERS;i++)
- {
- if(IsPlayerConnected(i))
- {
- if((showlabel[i])==1)
- {
- DeletePlayer3DTextLabel(i,objectlabel[index]);
- format(string,128,"object:%s--ID:%i-Objectid-%i",objectstring[index],index,jbobjectid[index]);
- objectlabel[index] = CreatePlayer3DTextLabel(i,string,COLOR,objx[index],objy[index],objz[index],DISTANCELABEL,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0);
- }
- }
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "You have to be atleast admin level 3 or have an allowence for addobjects to rename objects");
- }
- return 1;
- }
- CMD:deleteallobjects(playerid,params[])
- {
- if((mapplayereditstate[playerid])==1)
- {
- new slotid = mapplayerslotid[playerid];
- new playerfilename[128];
- new savestringname[128];
- format(playerfilename,sizeof(playerfilename),"%s",mapname[slotid]);
- for(new count;count < MAX_OBJECTS;count++)
- {
- playermapx[slotid][count] = 0;
- playermapy[slotid][count] = 0;
- playermapz[slotid][count] = 0;
- playermapxrot[slotid][count] = 0;
- playermapyrot[slotid][count] = 0;
- playermapzrot[slotid][count] = 0;
- mapobjectstate[slotid][count] = 0;
- format(savestringname,sizeof(savestringname),"playermapx[%i]",count);
- dini_FloatSet(playerfilename,savestringname,(playermapx[slotid][count]));
- dini_Unset(playerfilename,savestringname);
- format(savestringname,sizeof(savestringname),"playermapy[%i]",count);
- dini_FloatSet(playerfilename,savestringname,(playermapy[slotid][count]));
- dini_Unset(playerfilename,savestringname);
- format(savestringname,sizeof(savestringname),"playermapz[%i]",count);
- dini_FloatSet(playerfilename,savestringname,(playermapz[slotid][count]));
- dini_Unset(playerfilename,savestringname);
- format(savestringname,sizeof(savestringname),"playermapxrot[%i]",count);
- dini_FloatSet(playerfilename,savestringname,(playermapxrot[slotid][count]));
- dini_Unset(playerfilename,savestringname);
- format(savestringname,sizeof(savestringname),"playermapyrot[%i]",count);
- dini_FloatSet(playerfilename,savestringname,(playermapyrot[slotid][count]));
- dini_Unset(playerfilename,savestringname);
- format(savestringname,sizeof(savestringname),"playermapzrot[%i]",count);
- dini_FloatSet(playerfilename,savestringname,(playermapxrot[slotid][count]));
- dini_Unset(playerfilename,savestringname);
- format(savestringname,sizeof(savestringname),"mapobjectstring[%i]",count);
- dini_Set(playerfilename,savestringname,(""));
- dini_Unset(playerfilename,savestringname);
- format(savestringname,sizeof(savestringname),"mapobjectmid[%i]",count);
- dini_IntSet(playerfilename,savestringname,(mapobjectmid[slotid][count]));
- dini_Unset(playerfilename,savestringname);
- format(savestringname,sizeof(savestringname),"mapobjectstate[%i]",count);
- dini_IntSet(playerfilename,savestringname,(mapobjectstate[slotid][count]));
- dini_Unset(playerfilename,savestringname);
- DestroyDynamicObject(mapobject[slotid][count]);
- for(new i;i < MAX_PLAYERS;i++)
- {
- if(IsPlayerConnected(i))
- {
- if((showlabel[i])==1)
- {
- DeletePlayer3DTextLabel(i, mapobjectlabel[slotid][count]);
- }
- }
- }
- }
- return 1;
- }
- if(IsPlayerAdmince(playerid,4))
- {
- new savestringname[128];
- for(new count =0;count < MAX_OBJECTS;count++)
- {
- if((objectstate[count])==1)
- {
- objx[count] = 0;
- objy[count] = 0;
- objz[count] = 0;
- objxrot[count] = 0;
- objyrot[count] = 0;
- objzrot[count] = 0;
- jbobjectid[count] = 0;
- objectstring[count] = "";
- objectstate[count] = 0;
- format(savestringname,sizeof(savestringname),"objectstate[%i]",count);
- dini_IntSet(objectsfilename,savestringname,(0));
- dini_Unset(objectsfilename,savestringname);
- format(savestringname,sizeof(savestringname),"objx[%i]",count);
- dini_FloatSet(objectsfilename,savestringname,(0));
- dini_Unset(objectsfilename,savestringname);
- format(savestringname,sizeof(savestringname),"objy[%i]",count);
- dini_FloatSet(objectsfilename,savestringname,(0));
- dini_Unset(objectsfilename,savestringname);
- format(savestringname,sizeof(savestringname),"objz[%i]",count);
- dini_FloatSet(objectsfilename,savestringname,(0));
- dini_Unset(objectsfilename,savestringname);
- format(savestringname,sizeof(savestringname),"objxrot[%i]",count);
- dini_FloatSet(objectsfilename,savestringname,(0));
- dini_Unset(objectsfilename,savestringname);
- format(savestringname,sizeof(savestringname),"objyrot[%i]",count);
- dini_FloatSet(objectsfilename,savestringname,(0));
- dini_Unset(objectsfilename,savestringname);
- format(savestringname,sizeof(savestringname),"objzrot[%i]",count);
- dini_FloatSet(objectsfilename,savestringname,(0));
- dini_Unset(objectsfilename,savestringname);
- format(savestringname,sizeof(savestringname),"object[%i]",count);
- dini_IntSet(objectsfilename,savestringname,(0));
- dini_Unset(objectsfilename,savestringname);
- format(savestringname,sizeof(savestringname),"objectlabel[%i]",count);
- dini_Set(objectsfilename,savestringname,(""));
- dini_Unset(objectsfilename,savestringname);
- format(savestringname,sizeof(savestringname),"objectcolor[%i]",count);
- dini_IntSet(objectsfilename,savestringname,(0));
- dini_Unset(objectsfilename,savestringname);
- DestroyDynamicObject(objects[count]);
- for(new i =0;i < MAX_PLAYERS;i++)
- {
- if((showlabel[i])==1)
- {
- DeletePlayer3DTextLabel(i,objectlabel[count]);
- }
- }
- }
- }
- new string[128],name[128];
- GetPlayerName(playerid, name,sizeof(name));
- format(string,128,"[ADMIN:%s] has delete all of the objects & removed it from the history",name);
- SendClientMessageToAll(PINK,string);
- }
- else
- {
- SendClientMessage(playerid, RED, "You have to be atleast admin level 5 or Rcon admin to use this command");
- }
- return 1;
- }
- CMD:allowplayer(playerid, params[])
- {
- if(IsPlayerAdmince(playerid,4))
- {
- new choice[128],yesno[128],idinput[128],id =-1,string[128];
- if(sscanf(params,"s["#64"]s["#64"]s["#64"]",idinput,choice,yesno))
- {
- SendClientMessage(playerid, RED, "SYNTAX /allowplayer [id/all] [choice] [yes/no]");
- SendClientMessage(playerid, RED, "Choice:addobject,moveobject,deleteobject,buildmap,all");
- SendClientMessage(playerid, ORANGE, "!NOTE useing [all] [all] or [playerid] [all] will not enable buildmap");
- return 1;
- }
- if(strcmp(idinput,"all",true,64)==0)
- {
- for(new i; i < MAX_PLAYERS;i++)
- {
- if(strcmp(choice,"buildmap",true,64)==0)
- {
- if(strcmp(yesno,"yes",true,64)==0)
- {
- if(IsPlayerAdmince(i,3))
- {
- }
- else
- {
- new adminname[128];
- GetPlayerName(playerid,adminname,sizeof(adminname));
- allowence[3][i] = 1;
- format(string,128,"[ADMIN:%s] has allowed you to use the private mapeditor commandcheck /objecthelp help for more help",adminname);
- SendClientMessage(i,YELLOW,string);
- allowencejoin[3] = 1;
- SendClientMessage(i, YELLOW, "allowencejoin in enabled meaning any player that joins is auto atherized to use the private mapeditor /disallowplayerbuildonjoin to disable this");
- }
- }
- else if(strcmp(yesno,"no",true,64)==0)
- {
- if(IsPlayerAdmince(i,3))
- {
- }
- else
- {
- if((mapplayereditstate[i])==1)
- {
- new name[128];
- GetPlayerName(i,name,sizeof(name));
- format(string,sizeof(string),"!NOTE you have close %s's map aswell",name);
- SendClientMessage(playerid, ORANGE, string);
- CloseMap(i);
- }
- allowence[3][i] = 0;
- new adminname[128];
- GetPlayerName(playerid, adminname,sizeof(adminname));
- format(string,128,"[ADMIN:%s] has disalowed everyone to use the private mapeditor",adminname);
- SendClientMessage(i,RED,string);
- }
- }
- }
- else if(strcmp(choice,"addobject",true,64)==0)
- {
- if(strcmp(yesno,"yes",true,64)==0)
- {
- if(IsPlayerAdmince(i,3))
- {
- }
- else
- {
- new adminname[128];
- GetPlayerName(playerid,adminname,sizeof(adminname));
- allowence[0][i] = 1;
- format(string,128,"[ADMIN:%s] has allowed you to use the /addobject command check /objecthelp for more help",adminname);
- SendClientMessage(i,YELLOW,string);
- allowencejoin[0] = 1;
- SendClientMessage(i, YELLOW, "allowencejoin in enabled meaning any player that joins is auto atherized to use the /addobject command /disallowplayerbuildonjoin to disable this");
- }
- }
- else if(strcmp(yesno,"no",true,64)==0)
- {
- if(IsPlayerAdmince(i,3))
- {
- }
- else
- {
- if((mapplayereditstate[i])==1)
- {
- new name[128];
- GetPlayerName(i,name,sizeof(name));
- format(string,sizeof(string),"!NOTE you have close %s's map aswell",name);
- SendClientMessage(playerid, ORANGE, string);
- CloseMap(i);
- }
- allowence[0][i] = 0;
- new adminname[128];
- GetPlayerName(playerid, adminname,sizeof(adminname));
- format(string,128,"[ADMIN:%s] has disalowed everyone to use /addobject",adminname);
- SendClientMessage(i,RED,string);
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "type in Yes or No");
- }
- }
- else if(strcmp(choice,"moveobject",true,64)==0)
- {
- if(strcmp(yesno,"yes",true,64)==0)
- {
- if(IsPlayerAdmince(i,3))
- {
- }
- else
- {
- new adminname[128];
- GetPlayerName(playerid,adminname,sizeof(adminname));
- allowence[1][i] = 1;
- format(string,128,"[ADMIN:%s] has allowed you to use the /moveobject command check /objecthelp for more help",adminname);
- SendClientMessage(i,YELLOW,string);
- format(string,127,"[ADMIN:%s] has allowed everyone to use the moveobject functions",adminname);
- SendClientMessage(i,PINK,string);
- allowencejoin[1] = 1;
- SendClientMessage(i, YELLOW, "allowencejoin in enabled meaning any player that joins is auto atherized to use the /moveobject command /disallowplayerbuildonjoin to disable this");
- }
- }
- else if(strcmp(yesno,"no",true,64)==0)
- {
- if((allowence[1][i])==1)
- {
- if(IsPlayerAdmince(i,3))
- {
- }
- else
- {
- if((mapplayereditstate[i])==1)
- {
- new name[128];
- GetPlayerName(i,name,sizeof(name));
- format(string,sizeof(string),"!NOTE you have close %s's map aswell",name);
- SendClientMessage(playerid, ORANGE, string);
- CloseMap(i);
- }
- allowence[1][i] = 0;
- new adminname[128];
- GetPlayerName(playerid, adminname,sizeof(adminname));
- format(string,128,"[ADMIN:%s] has disalowed everyone to use /moveobject",adminname);
- SendClientMessage(i,RED,string);
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "This player already has premission to use moveobjects");
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "type in Yes or No");
- }
- }
- else if(strcmp(choice,"deleteobject",true,64)==0)
- {
- if(strcmp(yesno,"yes",true,64)==0)
- {
- if(IsPlayerAdmince(i,3))
- {
- }
- else
- {
- new adminname[128];
- GetPlayerName(playerid,adminname,sizeof(adminname));
- allowence[2][i] = 1;
- format(string,128,"[ADMIN:%s] has allowed you to use the /deleteobject command check /objecthelp for more help",adminname);
- SendClientMessage(i,YELLOW,string);
- format(string,127,"ADMIN:%s] has allowed everyone to use the deleteobject functions",adminname);
- SendClientMessage(i,PINK,string);
- allowencejoin[2] = 1;
- SendClientMessage(i, YELLOW, "allowencejoin in enabled meaning any player that joins is auto atherized to use the /deleteobject command /disallowplayerbuildonjoin to disable this");
- }
- }
- else if(strcmp(yesno,"no",true,64)==0)
- {
- if((allowence[2][i])==1)
- {
- if(IsPlayerAdmince(i,3))
- {
- }
- else
- {
- if((mapplayereditstate[i])==1)
- {
- new name[128];
- GetPlayerName(i,name,sizeof(name));
- format(string,sizeof(string),"!NOTE you have close %s's map aswell",name);
- SendClientMessage(playerid, ORANGE, string);
- CloseMap(i);
- }
- allowence[2][i] = 0;
- new adminname[128];
- GetPlayerName(playerid, adminname,sizeof(adminname));
- format(string,128,"[ADMIN:%s] has disalowed everyone to use /deleteobjects",adminname);
- SendClientMessage(i,RED,string);
- }
- if((i)==playerid)
- {
- SendClientMessage(playerid, RED, "You have disabled deleteobjects for all player");
- SendClientMessage(playerid, ORANGE, "!NOTE you have also disable allowbuildonjoin /allowplayerbuildonjoin to change that");
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "This player already has premission to use deleteobjects");
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "type in Yes or No");
- }
- }
- else if(strcmp(choice,"all",true,64)==0)
- {
- if(strcmp(yesno,"yes",true,64)==0)
- {
- if(IsPlayerAdmince(i,3))
- {
- }
- else
- {
- new adminname[128];
- GetPlayerName(playerid,adminname,sizeof(adminname));
- for(new count=0;count < MAX_OPERATIONS;count++)
- {
- allowence[count][i] = 1;
- allowencejoin[count] = 1;
- }
- format(string,128,"[ADMIN:%s] has Allowed you to use all 3 function do /objecthelp for more information",adminname);
- SendClientMessage(i,YELLOW,string);
- format(string,127,"[ADMIN:%s] has allowed everyone to use all the functions",adminname);
- SendClientMessage(i,PINK,string);
- }
- if((i)==playerid)
- {
- SendClientMessage(playerid, YELLOW, "You have allowed everyone to use JBobjects functions");
- SendClientMessage(playerid, ORANGE, "NOTE everyone who joins will automaticly be able to build /disallowplayerbuildonjoin to disable that");
- }
- }
- else if(strcmp(yesno,"no",true,64)==0)
- {
- if(IsPlayerAdmince(i,3))
- {
- }
- else
- {
- for(new count=0;count < MAX_OPERATIONS;count++)
- {
- if((mapplayereditstate[i])==1)
- {
- new name[128];
- GetPlayerName(i,name,sizeof(name));
- format(string,sizeof(string),"!NOTE you have close %s's map aswell",name);
- SendClientMessage(playerid, ORANGE, string);
- CloseMap(i);
- }
- allowence[count][i] = 0;
- allowencejoin[count] = 0;
- new adminname[128];
- GetPlayerName(playerid, adminname,sizeof(adminname));
- format(string,128,"[ADMIN:%s] has disalowed everyone to use all the build functions",adminname);
- SendClientMessage(i,RED,string);
- }
- if((i)==playerid)
- {
- SendClientMessage(playerid, YELLOW, "You have disallowed everyone to use JBobjects functions");
- SendClientMessage(playerid, ORANGE, "NOTE everyone who joins will not automaticly be able to build");
- }
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "type in Yes or No");
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "Choice:addobject,moveobject,deleteobject,all");
- }
- }
- return 1;
- }
- else
- {
- id = strval(idinput);
- if((playerid)==id)
- {
- return SendClientMessage(playerid, RED, "You can not make yourself allowed becuse you are an admin over level 3 and permently can edit an object");
- }
- if(!IsPlayerConnected(id))
- {
- return SendClientMessage(playerid, RED, "This Player is not connected");
- }
- if(strcmp(choice,"buildmap",true,64)==0)
- {
- if(strcmp(yesno,"yes",true,64)==0)
- {
- if(IsPlayerAdmince(id,3))
- {
- }
- else
- {
- new adminname[128];
- GetPlayerName(playerid,adminname,sizeof(adminname));
- allowence[3][id] = 1;
- format(string,128,"[ADMIN:%s] has allowed you to use the private mapeditor commandcheck /objecthelp help for more help",adminname);
- SendClientMessage(id,YELLOW,string);
- }
- }
- else if(strcmp(yesno,"no",true,64)==0)
- {
- if(IsPlayerAdmince(id,3))
- {
- }
- else
- {
- if((mapplayereditstate[id])==1)
- {
- new name[128];
- GetPlayerName(id,name,sizeof(name));
- format(string,sizeof(string),"!NOTE you have close %s's map aswell",name);
- SendClientMessage(playerid, ORANGE, string);
- CloseMap(id);
- }
- allowence[3][id] = 0;
- new adminname[128];
- GetPlayerName(playerid, adminname,sizeof(adminname));
- format(string,128,"[ADMIN:%s] has disalowed everyone to use the private mapeditor",adminname);
- SendClientMessage(id,RED,string);
- }
- }
- }
- else if(strcmp(choice,"addobject",true,64)==0)
- {
- if(strcmp(yesno,"yes",true,64)==0)
- {
- if((allowence[0][id])==0)
- {
- new adminname[128],playername[128];
- GetPlayerName(playerid,adminname,sizeof(adminname));
- GetPlayerName(id,playername,sizeof(playername));
- if(IsPlayerAdmince(id,3))
- {
- format(string,128,"%s is an admin over level 3 you can not allow him to addobject becuse he is permently allowed",playername);
- SendClientMessage(playerid, RED, string);
- return 1;
- }
- allowence[0][id] = 1;
- format(string,128,"[ADMIN:%s] has allowed [%s] to use the addobject function",adminname,playername);
- SendClientMessageToAll(PINK,string);
- format(string,128,"[ADMIN:%s] has allowed you to use the /addobject command check /objecthelp for more help",adminname);
- SendClientMessage(id,YELLOW,string);
- }
- else
- {
- SendClientMessage(playerid, RED, "This player already has premission to use addobjects");
- }
- }
- else if(strcmp(yesno,"no",true,64)==0)
- {
- if((allowence[0][id])==1)
- {
- new adminname[128],playername[128];
- GetPlayerName(playerid,adminname,sizeof(adminname));
- GetPlayerName(id,playername,sizeof(playername));
- if((allowence[1][id])==0||(allowence[2][id])==0)
- {
- if((mapplayereditstate[id])==1)
- {
- new name[128];
- GetPlayerName(id,name,sizeof(name));
- format(string,sizeof(string),"!NOTE you have close %s's map aswell",name);
- SendClientMessage(playerid, ORANGE, string);
- CloseMap(id);
- }
- allowence[0][id] = 0;
- format(string,128,"[ADMIN:%s] has Disallowed [%s] to use the addobject function",adminname,playername);
- SendClientMessageToAll(PINK,string);
- }
- else
- {
- if((allowence[1][id])==0)
- {
- format(string,128,"%s's moveobject allowence is still on",playername);
- SendClientMessage(playerid, RED,string);
- }
- if((allowence[2][id])==0)
- {
- format(string,128,"%s's deleteobjects allowence is still on",playername);
- SendClientMessage(playerid, RED, string);
- }
- SendClientMessage(playerid, RED, "You can not disabel addobjects");
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "This player already dose not has premission to use moveobjects");
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "type in Yes or No");
- }
- }
- else if(strcmp(choice,"moveobject",true,64)==0)
- {
- if(strcmp(yesno,"yes",true,64)==0)
- {
- if((allowence[1][id])==0)
- {
- if((allowence[0][id])==1)
- {
- new adminname[128],playername[128];
- GetPlayerName(playerid,adminname,sizeof(adminname));
- GetPlayerName(id,playername,sizeof(playername));
- if(IsPlayerAdmince(id,3))
- {
- format(string,128,"%s is an admin over level 3 you can not allow him to moveobjects becuse he is permently allowed",playername);
- SendClientMessage(playerid, RED, string);
- return 1;
- }
- allowence[1][id] = 1;
- format(string,128,"[ADMIN:%s] has allowed [%s] to use the moveobjects function",adminname,playername);
- SendClientMessageToAll(PINK,string);
- format(string,128,"[ADMIN:%s] has allowed you to use the /moveobject command check /objecthelp for more help",adminname);
- SendClientMessage(id,YELLOW,string);
- }
- else
- {
- SendClientMessage(playerid, RED, "You have to enable editing objects for the player in order to let him move objects");
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "This player already has premission to use moveobjects");
- }
- }
- else if(strcmp(yesno,"no",true,64)==0)
- {
- if((allowence[1][id])==1)
- {
- if((mapplayereditstate[id])==1)
- {
- new name[128];
- GetPlayerName(id,name,sizeof(name));
- format(string,sizeof(string),"!NOTE you have close %s's map aswell",name);
- SendClientMessage(playerid, ORANGE, string);
- CloseMap(id);
- }
- new adminname[128],playername[128];
- GetPlayerName(playerid,adminname,sizeof(adminname));
- GetPlayerName(id,playername,sizeof(playername));
- allowence[1][id] = 0;
- format(string,128,"[ADMIN:%s] has Disabled [%s] to use the moveobjects function",adminname,playername);
- SendClientMessageToAll(PINK,string);
- }
- else
- {
- SendClientMessage(playerid, RED, "This player already does not have premission to use moveobjects");
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "type in Yes or No");
- }
- }
- else if(strcmp(choice,"deleteobject",true,64)==0)
- {
- if(strcmp(yesno,"yes",true,64)==0)
- {
- if((allowence[2][id])==0)
- {
- if((allowence[0][id])==1)
- {
- new adminname[128],playername[128];
- GetPlayerName(playerid,adminname,sizeof(adminname));
- GetPlayerName(id,playername,sizeof(playername));
- if(IsPlayerAdmince(id,3))
- {
- format(string,128,"%s is an admin over level 3 you can not allow him to deleteobjects becuse he is permently allowed",playername);
- SendClientMessage(playerid, RED, string);
- return 1;
- }
- allowence[2][id] = 1;
- format(string,128,"[ADMIN:%s] has allowed [%s] to use the deleteobject function",adminname,playername);
- SendClientMessageToAll(PINK,string);
- format(string,128,"[ADMIN:%s] has allowed you to use the /deleteobject command check /objecthelp for more help",adminname);
- SendClientMessage(id,YELLOW,string);
- }
- else
- {
- SendClientMessage(playerid, RED, "You have to enable editing objects for the player in order to let him delete objects");
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "This player already has premission to use deleteobjects");
- }
- }
- else if(strcmp(yesno,"no",true,64)==0)
- {
- if((allowence[2][id])==1)
- {
- if((mapplayereditstate[id])==1)
- {
- new name[128];
- GetPlayerName(id,name,sizeof(name));
- format(string,sizeof(string),"!NOTE you have close %s's map aswell",name);
- SendClientMessage(playerid, ORANGE, string);
- CloseMap(id);
- }
- new adminname[128],playername[128];
- GetPlayerName(playerid,adminname,sizeof(adminname));
- GetPlayerName(id,playername,sizeof(playername));
- allowence[2][id] = 0;
- format(string,128,"[ADMIN:%s] has disallowed [%s] to use the deleteobject function",adminname,playername);
- SendClientMessageToAll(PINK,string);
- }
- else
- {
- SendClientMessage(playerid, RED, "This player already dose not have premission to use deleteobjects");
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "type in Yes or No");
- }
- }
- else if(strcmp(choice,"all",false,64)==0)
- {
- if(strcmp(yesno,"yes",true,64)==0)
- {
- new adminname[128],playername[128];
- GetPlayerName(playerid,adminname,sizeof(adminname));
- GetPlayerName(id,playername,sizeof(playername));
- if(IsPlayerAdmince(id,3))
- {
- 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);
- SendClientMessage(playerid, RED, string);
- return 1;
- }
- for(new count=0;count < 3;count++)
- {
- allowence[count][id] = 1;
- }
- format(string,128,"[ADMIN:%s] has Allowed [%s] to use all 3 functions [addobject,editobject,deleteobject]",adminname,playername);
- SendClientMessageToAll(PINK,string);
- format(string,128,"[ADMIN:%s] has Allowed you to use all 3 function do /objecthelp for more information",adminname);
- SendClientMessage(id,YELLOW,string);
- }
- else if(strcmp(yesno,"no",true,64)==0)
- {
- if((mapplayereditstate[id])==1)
- {
- new name[128];
- GetPlayerName(id,name,sizeof(name));
- format(string,sizeof(string),"!NOTE you have close %s's map aswell",name);
- SendClientMessage(playerid, ORANGE, string);
- CloseMap(id);
- }
- new adminname[128],playername[128];
- GetPlayerName(playerid,adminname,sizeof(adminname));
- GetPlayerName(id,playername,sizeof(playername));
- for(new count=0;count < 3;count++)
- {
- allowence[count][id] = 0;
- }
- format(string,128,"[ADMIN:%s] has Disallowed [%s] to use all 3 functions [addobject,editobject,deleteobject]",adminname,playername);
- SendClientMessageToAll(PINK,string);
- }
- else
- {
- SendClientMessage(playerid, RED, "type in Yes or No");
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "Choice:addobject,moveobject,deleteobject,all");
- }
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "You have to be atleast admin level 4 or Rcon admin to use this command");
- }
- return 1;
- }
- CMD:allowplayerbuildonjoin(playerid, params[])
- {
- if(IsPlayerAdmince(playerid,4))
- {
- new input[64],string[128],name[128];
- if(sscanf(params,"s["#64"]",input))
- {
- SendClientMessage(playerid,RED,"SYNTAX /allowplayerbuildonjoin [command]");
- SendClientMessage(playerid,RED,"command:addobject,moveobject,deleteobject,buildmap,all");
- SendClientMessage(playerid,ORANGE,"!NOTE buildmap does not turn on when the input is all");
- return 1;
- }
- GetPlayerName(playerid, name,sizeof(name));
- if(strcmp(input,"buildmap",true,64)==0)
- {
- if((allowencejoin[3])==0)
- {
- allowencejoin[3]=1;
- format(string,sizeof(string),"[ADMIN:%s] had enabled allowplayerbuildonjoin for private mapediting",name);
- SendClientMessageToAll(PINK,string);
- }
- else
- {
- SendClientMessage(playerid,RED,"allowence join addobject is already enabled");
- }
- }
- else if(strcmp(input,"addobject",true,64)==0)
- {
- if((allowencejoin[0])==0)
- {
- allowencejoin[0]=1;
- format(string,sizeof(string),"[ADMIN:%s] had enabled allowplayerbuildonjoin for addingobjects",name);
- SendClientMessageToAll(PINK,string);
- }
- else
- {
- SendClientMessage(playerid, RED, "allowence join addobject is already enabled");
- }
- }
- else if(strcmp(input,"moveobject",true,64)==0)
- {
- if((allowencejoin[1])==0)
- {
- if((allowencejoin[0])==1)
- {
- allowencejoin[1]=1;
- format(string,sizeof(string),"[ADMIN:%s] had enabled allowplayerbuildonjoin for moveingobjects",name);
- SendClientMessageToAll(PINK,string);
- }
- else
- {
- SendClientMessage(playerid, RED, "you have to enable addobjects before you enable moveobjects; allowence on join");
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "allowence join moveobjects is already enabled");
- }
- }
- else if(strcmp(input,"deleteobject",true,64)==0)
- {
- if((allowencejoin[2])==0)
- {
- if((allowencejoin[0])==1)
- {
- allowencejoin[2]=1;
- format(string,sizeof(string),"[ADMIN:%s] had enabled allowplayerbuildonjoin for deleteobjects",name);
- SendClientMessageToAll(PINK,string);
- }
- else
- {
- SendClientMessage(playerid, RED, "you have to enable addobjects before you enable deleteobjects; allowence on join");
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "allowence join deleteobject is already enabled");
- }
- }
- else if(strcmp(input,"all",true,64)==0)
- {
- for(new count;count < MAX_OPERATIONS;count++)
- {
- if((allowencejoin[count])==0)
- {
- allowencejoin[count] = 1;
- }
- else
- {
- if((count)==0)
- {
- SendClientMessage(playerid, RED, "addobjects auto join is already enabled");
- }
- else if((count)==1)
- {
- SendClientMessage(playerid, RED, "moveobjects auto join is already enabled");
- }
- else if((count)==2)
- {
- SendClientMessage(playerid, RED, "deleteobjects auto join is already enabled");
- }
- }
- }
- format(string,128,"[ADMIN:%s] had enabled allowplayerbuildonjoin for all",name);
- SendClientMessageToAll(PINK,string);
- }
- else
- {
- SendClientMessage(playerid,RED,"command:addobject,moveobject,deleteobject,all");
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "You have to be atleast admin level 4 or Rcon admin to use this command");
- }
- return 1;
- }
- CMD:disallowplayerbuildonjoin(playerid, params[])
- {
- if(IsPlayerAdmince(playerid,4))
- {
- new input[64],string[128],name[128];
- if(sscanf(params,"s["#64"]",input))
- {
- SendClientMessage(playerid,RED,"SYNTAX /disallowplayerbuildonjoin [command]");
- SendClientMessage(playerid,RED,"command:addobject,moveobject,deleteobject,buildmap,all");
- SendClientMessage(playerid,ORANGE,"!NOTE buildmap does not turn off when the input is all");
- return 1;
- }
- GetPlayerName(playerid,name,sizeof(name));
- if(strcmp(input,"buildmap",true,64)==0)
- {
- if((allowencejoin[3])==1)
- {
- allowencejoin[3]=0;
- format(string,sizeof(string),"[ADMIN:%s] has disable allowplayerbuildonjoin for private mapediting",name);
- SendClientMessageToAll(PINK,string);
- }
- else
- {
- SendClientMessage(playerid,RED,"allowence join addobject is disabled enabled");
- }
- }
- else if(strcmp(input,"addobject",true,64)==0)
- {
- if((allowencejoin[0])==1)
- {
- allowencejoin[0] = 0;
- format(string,128,"[ADMIN:%s] has stop puting people into auto allowence [/addobject & /copyobject]",name);
- SendClientMessageToAll(PINK,string);
- }
- else
- {
- SendClientMessage(playerid, RED, "allowence join addobject is already disabled");
- }
- }
- else if(strcmp(input,"moveobject",true,64)==0)
- {
- if((allowencejoin[1])==1)
- {
- if((allowencejoin[0])==0)
- {
- allowencejoin[1] = 0;
- format(string,128,"[ADMIN:%s] has stop puting people into auto allowence [/moveobject]",name);
- SendClientMessageToAll(PINK,string);
- }
- else
- {
- SendClientMessage(playerid, RED, "You have to disable addobjects before you can disable moveobjects");
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "allowence join moveobject is already disabled");
- }
- }
- else if(strcmp(input,"deleteobject",true,64)==0)
- {
- if((allowencejoin[2])==1)
- {
- if((allowencejoin[0])==0)
- {
- allowencejoin[2] = 0;
- format(string,128,"[ADMIN:%s] has stop puting people into auto allowence [/deleteobject]",name);
- SendClientMessageToAll(PINK,string);
- }
- else
- {
- SendClientMessage(playerid, RED, "you have to disable addobjects before you disable deleteobjects");
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "allowence join deleteobject is already disabled");
- }
- }
- else if(strcmp(input,"all",true,64)==0)
- {
- for(new count;count < MAX_OPERATIONS;count++)
- {
- if((allowencejoin[count])==1)
- {
- allowencejoin[count] = 0;
- }
- else
- {
- if((count)==0)
- {
- SendClientMessage(playerid, RED, "addobjects auto join is already disabled");
- }
- else if((count)==1)
- {
- SendClientMessage(playerid, RED, "moveobjects auto join is already disabled");
- }
- else if((count)==2)
- {
- SendClientMessage(playerid, RED, "deleteobjects auto join is already disabled");
- }
- }
- }
- format(string,128,"[ADMIN:%s] has stop puting people into auto allowence [all commands]",name);
- SendClientMessageToAll(PINK,string);
- }
- else
- {
- SendClientMessage(playerid,RED,"command:addobject,moveobject,deleteobject,all");
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "You have to be atleast admin level 4 or Rcon admin to use this command");
- }
- return 1;
- }
- CMD:gotoobject(playerid,params[])
- {
- if((mapplayereditstate[playerid])==1)
- {
- new index,string[128];
- new slotid = mapplayerslotid[playerid];
- if(sscanf(params,"i",index))
- {
- return SendClientMessage(playerid,RED,"SYNTAX /gotoobject [playerjbobjectid]");
- }
- if((mapobjectstate[slotid][index])==0)
- {
- return SendClientMessage(playerid, RED, "You have selected and object the does not exist");
- }
- if(IsPlayerInAnyVehicle(playerid))
- {
- if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- new Float:x = playermapx[slotid][index] + 5;
- new Float:y = playermapy[slotid][index];
- new Float:z = playermapz[slotid][index] + 5;
- SetVehiclePos(vehicleid,x,y,z);
- format(string,sizeof(string),"you have teleported with your car to playerjbobjectid %i",index);
- }
- else
- {
- SendClientMessage(playerid, RED,"You have to be the driver inorder to teleport to an object");
- }
- }
- else
- {
- new Float:x = playermapx[slotid][index] + 5;
- new Float:y = playermapy[slotid][index];
- new Float:z = playermapz[slotid][index] + 5;
- SetPlayerPos(playerid,x,y,z);
- format(string,128,"you have teleported to jbobjectid:%i",index);
- SendClientMessage(playerid, YELLOW, string);
- }
- if((allowence[1][playerid])==1)
- {
- if((playersinput)==1)
- {
- for(new count=0;count < MAX_PLAYERS;count++)
- {
- if(IsPlayerAdmince(count,3))
- {
- new name[128];
- GetPlayerName(playerid,name,sizeof(name));
- format(string,128,"%s has teleported to object id %i",name,index);
- SendClientMessage(count,DARKBLUE,string);
- }
- }
- }
- }
- return 1;
- }
- if(IsPlayerAdmince(playerid,3)||(allowence[1][playerid])==1)
- {
- new index,string[128];
- if(sscanf(params,"i",index))
- {
- return SendClientMessage(playerid, RED, "SYNTAX /gotoobject [jbobjectid]");
- }
- if((objectstate[index])==0)
- {
- return SendClientMessage(playerid, RED, "This object does not exist");
- }
- if(IsPlayerInAnyVehicle(playerid))
- {
- if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- SetVehiclePos(vehicleid,objx[index]+5,objy[index],objz[index]+5);
- format(string,128,"you have teleported with your car to jbobjectid:%i",index);
- SendClientMessage(playerid, YELLOW, string);
- }
- else
- {
- SendClientMessage(playerid, RED, "You can not be in the passenger seat to teleport you have to be the drive or outside of the car");
- }
- }
- else
- {
- SetPlayerPos(playerid,objx[index],objy[index],objz[index]);
- format(string,128,"you have teleported to jbobjectid:%i",index);
- SendClientMessage(playerid, YELLOW, string);
- }
- if((allowence[1][playerid])==1)
- {
- if((playersinput)==1)
- {
- for(new count=0;count < MAX_PLAYERS;count++)
- {
- if(IsPlayerAdmince(count,3))
- {
- new name[128];
- GetPlayerName(playerid,name,sizeof(name));
- format(string,128,"%s has teleported to object id %i",name,index);
- SendClientMessage(count,DARKBLUE,string);
- }
- }
- }
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "You have to be atleast admin level 3 or Rcon admin or allowed to go to a object");
- }
- return 1;
- }
- CMD:copyobject(playerid, params[])
- {
- if((mapplayereditstate[playerid])==1)
- {
- new index,string[128],savestringname[128],playerfilename[128];
- new slotid = mapplayerslotid[playerid];
- if(sscanf(params,"i",index))
- {
- return SendClientMessage(playerid, RED, "SYNTAX /copyobject [playerjbobjectid]");
- }
- if((mapobjectstate[slotid][index])==0)
- {
- return SendClientMessage(playerid, RED, "You have selected and object the does not exist");
- }
- for(new count;count < MAX_OBJECTS;count++)
- {
- if((mapobjectstate[slotid][count])==0)
- {
- format(playerfilename,sizeof(playerfilename),"%s",mapname[slotid]);
- playermapx[slotid][count] = playermapx[slotid][index];
- playermapy[slotid][count] = playermapy[slotid][index];
- playermapz[slotid][count] = playermapz[slotid][index];
- playermapxrot[slotid][count] = playermapxrot[slotid][index];
- playermapyrot[slotid][count] = playermapyrot[slotid][index];
- playermapzrot[slotid][count] = playermapzrot[slotid][index];
- mapobjectmid[slotid][count] = mapobjectmid[slotid][index];
- format(savestringname,sizeof(savestringname),"mapobjectstring[%i]",index);
- new mapstring[128];
- format(mapstring,sizeof(mapstring),"%s",dini_Get(playerfilename,savestringname));
- dini_Set(playerfilename,"mapname",(mapname[slotid]));
- mapobjectstate[slotid][count] = 1;
- format(savestringname,sizeof(savestringname),"playermapx[%i]",count);
- dini_FloatSet(playerfilename,savestringname,(playermapx[slotid][count]));
- format(savestringname,sizeof(savestringname),"playermapy[%i]",count);
- dini_FloatSet(playerfilename,savestringname,(playermapy[slotid][count]));
- format(savestringname,sizeof(savestringname),"playermapz[%i]",count);
- dini_FloatSet(playerfilename,savestringname,(playermapz[slotid][count]));
- format(savestringname,sizeof(savestringname),"playermapxrot[%i]",count);
- dini_FloatSet(playerfilename,savestringname,(playermapxrot[slotid][count]));
- format(savestringname,sizeof(savestringname),"playermapyrot[%i]",count);
- dini_FloatSet(playerfilename,savestringname,(playermapyrot[slotid][count]));
- format(savestringname,sizeof(savestringname),"playermapzrot[%i]",count);
- dini_FloatSet(playerfilename,savestringname,(playermapxrot[slotid][count]));
- format(savestringname,sizeof(savestringname),"mapobjectstring[%i]",count);
- dini_Set(playerfilename,savestringname,mapstring);
- format(savestringname,sizeof(savestringname),"mapobjectmid[%i]",count);
- dini_IntSet(playerfilename,savestringname,(mapobjectmid[slotid][count]));
- format(savestringname,sizeof(savestringname),"mapobjectstate[%i]",count);
- dini_IntSet(playerfilename,savestringname,(mapobjectstate[slotid][count]));
- format(string,sizeof(string),"object:%s--ID:Objectid-%i-%i-Mid:%i-mapname:%s",mapstring,count,slotid,mapobjectmid[slotid][count],mapname[slotid]);
- mapobject[slotid][count] = CreateDynamicObject(mapobjectmid[slotid][count],playermapx[slotid][count],playermapy[slotid][count],playermapz[slotid][count],playermapxrot[slotid][count],playermapyrot[slotid][count],playermapzrot[slotid][count]);
- for(new i;i < MAX_PLAYERS;i++)
- {
- if((showlabel[i])==1)
- {
- mapobjectlabel[slotid][count] = CreatePlayer3DTextLabel(i,string,COLOR,playermapx[slotid][count],playermapy[slotid][count],playermapz[slotid][count],DISTANCELABEL,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0);
- }
- }
- if((allowence[0][playerid])==1)
- {
- if((playersinput)==1)
- {
- for(new count2=0;count2 < MAX_PLAYERS;count2++)
- {
- if(IsPlayerAdmince(count2,3))
- {
- new name[128];
- GetPlayerName(playerid,name,sizeof(name));
- format(string,128,"%s has copyed object id %i",name,index);
- SendClientMessage(count2,DARKBLUE,string);
- }
- }
- }
- }
- SendClientMessage(playerid, LIGHTBLUE,"You have copyed an object");
- return 1;
- }
- }
- return 1;
- }
- if(IsPlayerAdmince(playerid,3)||(allowence[0][playerid])==1&&(allowence[1][playerid])==1)
- {
- new index;
- if(sscanf(params,"i",index))
- {
- return SendClientMessage(playerid, RED, "SYNTAX /copyobject [jbobjectid]");
- }
- if((objectstate[index])==1)
- {
- for(new count;count < MAX_OBJECTS;count++)
- {
- if((objectstate[count])==0)
- {
- objectstate[count]= 1;
- new string[128],savestringname[128];
- objx[count] = objx[index];
- objy[count] = objy[index];
- objz[count] = objz[index];
- objxrot[count] = objxrot[index];
- objyrot[count] = objyrot[index];
- objzrot[count] = objzrot[index];
- jbobjectid[count] = jbobjectid[index];
- objectstring[count] = objectstring[index];
- objectcolor[count] = objectcolor[index];
- objects[count] = CreateDynamicObject(jbobjectid[count],objx[count],objy[count],objz[count],objxrot[count],objyrot[count],objzrot[count],0);
- format(savestringname,sizeof(savestringname),"objx[%i]",count);
- dini_FloatSet(objectsfilename,savestringname,(objx[count]));
- format(savestringname,sizeof(savestringname),"objy[%i]",count);
- dini_FloatSet(objectsfilename,savestringname,(objy[count]));
- format(savestringname,sizeof(savestringname),"objz[%i]",count);
- dini_FloatSet(objectsfilename,savestringname,(objz[count]));
- format(savestringname,sizeof(savestringname),"objectcolor[%i]",objectcolor[count]);
- dini_IntSet(objectsfilename,savestringname,(objectcolor[count]));
- format(savestringname,sizeof(savestringname),"objxrot[%i]",count);
- dini_FloatSet(objectsfilename,savestringname,(objxrot[count]));
- format(savestringname,sizeof(savestringname),"objyrot[%i]",count);
- dini_FloatSet(objectsfilename,savestringname,(objyrot[count]));
- format(savestringname,sizeof(savestringname),"objzrot[%i]",count);
- dini_FloatSet(objectsfilename,savestringname,(objzrot[count]));
- format(savestringname,sizeof(savestringname),"object[%i]",count);
- dini_IntSet(objectsfilename,savestringname,(jbobjectid[count]));
- format(savestringname,sizeof(savestringname),"objectlabel[%i]",count);
- dini_Set(objectsfilename,savestringname,(objectstring[count]));
- format(savestringname,sizeof(savestringname),"objectstate[%i]",count);
- dini_IntSet(objectsfilename,savestringname,(objectstate[count]));
- format(string,128,"you have copy object:%i, The copyed object id is %i",index,count);
- SendClientMessage(playerid, YELLOW, string);
- SendClientMessage(playerid, ORANGE, "!NOTE the objects are right on top of eachother make sure you move them");
- for(new i;i < MAX_PLAYERS;i++)
- {
- if(IsPlayerConnected(i))
- {
- if((showlabel[i])==1)
- {
- format(string,128,"object:%s--ID:%i-Objectid-%i",objectstring[count],count,jbobjectid[count]);
- objectlabel[count] = CreatePlayer3DTextLabel(i,string,COLOR,objx[count],objy[count],objz[count],DISTANCELABEL,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0);
- }
- }
- }
- if((objectcolor[count])==0)
- {
- SetDynamicObjectMaterial(objects[count],0,-1,"none","none",0);
- }
- else
- {
- SetDynamicObjectMaterial(objects[count],0 ,2707, "Shopping", "white",objectcolor[count]);
- }
- if((allowence[0][playerid])==1)
- {
- if((playersinput)==1)
- {
- for(new count2=0;count2 < MAX_PLAYERS;count2++)
- {
- if(IsPlayerAdmince(count2,3))
- {
- new name[128];
- GetPlayerName(playerid,name,sizeof(name));
- format(string,128,"%s has copyed object id %i the jbobjectid for the clone is %i the object id is %i",name,index,count,jbobjectid[count]);
- SendClientMessage(count2,DARKBLUE,string);
- }
- }
- }
- }
- return 1;
- }
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "This object does not exist");
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "You have to be atleast admin level 3 or Rcon admin or allowed to copyobjects to use this command");
- }
- return 1;
- }
- CMD:getobject(playerid, params[])
- {
- if((mapplayereditstate[playerid])==1)
- {
- new index,string[128],savestringname[128],playerfilename[128];
- new slotid = mapplayerslotid[playerid];
- if(sscanf(params,"i",index))
- {
- return SendClientMessage(playerid, RED, "SYNTAX /getobject [playerjbobjectid]");
- }
- if((mapobjectstate[slotid][index])==0)
- {
- return SendClientMessage(playerid, RED, "You have selected and object the does not exist");
- }
- format(playerfilename,sizeof(playerfilename),"%s",mapname[slotid]);
- new Float:x,Float:y,Float:z;
- GetPlayerPos(playerid,x,y,z);
- playermapx[slotid][index] = x + 5;
- playermapy[slotid][index] = y;
- playermapz[slotid][index] = z;
- MoveDynamicObject(mapobject[slotid][index],playermapx[slotid][index],playermapy[slotid][index],playermapz[slotid][index],100.0,playermapxrot[slotid][index],playermapyrot[slotid][index],playermapzrot[slotid][index]);
- SendClientMessage(playerid, LIGHTBLUE, "You brought the object over to where you are");
- format(savestringname,sizeof(savestringname),"mapobjectstring[%i]",index);
- new mapstring[128];
- format(mapstring,sizeof(mapstring),"%s",dini_Get(playerfilename,savestringname));
- for(new i;i < MAX_PLAYERS;i++)
- {
- if(IsPlayerConnected(i))
- {
- if((showlabel[i])==1)
- {
- format(string,sizeof(string),"object:%s--ID:Objectid-%i-%i-Mid:%i-mapname:%s",mapstring,index,slotid,mapobjectmid[slotid][index],mapname[slotid]);
- DeletePlayer3DTextLabel(i,mapobjectlabel[slotid][index]);
- mapobjectlabel[slotid][index] = CreatePlayer3DTextLabel(i,string,COLOR,playermapx[slotid][index],playermapy[slotid][index],playermapz[slotid][index],DISTANCELABEL,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0);
- }
- }
- }
- format(savestringname,sizeof(savestringname),"playermapx[%i]",index);
- dini_FloatSet(playerfilename,savestringname,(playermapx[slotid][index]));
- format(savestringname,sizeof(savestringname),"playermapy[%i]",index);
- dini_FloatSet(playerfilename,savestringname,(playermapy[slotid][index]));
- format(savestringname,sizeof(savestringname),"playermapz[%i]",index);
- dini_FloatSet(playerfilename,savestringname,(playermapz[slotid][index]));
- if((allowence[1][playerid])==1)
- {
- if((playersinput)==1)
- {
- for(new count=0;count < MAX_PLAYERS;count++)
- {
- if(IsPlayerAdmince(count,3))
- {
- new name[128];
- GetPlayerName(playerid,name,sizeof(name));
- format(string,sizeof(string),"%s has brought over object id:%i from catagory %i to were he is witch is...",name,index,slotid);
- SendClientMessage(count,DARKBLUE,string);
- 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]);
- SendClientMessage(count,DARKBLUE,string);
- }
- }
- }
- }
- return 1;
- }
- if(IsPlayerAdmince(playerid,3)||(allowence[1][playerid])==1)
- {
- new index,string[128],savestringname[128];
- if(sscanf(params, "i",index))
- {
- return SendClientMessage(playerid, RED, "SYNTAX /getobject [jbobjectid]");
- }
- if((objectstate[index])==0)
- {
- return SendClientMessage(playerid, RED, "This object does not exist");
- }
- new Float:x,Float:y,Float:z;
- GetPlayerPos(playerid,x,y,z);
- objx[index] = x + 5;
- objy[index] = y;
- objz[index] = z;
- MoveDynamicObject(objects[index],objx[index],objy[index],objz[index],100.0,objxrot[index],objyrot[index],objzrot[index]);
- SendClientMessage(playerid, LIGHTBLUE, "You brought the object over to where you are");
- for(new i;i < MAX_PLAYERS;i++)
- {
- if(IsPlayerConnected(i))
- {
- if((showlabel[i])==1)
- {
- DeletePlayer3DTextLabel(i,objectlabel[index]);
- format(string,128,"object:%s--ID:%i-Objectid-%i",objectstring[index],index,jbobjectid[index]);
- objectlabel[index] = CreatePlayer3DTextLabel(i,string,COLOR,objx[index],objy[index],objz[index],DISTANCELABEL,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0);
- }
- }
- }
- format(savestringname,sizeof(savestringname),"objx[%i]",index);
- dini_FloatSet(objectsfilename,savestringname,(objx[index]));
- format(savestringname,sizeof(savestringname),"objy[%i]",index);
- dini_FloatSet(objectsfilename,savestringname,(objy[index]));
- format(savestringname,sizeof(savestringname),"objz[%i]",index);
- dini_FloatSet(objectsfilename,savestringname,(objz[index]));
- if((allowence[1][playerid])==1)
- {
- if((playersinput)==1)
- {
- for(new count=0;count < MAX_PLAYERS;count++)
- {
- if(IsPlayerAdmince(count,3))
- {
- new name[128];
- GetPlayerName(playerid,name,sizeof(name));
- format(string,sizeof(string),"%s has brought over object id:%i to were he is witch is...",name,index);
- SendClientMessage(count,DARKBLUE,string);
- 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]);
- SendClientMessage(count,DARKBLUE,string);
- }
- }
- }
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "You have to be admin level 3 or rcon or have an allowence to moveobjects");
- }
- return 1;
- }
- CMD:addobject(playerid,params[])//mark
- {
- if(IsPlayerAdmince(playerid,3)||(allowence[0][playerid])==1)
- {
- new tag = 0,pass = 0,slotid;
- if((mapplayereditstate[playerid])==1)
- {
- slotid = mapplayerslotid[playerid];
- tag = 1;
- }
- for(new count;count < MAX_OBJECTS;count++)
- {
- if((tag)==1)
- {
- if((mapobjectstate[slotid][count])==0)
- {
- pass = 1;
- }
- }
- else
- {
- if((objectstate[count])==0)
- {
- pass = 1;
- }
- }
- if((pass)==1)
- {
- if((tag)==0)
- {
- objectstate[count] = 1;
- }
- else
- {
- mapobjectstate[slotid][count] = 0;
- }
- objectindex[playerid] = count;
- 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");
- if((allowence[0][playerid])==1)
- {
- if((playersinput)==1)
- {
- for(new count2=0;count2 < MAX_PLAYERS;count2++)
- {
- if(IsPlayerAdmince(count2,3))
- {
- new string[128],name[128];
- GetPlayerName(playerid,name,sizeof(name));
- format(string,128,"%s is adding an object",name);
- SendClientMessage(count2,DARKBLUE,string);
- }
- }
- }
- }
- return 1;
- }
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "You have to be atleast admin level 3 or Rcon admin or allowed to addobjects to use this command");
- }
- return 1;
- }
- CMD:setobject(playerid,params[])
- {
- if((mapplayereditstate[playerid])==1)
- {
- new choice[64],choice2[64],input,index,speed;
- new string[128],savestringname[128],playerfilename[128];
- new slotid = mapplayerslotid[playerid];
- if(sscanf(params,"s["#64"]s["#64"]iii",choice2,choice,index,input,speed))
- {
- SendClientMessage(playerid, RED, "SYNTAX /setobject [choice2] [choice] [playerobjectid] [ammount] [speed]");
- SendClientMessage(playerid, RED, "Choice:xrot x yrot y zrot z");
- SendClientMessage(playerid, RED, "Choice2:Set,shift+,shift-");
- return 1;
- }
- oldx[playerid] = playermapx[slotid][index];
- oldy[playerid] = playermapy[slotid][index];
- oldz[playerid] = playermapz[slotid][index];
- oldxrot[playerid] = playermapxrot[slotid][index];
- oldyrot[playerid] = playermapyrot[slotid][index];
- oldzrot[playerid] = playermapzrot[slotid][index];
- if((speed) <= 0)
- {
- return SendClientMessage(playerid, RED, "you can't make the speed 0 or slower");
- }
- if((mapobjectstate[slotid][index])==0)
- {
- return SendClientMessage(playerid, RED, "You have selected and object the does not exist");
- }
- if(strcmp(choice2,"set",true,64)==0)
- {
- if(strcmp(choice,"xrot",true,64)==0)
- {
- playermapxrot[slotid][index] = input;
- }
- else if(strcmp(choice,"yrot",true,64)==0)
- {
- playermapyrot[slotid][index] = input;
- }
- else if(strcmp(choice,"zrot",true,64)==0)
- {
- playermapzrot[slotid][index] = input;
- }
- else if(strcmp(choice,"x",true,64)==0)
- {
- playermapx[slotid][index] = input;
- }
- else if(strcmp(choice,"y",true,64)==0)
- {
- playermapy[slotid][index] = input;
- }
- else if(strcmp(choice,"z",true,64)==0)
- {
- playermapz[slotid][index] = input;
- }
- else
- {
- SendClientMessage(playerid, RED, "SYNTAX /setobject [choice2] [choice] [playerobjectid] [ammount] [speed]");
- SendClientMessage(playerid, RED, "Choice:xrot x yrot y zrot z");
- SendClientMessage(playerid, RED, "Choice2:Set,shift+,shift-");
- return 1;
- }
- }
- else if(strcmp(choice2,"shift+",true,64)==0)
- {
- if(strcmp(choice,"xrot",true,64)==0)
- {
- playermapxrot[slotid][index] = playermapxrot[slotid][index] + input;
- }
- else if(strcmp(choice,"yrot",true,64)==0)
- {
- playermapyrot[slotid][index] = playermapyrot[slotid][index] + input;
- }
- else if(strcmp(choice,"zrot",true,64)==0)
- {
- playermapzrot[slotid][index] = playermapzrot[slotid][index] + input;
- }
- else if(strcmp(choice,"x",true,64)==0)
- {
- playermapx[slotid][index] = playermapx[slotid][index] + input;
- }
- else if(strcmp(choice,"y",true,64)==0)
- {
- playermapy[slotid][index] = playermapy[slotid][index] + input;
- }
- else if(strcmp(choice,"z",true,64)==0)
- {
- playermapz[slotid][index] = playermapz[slotid][index] + input;
- }
- else
- {
- SendClientMessage(playerid, RED, "SYNTAX /setobject [choice2] [choice] [playerobjectid] [ammount] [speed]");
- SendClientMessage(playerid, RED, "Choice:xrot x yrot y zrot z");
- SendClientMessage(playerid, RED, "Choice2:Set,shift+,shift-");
- return 1;
- }
- }
- else if(strcmp(choice2,"shift-",true,64)==0)
- {
- if(strcmp(choice,"xrot",true,64)==0)
- {
- playermapxrot[slotid][index] = playermapxrot[slotid][index] - input;
- }
- else if(strcmp(choice,"yrot",true,64)==0)
- {
- playermapyrot[slotid][index] = playermapyrot[slotid][index] - input;
- }
- else if(strcmp(choice,"zrot",true,64)==0)
- {
- playermapzrot[slotid][index] = playermapzrot[slotid][index] - input;
- }
- else if(strcmp(choice,"x",true,64)==0)
- {
- playermapx[slotid][index] = playermapx[slotid][index] - input;
- }
- else if(strcmp(choice,"y",true,64)==0)
- {
- playermapy[slotid][index] = playermapy[slotid][index] - input;
- }
- else if(strcmp(choice,"z",true,64)==0)
- {
- playermapz[slotid][index] = playermapz[slotid][index] - input;
- }
- else
- {
- SendClientMessage(playerid, RED, "SYNTAX /setobject [choice2] [choice] [playerobjectid] [ammount] [speed]");
- SendClientMessage(playerid, RED, "Choice:xrot x yrot y zrot z");
- SendClientMessage(playerid, RED, "Choice2:Set,shift+,shift-");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "SYNTAX /setobject [choice2] [choice] [playerobjectid] [ammount] [speed]");
- SendClientMessage(playerid, RED, "Choice:xrot x yrot y zrot z");
- SendClientMessage(playerid, RED, "Choice2:Set,shift+,shift-");
- return 1;
- }
- format(playerfilename,sizeof(playerfilename),"%s",mapname[slotid]);
- MoveDynamicObject(mapobject[slotid][index],playermapx[slotid][index],playermapy[slotid][index],playermapz[slotid][index],speed,playermapxrot[slotid][index],playermapyrot[slotid][index],playermapzrot[slotid][index]);
- SendClientMessage(playerid, LIGHTBLUE, "You have moved this object");
- format(savestringname,sizeof(savestringname),"playermapx[%i]",index);
- dini_FloatSet(playerfilename,savestringname,(playermapx[slotid][index]));
- format(savestringname,sizeof(savestringname),"playermapy[%i]",index);
- dini_FloatSet(playerfilename,savestringname,(playermapy[slotid][index]));
- format(savestringname,sizeof(savestringname),"playermapz[%i]",index);
- dini_FloatSet(playerfilename,savestringname,(playermapz[slotid][index]));
- format(savestringname,sizeof(savestringname),"playermapxrot[%i]",index);
- dini_FloatSet(playerfilename,savestringname,(playermapxrot[slotid][index]));
- format(savestringname,sizeof(savestringname),"playermapyrot[%i]",index);
- dini_FloatSet(playerfilename,savestringname,(playermapyrot[slotid][index]));
- format(savestringname,sizeof(savestringname),"playermapzrot[%i]",index);
- dini_FloatSet(playerfilename,savestringname,(playermapzrot[slotid][index]));
- format(savestringname,sizeof(savestringname),"mapobjectstate[%i]",index);
- dini_IntSet(playerfilename,savestringname,(mapobjectstate[slotid][index]));
- format(savestringname,sizeof(savestringname),"mapobjectstring[%i]",index);
- new mapstring[128];
- format(mapstring,sizeof(mapstring),"%s",dini_Get(playerfilename,savestringname));
- for(new i;i < MAX_PLAYERS;i++)
- {
- if(IsPlayerConnected(i))
- {
- if((showlabel[i])==1)
- {
- format(string,sizeof(string),"object:%s--ID:Objectid-%i-%i-Mid:%i-mapname:%s",mapstring,index,slotid,mapobjectmid[slotid][index],mapname[slotid]);
- DeletePlayer3DTextLabel(i,mapobjectlabel[slotid][index]);
- mapobjectlabel[slotid][index] = CreatePlayer3DTextLabel(i,string,COLOR,playermapx[slotid][index],playermapy[slotid][index],playermapz[slotid][index],DISTANCELABEL,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0);
- }
- }
- }
- if((allowence[1][playerid])==1)
- {
- if((playersinput)==1)
- {
- for(new count=0;count < MAX_PLAYERS;count++)
- {
- if(IsPlayerAdmince(count,3))
- {
- new name[128];
- GetPlayerName(playerid,name,sizeof(name));
- format(string,sizeof(string),"%s has rotated object id:%i-%i",name,index,slotid);
- SendClientMessage(count,DARKBLUE,string);
- format(string,sizeof(string),"[from] [%f - %f -%f -angle- %f - %f - %f]",oldx[playerid],oldy[playerid],oldz[playerid],oldxrot[playerid],oldyrot[playerid],oldzrot[playerid]);
- SendClientMessage(count,DARKBLUE,string);
- format(string,128,"[To] [%f - %f -%f -angle- %f - %f - %f]",playermapx[slotid][index],playermapy[slotid][index],playermapz[slotid][index],playermapxrot[slotid][index],playermapyrot[slotid][index],playermapzrot[slotid][index]);
- SendClientMessage(count,DARKBLUE,string);
- }
- }
- }
- }
- return 1;
- }
- if(IsPlayerAdmince(playerid,3)||(allowence[1][playerid])==1)
- {
- new choice[64],choice2[64],input,index,speed;
- new string[128];
- if(sscanf(params,"s["#64"]s["#64"]iii",choice2,choice,index,input,speed))
- {
- SendClientMessage(playerid, RED, "SYNTAX /setobject [choice2] [choice] [objectid] [ammount] [speed]");
- SendClientMessage(playerid, RED, "Choice:xrot x yrot y zrot z");
- SendClientMessage(playerid, RED, "Choice2:Set,shift+,shift-");
- return 1;
- }
- oldx[playerid] = objx[index];
- oldy[playerid] = objy[index];
- oldz[playerid] = objz[index];
- oldxrot[playerid] = objxrot[index];
- oldyrot[playerid] = objyrot[index];
- oldzrot[playerid] = objzrot[index];
- if((speed) <= 0)
- {
- return SendClientMessage(playerid, RED, "you can't make the speed 0 or slower");
- }
- if((objectstate[index])==0)
- {
- return SendClientMessage(playerid, RED, "This object does not exist");
- }
- if(strcmp(choice2,"set",true,64)==0)
- {
- if(strcmp(choice,"xrot",true,64)==0)
- {
- objxrot[index] = input;
- }
- else if(strcmp(choice,"yrot",true,64)==0)
- {
- objyrot[index] = input;
- }
- else if(strcmp(choice,"zrot",true,64)==0)
- {
- objzrot[index] = input;
- }
- else if(strcmp(choice,"x",true,64)==0)
- {
- objx[index] = input;
- }
- else if(strcmp(choice,"y",true,64)==0)
- {
- objy[index] = input;
- }
- else if(strcmp(choice,"z",true,64)==0)
- {
- objz[index] = input;
- }
- else
- {
- SendClientMessage(playerid, RED, "SYNTAX /setobject [choice2] [choice] [objectid] [ammount] [speed]");
- SendClientMessage(playerid, RED, "Choice:xrot x yrot y zrot z");
- SendClientMessage(playerid, RED, "Choice2:Set,shift+,shift-");
- return 1;
- }
- }
- else if(strcmp(choice2,"shift+",true,64)==0)
- {
- if(strcmp(choice,"xrot",true,64)==0)
- {
- objxrot[index] = objxrot[index] + input;
- }
- else if(strcmp(choice,"yrot",true,64)==0)
- {
- objyrot[index] = objxrot[index] + input;
- }
- else if(strcmp(choice,"zrot",true,64)==0)
- {
- objzrot[index] = objzrot[index] + input;
- }
- else if(strcmp(choice,"x",true,64)==0)
- {
- objx[index] = objx[index] + input;
- }
- else if(strcmp(choice,"y",true,64)==0)
- {
- objy[index] = objy[index] + input;
- }
- else if(strcmp(choice,"z",true,64)==0)
- {
- objz[index] = objz[index] + input;
- }
- else
- {
- SendClientMessage(playerid, RED, "SYNTAX /setobject [choice2] [choice] [objectid] [ammount] [speed]");
- SendClientMessage(playerid, RED, "Choice:xrot x yrot y zrot z");
- SendClientMessage(playerid, RED, "Choice2:Set,shift+,shift-");
- return 1;
- }
- }
- else if(strcmp(choice2,"shift-",true,64)==0)
- {
- if(strcmp(choice,"xrot",true,64)==0)
- {
- objxrot[index] = objxrot[index] - input;
- }
- else if(strcmp(choice,"yrot",true,64)==0)
- {
- objyrot[index] = objxrot[index] - input;
- }
- else if(strcmp(choice,"zrot",true,64)==0)
- {
- objzrot[index] = objzrot[index] - input;
- }
- else if(strcmp(choice,"x",true,64)==0)
- {
- objx[index] = objx[index] - input;
- }
- else if(strcmp(choice,"y",true,64)==0)
- {
- objy[index] = objy[index] - input;
- }
- else if(strcmp(choice,"z",true,64)==0)
- {
- objz[index] = objz[index] - input;
- }
- else
- {
- SendClientMessage(playerid, RED, "SYNTAX /setobject [choice2] [choice] [objectid] [ammount] [speed]");
- SendClientMessage(playerid, RED, "Choice:xrot x yrot y zrot z");
- SendClientMessage(playerid, RED, "Choice2:Set,shift+,shift-");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "SYNTAX /setobject [choice2] [choice] [objectid] [ammount] [speed]");
- SendClientMessage(playerid, RED, "Choice:xrot x yrot y zrot z");
- SendClientMessage(playerid, RED, "Choice2:Set,shift+,shift-");
- return 1;
- }
- new savestringname[128];
- MoveDynamicObject(objects[index],objx[index],objy[index],objz[index],speed,objxrot[index],objyrot[index],objzrot[index]);
- SendClientMessage(playerid, LIGHTBLUE, "You have moved this object");
- format(savestringname,sizeof(savestringname),"objx[%i]",index);
- dini_FloatSet(objectsfilename,savestringname,(objx[index]));
- format(savestringname,sizeof(savestringname),"objy[%i]",index);
- dini_FloatSet(objectsfilename,savestringname,(objy[index]));
- format(savestringname,sizeof(savestringname),"objz[%i]",index);
- dini_FloatSet(objectsfilename,savestringname,(objz[index]));
- format(savestringname,sizeof(savestringname),"objxrot[%i]",index);
- dini_FloatSet(objectsfilename,savestringname,(objxrot[index]));
- format(savestringname,sizeof(savestringname),"objyrot[%i]",index);
- dini_FloatSet(objectsfilename,savestringname,(objyrot[index]));
- format(savestringname,sizeof(savestringname),"objzrot[%i]",index);
- dini_FloatSet(objectsfilename,savestringname,(objzrot[index]));
- format(string,128,"object:%s--ID:%i-Objectid-%i",objectstring[index],index,jbobjectid[index]);
- for(new i=0;i < MAX_PLAYERS;i++)
- {
- if(IsPlayerConnected(i))
- {
- if((showlabel[i])==1)
- {
- DeletePlayer3DTextLabel(i,objectlabel[index]);
- objectlabel[index] = CreatePlayer3DTextLabel(i,string,COLOR,objx[index],objy[index],objz[index],DISTANCELABEL,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0);
- }
- }
- }
- if((allowence[1][playerid])==1)
- {
- if((playersinput)==1)
- {
- for(new count=0;count < MAX_PLAYERS;count++)
- {
- if(IsPlayerAdmince(count,3))
- {
- new name[128];
- GetPlayerName(playerid,name,sizeof(name));
- format(string,sizeof(string),"%s has rotated object id:%i",name,index);
- SendClientMessage(count,DARKBLUE,string);
- format(string,sizeof(string),"[from] [%f - %f -%f -angle- %f - %f - %f]",oldx[playerid],oldy[playerid],oldz[playerid],oldxrot[playerid],oldyrot[playerid],oldzrot[playerid]);
- SendClientMessage(count,DARKBLUE,string);
- format(string,128,"[To] [%f - %f -%f -angle- %f - %f - %f]",objx[index],objy[index],objz[index],objxrot[index],objyrot[index],objzrot[index]);
- SendClientMessage(count,DARKBLUE,string);
- }
- }
- }
- }
- }
- return 1;
- }
- CMD:setobjectcolor(playerid, params[])
- {
- if((mapplayereditstate[playerid])==1)
- {
- return SendClientMessage(playerid, RED, "Private maps do not handel object colors");
- }
- if(IsPlayerAdmince(playerid,3)||(allowence[1][playerid])==1)
- {
- new index,hex:c,choice[64],string[128];
- if(sscanf(params,"is["#64"]",index,choice))
- {
- SendClientMessage(playerid, RED, "SYNTAX /setobjectcolor [objectid] [choice/hexcolor]");
- SendClientMessage(playerid, RED, "Choice:green,red,blue,yellow,pink,white,grey,purple,orange,normal");
- }
- if((objectstate[index])==0)
- {
- return SendClientMessage(playerid, RED, "This object does not exist");
- }
- if(strcmp(choice,"green",true,64)==0)
- {
- c = 0xFF00FF00;
- }
- else if(strcmp(choice,"red",true,64)==0)
- {
- c = 0xA71212FF;
- }
- else if(strcmp(choice,"blue",true,64)==0)
- {
- c = 0xFF0783B1;
- }
- else if(strcmp(choice,"yellow",true,64)==0)
- {
- c = 0xFFFFFF06;
- }
- else if(strcmp(choice,"pink",true,64)==0)
- {
- c = 0xFFFF00FF;
- }
- else if(strcmp(choice,"white",true,64)==0)
- {
- c = 0xFFFFFFFF;
- }
- else if(strcmp(choice,"grey",true,64)==0)
- {
- c = 0xFFC0C0C0;
- }
- else if(strcmp(choice,"purple",true,64)==0)
- {
- c = 0xFF8000FF;
- }
- else if(strcmp(choice,"orange",true,64)==0)
- {
- c = 0xFFFF8000;
- }
- else if(strcmp(choice,"normal",true,64)==0)
- {
- c = 0;
- }
- else
- {
- c = strval(choice);
- SendClientMessage(playerid, ORANGE,"Note please input a ARGB not a RGBA");
- }
- objectcolor[index] = c;
- if((objectcolor[index])==0)
- {
- SetDynamicObjectMaterial(objects[index],0,-1,"none","none",0);
- }
- else
- {
- SetDynamicObjectMaterial(objects[index],0 ,2707, "Shopping", "white",objectcolor[index]);
- }
- new savestringname[128];
- format(savestringname,sizeof(savestringname),"objectcolor[%i]",index);
- dini_IntSet(objectsfilename,savestringname,(objectcolor[index]));
- if((objectcolor[index])==0)
- {
- SendClientMessage(playerid, WHITE, "You have set the objects color back to normal");
- }
- else
- {
- format(string,sizeof(string),"You have set the objects color to %x",objectcolor[index]);
- SendClientMessage(playerid,LIGHTBLUE,string);
- }
- if((allowence[1][playerid])==1)
- {
- if((playersinput)==1)
- {
- for(new count=0;count < MAX_PLAYERS;count++)
- {
- if(IsPlayerAdmince(count,3))
- {
- new name[128];
- GetPlayerName(playerid,name,sizeof(name));
- format(string,128,"%s has changed the color for objectid %i",name,index);
- SendClientMessage(count,DARKBLUE,string);
- }
- }
- }
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "You have to be atleast admin level 3 or Rcon admin or allowed to moveobjects to use this command");
- }
- return 1;
- }
- CMD:moveawayfromobject(playerid, params[])
- {
- if((mapplayereditstate[playerid])==1)
- {
- new index,choice[64],ammount;
- new slotid = mapplayerslotid[playerid];
- if(sscanf(params,"is["#64"]i",index,choice,ammount))
- {
- SendClientMessage(playerid, RED, "/Syntax /moveawayfromobject [playerobjid] [choice] [ammount]");
- SendClientMessage(playerid, RED, "Choice:x,y,z");
- return 1;
- }
- if((mapobjectstate[slotid][index])==0)
- {
- return SendClientMessage(playerid, RED, "You have selected and object the does not exist");
- }
- if(IsPlayerInRangeOfPoint(playerid,25.0,playermapx[slotid][index],playermapy[slotid][index],playermapz[slotid][index]))
- {
- if(strcmp(choice,"x",true,64)==0)
- {
- if(IsPlayerInAnyVehicle(playerid))
- { //
- if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- SetVehiclePos(vehicleid,playermapx[slotid][index]+ammount,playermapy[slotid][index],playermapz[slotid][index]);
- SendClientMessage(playerid, YELLOW, "You have teleported away from the object");
- }
- else
- {
- SendClientMessage(playerid, RED, "You have to be the driver inorder to teleport from the object");
- }
- }
- else
- {
- SetPlayerPos(playerid,playermapx[slotid][index]+ammount,playermapy[slotid][index],playermapz[slotid][index]);
- SendClientMessage(playerid, YELLOW, "You have teleported away from the object");
- }
- }
- else if(strcmp(choice,"y",true,64)==0)
- {
- if(IsPlayerInAnyVehicle(playerid))
- { //
- if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- SetVehiclePos(vehicleid,playermapx[slotid][index],playermapy[slotid][index]+ammount,playermapz[slotid][index]);
- SendClientMessage(playerid, YELLOW, "You have teleported away from the object");
- }
- else
- {
- SendClientMessage(playerid, RED, "You have to be the driver inorder to teleport from the object");
- }
- }
- else
- {
- SetPlayerPos(playerid,playermapx[slotid][index],playermapy[slotid][index]+ammount,playermapz[slotid][index]);
- SendClientMessage(playerid, YELLOW, "You have teleported away from the object");
- }
- }
- else if(strcmp(choice,"z",true,64)==0)
- {
- if(IsPlayerInAnyVehicle(playerid))
- { //
- if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- SetVehiclePos(vehicleid,playermapx[slotid][index],playermapy[slotid][index],playermapz[slotid][index]+ammount);
- SendClientMessage(playerid, YELLOW, "You have teleported away from the object");
- }
- else
- {
- SendClientMessage(playerid, RED, "You have to be the driver inorder to teleport from the object");
- }
- }
- else
- {
- SetPlayerPos(playerid,playermapx[slotid][index],playermapy[slotid][index],playermapz[slotid][index]+ammount);
- SendClientMessage(playerid, YELLOW, "You have teleported away from the object");
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "/Syntax /moveawayfromobject [objid] [choice] [ammount]");
- SendClientMessage(playerid, RED, "Choice:x,y,z");
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "You are to far away from the object inorder to teleport from it");
- }
- return 1;
- }
- if(IsPlayerAdmince(playerid,3)||(allowence[0][playerid])==1)
- {
- new index,choice[64],ammount;
- if(sscanf(params,"is["#64"]i",index,choice,ammount))
- {
- SendClientMessage(playerid, RED, "/Syntax /moveawayfromobject [objid] [choice] [ammount]");
- SendClientMessage(playerid, RED, "Choice:x,y,z");
- return 1;
- }
- if((objectstate[index])==0)
- {
- return SendClientMessage(playerid, RED, "This object does not exist");
- }
- if(IsPlayerInRangeOfPoint(playerid,25.0,objx[index],objy[index],objz[index]))
- {
- if(strcmp(choice,"x",true,64)==0)
- {
- if(IsPlayerInAnyVehicle(playerid))
- { //
- if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- SetVehiclePos(vehicleid,objx[index]+ammount,objy[index],objz[index]);
- SendClientMessage(playerid, YELLOW, "You have teleported away from the object");
- }
- else
- {
- SendClientMessage(playerid, RED, "You have to be the driver inorder to teleport from the object");
- }
- }
- else
- {
- SetPlayerPos(playerid,objx[index]+ammount,objy[index],objz[index]);
- SendClientMessage(playerid, YELLOW, "You have teleported away from the object");
- }
- }
- else if(strcmp(choice,"y",true,64)==0)
- {
- if(IsPlayerInAnyVehicle(playerid))
- { //
- if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- SetVehiclePos(vehicleid,objx[index],objy[index]+ammount,objz[index]);
- SendClientMessage(playerid, YELLOW, "You have teleported away from the object");
- }
- else
- {
- SendClientMessage(playerid, RED, "You have to be the driver inorder to teleport from the object");
- }
- }
- else
- {
- SetPlayerPos(playerid,objx[index],objy[index]+ammount,objz[index]);
- SendClientMessage(playerid, YELLOW, "You have teleported away from the object");
- }
- }
- else if(strcmp(choice,"z",true,64)==0)
- {
- if(IsPlayerInAnyVehicle(playerid))
- { //
- if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- SetVehiclePos(vehicleid,objx[index],objy[index],objz[index]+ammount);
- SendClientMessage(playerid, YELLOW, "You have teleported away from the object");
- }
- else
- {
- SendClientMessage(playerid, RED, "You have to be the driver inorder to teleport from the object");
- }
- }
- else
- {
- SetPlayerPos(playerid,objx[index],objy[index],objz[index]+ammount);
- SendClientMessage(playerid, YELLOW, "You have teleported away from the object");
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "/Syntax /moveawayfromobject [objid] [choice] [ammount]");
- SendClientMessage(playerid, RED, "Choice:x,y,z");
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "You are to far away from the object inorder to teleport from it");
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "You have to be atleast admin level 3 or Rcon admin or allowed to addobjects to use this command");
- }
- return 1;
- }
- CMD:moveobject(playerid, params[])
- {
- if((mapplayereditstate[playerid])==1)
- {
- new index;
- new string[128];
- new slotid = mapplayerslotid[playerid];
- if(sscanf(params,"i",index))
- {
- return SendClientMessage(playerid, RED, "SYNTAX:/moveobject [playerjbobjectid]");
- }
- if((mapobjectstate[slotid][index])==0)
- {
- return SendClientMessage(playerid, RED, "You have selected and object the does not exist");
- }
- EditDynamicObject(playerid,mapobject[slotid][index]);
- editobjnum[playerid] = index;
- edittype[playerid] = 2;
- if((allowence[1][playerid])==1)
- {
- if((playersinput)==1)
- {
- for(new count=0;count < MAX_PLAYERS;count++)
- {
- if(IsPlayerAdmince(count,3))
- {
- new name[128];
- GetPlayerName(playerid,name,sizeof(name));
- format(string,128,"%s is moveing objectid %i-%i",name,index,slotid);
- SendClientMessage(count,DARKBLUE,string);
- }
- }
- }
- }
- return 1;
- }
- if(IsPlayerAdmince(playerid,3)||(allowence[1][playerid])==1)
- {
- new index;
- new string[128];
- if(sscanf(params,"i",index))
- {
- return SendClientMessage(playerid, RED, "SYNTAX:/moveobject [jbobjectid]");
- }
- if((objectstate[index])==1)
- {
- EditDynamicObject(playerid,objects[index]);
- editobjnum[playerid] = index;
- edittype[playerid] = 1;
- if((allowence[1][playerid])==1)
- {
- if((playersinput)==1)
- {
- for(new count=0;count < MAX_PLAYERS;count++)
- {
- if(IsPlayerAdmince(count,3))
- {
- new name[128];
- GetPlayerName(playerid,name,sizeof(name));
- format(string,128,"%s is moveing objectid %i",name,index);
- SendClientMessage(count,DARKBLUE,string);
- }
- }
- }
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "This object does not exist");
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "You have to be atleast admin level 3 or Rcon admin or allowed to moveobjects to use this command");
- }
- return 1;
- }
- CMD:deleteobject(playerid,params[])
- {
- if((mapplayereditstate[playerid])==1)
- {
- new index,savestringname[128],string[128];
- new playerfilename[128];
- new slotid = mapplayerslotid[playerid];
- if(sscanf(params,"i",index))
- {
- return SendClientMessage(playerid, RED, "SYNTAX:/deleteobject [objectid]");
- }
- playermapx[slotid][index] = 0;
- playermapy[slotid][index] = 0;
- playermapz[slotid][index] = 0;
- playermapxrot[slotid][index] = 0;
- playermapyrot[slotid][index] = 0;
- playermapzrot[slotid][index] = 0;
- mapobjectstate[slotid][index] = 0;
- format(playerfilename,sizeof(playerfilename),"%s",mapname[slotid]);
- format(savestringname,sizeof(savestringname),"playermapx[%i]",index);
- dini_FloatSet(playerfilename,savestringname,(playermapx[slotid][index]));
- dini_Unset(playerfilename,savestringname);
- format(savestringname,sizeof(savestringname),"playermapy[%i]",index);
- dini_FloatSet(playerfilename,savestringname,(playermapy[slotid][index]));
- dini_Unset(playerfilename,savestringname);
- format(savestringname,sizeof(savestringname),"playermapz[%i]",index);
- dini_FloatSet(playerfilename,savestringname,(playermapz[slotid][index]));
- dini_Unset(playerfilename,savestringname);
- format(savestringname,sizeof(savestringname),"playermapxrot[%i]",index);
- dini_FloatSet(playerfilename,savestringname,(playermapxrot[slotid][index]));
- dini_Unset(playerfilename,savestringname);
- format(savestringname,sizeof(savestringname),"playermapyrot[%i]",index);
- dini_FloatSet(playerfilename,savestringname,(playermapyrot[slotid][index]));
- dini_Unset(playerfilename,savestringname);
- format(savestringname,sizeof(savestringname),"playermapzrot[%i]",index);
- dini_FloatSet(playerfilename,savestringname,(playermapxrot[slotid][index]));
- dini_Unset(playerfilename,savestringname);
- format(savestringname,sizeof(savestringname),"mapobjectstring[%i]",index);
- dini_Set(playerfilename,savestringname,(""));
- dini_Unset(playerfilename,savestringname);
- format(savestringname,sizeof(savestringname),"mapobjectmid[%i]",index);
- dini_IntSet(playerfilename,savestringname,(mapobjectmid[slotid][index]));
- dini_Unset(playerfilename,savestringname);
- format(savestringname,sizeof(savestringname),"mapobjectstate[%i]",index);
- dini_IntSet(playerfilename,savestringname,(mapobjectstate[slotid][index]));
- dini_Unset(playerfilename,savestringname);
- DestroyDynamicObject(mapobject[slotid][index]);
- for(new i;i < MAX_PLAYERS;i++)
- {
- if(IsPlayerConnected(i))
- {
- if((showlabel[playerid])==1)
- {
- DeletePlayer3DTextLabel(i, mapobjectlabel[slotid][index]);
- }
- }
- }
- if((allowence[2][playerid])==1)
- {
- if((playersinput)==1)
- {
- for(new count=0;count < MAX_PLAYERS;count++)
- {
- if(IsPlayerAdmince(count,3))
- {
- new name[128];
- GetPlayerName(playerid,name,sizeof(name));
- format(string,128,"%s has deleted objectid %i-%i",name,index,slotid);
- SendClientMessage(count,DARKBLUE,string);
- }
- }
- }
- }
- SendClientMessage(playerid, RED, "You have deleted and object");
- return 1;
- }
- if(IsPlayerAdmince(playerid,3)||(allowence[2][playerid])==1)
- {
- new index,savestringname[128],string[128];
- if(sscanf(params,"i",index))
- {
- return SendClientMessage(playerid, RED, "SYNTAX:/deleteobject [objectid]");
- }
- objx[index] = 0;
- objy[index] = 0;
- objz[index] = 0;
- objxrot[index] = 0;
- objyrot[index] = 0;
- objzrot[index] = 0;
- jbobjectid[index] = 0;
- objectstring[index] = "";
- objectstate[index] = 0;
- format(savestringname,sizeof(savestringname),"objx[%i]",index);
- dini_FloatSet(objectsfilename,savestringname,(0));
- dini_Unset(objectsfilename,savestringname);
- format(savestringname,sizeof(savestringname),"objy[%i]",index);
- dini_FloatSet(objectsfilename,savestringname,(0));
- dini_Unset(objectsfilename,savestringname);
- format(savestringname,sizeof(savestringname),"objz[%i]",index);
- dini_FloatSet(objectsfilename,savestringname,(0));
- dini_Unset(objectsfilename,savestringname);
- format(savestringname,sizeof(savestringname),"objxrot[%i]",index);
- dini_FloatSet(objectsfilename,savestringname,(0));
- dini_Unset(objectsfilename,savestringname);
- format(savestringname,sizeof(savestringname),"objyrot[%i]",index);
- dini_FloatSet(objectsfilename,savestringname,(0));
- dini_Unset(objectsfilename,savestringname);
- format(savestringname,sizeof(savestringname),"objzrot[%i]",index);
- dini_FloatSet(objectsfilename,savestringname,(0));
- dini_Unset(objectsfilename,savestringname);
- format(savestringname,sizeof(savestringname),"object[%i]",index);
- dini_IntSet(objectsfilename,savestringname,(0));
- format(savestringname,sizeof(savestringname),"objectlabel[%i]",index);
- dini_Set(objectsfilename,savestringname,(""));
- dini_Unset(objectsfilename,savestringname);
- format(savestringname,sizeof(savestringname),"objectcolor[%i]",index);
- dini_IntSet(objectsfilename,savestringname,(0));
- dini_Unset(objectsfilename,savestringname);
- format(savestringname,sizeof(savestringname),"objectstate[%i]",index);
- dini_IntSet(objectsfilename,savestringname,(0));
- dini_Unset(objectsfilename,savestringname);
- DestroyDynamicObject(objects[index]);
- format(string,128,"You have delete a object [objectid:%i]",index);
- SendClientMessage(playerid, YELLOW, string);
- if((allowence[2][playerid])==1)
- {
- if((playersinput)==1)
- {
- for(new count=0;count < MAX_PLAYERS;count++)
- {
- if(IsPlayerAdmince(count,3))
- {
- new name[128];
- GetPlayerName(playerid,name,sizeof(name));
- format(string,128,"%s has deleted objectid %i",name,index);
- SendClientMessage(count,DARKBLUE,string);
- }
- }
- }
- }
- for(new i=0;i < MAX_PLAYERS;i++)
- {
- DeletePlayer3DTextLabel(i,objectlabel[index]);
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "You have to be atleast admin level 3 or Rcon admin or allowed to deleteobjects to use this command");
- }
- return 1;
- }
- CMD:labeldistance(playerid, params[])
- {
- if(IsPlayerAdmince(playerid,5))
- {
- new input;
- if(sscanf(params,"i",input))
- {
- SendClientMessage(playerid, RED, "Syntax /labeldistance [number]");
- return 1;
- }
- if((input) > 5)
- {
- new name[128],string[128]/*,savestringname[128]*/;
- GetPlayerName(playerid, name,sizeof(name));
- format(string,128,"[ADMIN:%s] Has Change the label distance from %f to %i",name,DISTANCELABEL,input);
- DISTANCELABEL = input;
- dini_IntSet(objectsfilename,"labeldistance",floatround(DISTANCELABEL));
- SendClientMessageToAll(PINK,string);
- for(new count=0;count < MAX_OBJECTS;count++)
- {
- for(new i = 0;i < MAX_PLAYERS;i++)
- {
- if(IsPlayerConnected(i))
- {
- if((objectstate[count])==1)
- {
- DeletePlayer3DTextLabel(i,objectlabel[count]);
- }
- }
- }
- }
- for(new count=0;count < MAX_OBJECTS;count++)
- {
- for(new i = 0;i < MAX_PLAYERS;i++)
- {
- if(IsPlayerConnected(i))
- {
- if((objectstate[count])==1)
- {
- if((showlabel[i])==1)
- {
- format(string,128,"object:%s--ID:%i-Objectid-%i",objectstring[count],count,jbobjectid[count]);
- objectlabel[count] = CreatePlayer3DTextLabel(i,string,COLOR,objx[count],objy[count],objz[count],DISTANCELABEL,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0);
- }
- }
- }
- }
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "The Input has to be atleast five");
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "You have to be atleast admin level 5 or Rcon admin to use this command");
- }
- return 1;
- }
- CMD:enablelabels(playerid,params[])
- {
- if((showlabel[playerid])==0)
- {
- new savestringname[128],name[128],string[128];
- GetPlayerName(playerid,name,sizeof(name));
- showlabel[playerid] = 1;
- SendClientMessage(playerid, LIGHTBLUE, "You Have Enabled Labels");
- format(savestringname,sizeof(savestringname),"showlabel[%s]",name);
- dini_IntSet(objectsfilename,savestringname,(showlabel[playerid]));
- for(new count=0;count < MAX_OBJECTS;count++)
- {
- if((objectstate[count])==1)
- {
- format(string,128,"object:%s--ID:%i-Objectid-%i",objectstring[count],count,jbobjectid[count]);
- objectlabel[count] = CreatePlayer3DTextLabel(playerid,string,COLOR,objx[count],objy[count],objz[count],DISTANCELABEL,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0);
- }
- }
- for(new count;count < MAX;count++)
- {
- if((mapplayerslot[count])==1)
- {
- new slotid = count;
- new playerfilename[128];
- format(playerfilename,sizeof(playerfilename),"%s",mapname[count]);
- for(new count2;count2 < MAX_OBJECTS;count2++)
- {
- if((mapobjectstate[slotid][count2])==1)
- {
- format(savestringname,sizeof(savestringname),"mapobjectstring[%i]",count2);
- new mapstring[128];
- format(mapstring,sizeof(mapstring),"%s",dini_Get(playerfilename,savestringname));
- format(string,sizeof(string),"object:%s--ID:Objectid-%i-%i-Mid:%i-mapname:%s",mapstring,count2,slotid,mapobjectmid[slotid][count2],mapname[slotid]);
- mapobjectlabel[slotid][count2] = CreatePlayer3DTextLabel(playerid,string,COLOR,playermapx[slotid][count2],playermapy[slotid][count2],playermapz[slotid][count2],DISTANCELABEL,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0);
- }
- }
- }
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "You already have enabled labels");
- }
- return 1;
- }
- CMD:disablelabels(playerid, params[])
- {
- if((showlabel[playerid])==1)
- {
- new savestringname[128],name[128];
- GetPlayerName(playerid,name,sizeof(name));
- showlabel[playerid]=0;
- SendClientMessage(playerid, LIGHTBLUE, "You Have Disabled Labels");
- format(savestringname,sizeof(savestringname),"showlabel[%s]",name);
- dini_IntSet(objectsfilename,savestringname,(showlabel[playerid]));
- for(new count=0;count < MAX_OBJECTS;count++)
- {
- if((objectstate[count])==1)
- {
- DeletePlayer3DTextLabel(playerid,objectlabel[count]);
- }
- }
- for(new count;count < MAX_OBJECTS;count++)
- {
- if((mapplayerslot[count])==1)
- {
- new slotid = count;
- for(new count2;count2 < MAX_OBJECTS;count++)
- {
- if((mapobjectstate[slotid][count2])==1)
- {
- DeletePlayer3DTextLabel(playerid,mapobjectlabel[slotid][count2]);
- }
- }
- }
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "your labels are off already");
- }
- return 1;
- }
- CMD:setplayerlabelstate(playerid,params[])
- {
- if(IsPlayerAdmince(playerid,4))
- {
- new id,input[128],choice[128];
- if(sscanf(params,"s["#64"]s["#64"]",input,choice))
- {
- return SendClientMessage(playerid, RED, "SYNTAX /setplayerlabelstate [playerid/all] [yes/no]");
- }
- new adminname[128],savestringname[128],string[128],name[128];
- GetPlayerName(playerid,adminname,sizeof(adminname));
- if(strcmp(input,"all",true,64)==0)
- {
- if(strcmp(choice,"yes",true,4)==0)
- {
- for(new i=0;i < MAX_PLAYERS;i++)
- {
- if(IsPlayerConnected(i))
- {
- if((showlabel[i])==0)
- {
- for(new count;count < MAX_OBJECTS;count ++)
- {
- if((objectstate[count])==1)
- {
- showlabel[i] = 1;
- GetPlayerName(i,name,sizeof(name));
- format(savestringname,sizeof(savestringname),"showlabel[%s]",name);
- dini_IntSet(objectsfilename,savestringname,(showlabel[i]));
- format(string,128,"object:%s--ID:%i-Objectid-%i",objectstring[count],count,jbobjectid[count]);
- objectlabel[count] = CreatePlayer3DTextLabel(i,string,COLOR,objx[count],objy[count],objz[count],DISTANCELABEL,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0);
- }
- }
- }
- }
- }
- format(string,127,"[ADMIN:%s] has enabled all labels",adminname);
- SendClientMessageToAll(PINK,string);
- }
- else if(strcmp(choice,"no",true,3)==0)
- {
- for(new i=0;i < MAX_PLAYERS;i++)
- {
- if(IsPlayerConnected(i))
- {
- if((showlabel[i])==1)
- {
- for(new count;count < MAX_OBJECTS;count ++)
- {
- if((objectstate[count])==1)
- {
- showlabel[i] = 0;
- GetPlayerName(i,name,sizeof(name));
- format(savestringname,sizeof(savestringname),"showlabel[%s]",name);
- dini_IntSet(objectsfilename,savestringname,(showlabel[i]));
- DeletePlayer3DTextLabel(i,objectlabel[count]);
- }
- }
- }
- }
- }
- format(string,127,"[ADMIN:%s] has disabled all labels",adminname);
- SendClientMessageToAll(PINK,string);
- }
- else
- {
- SendClientMessage(playerid, RED, "Yes or No");
- }
- }
- else
- {
- id = strval(input);
- GetPlayerName(id,name,sizeof(name));
- if(!IsPlayerConnected(id))
- {
- return SendClientMessage(playerid, RED, "This id is not connected");
- }
- if(strcmp(choice,"yes",true,64)==0)
- {
- if((showlabel[id])==0)
- {
- showlabel[id] = 1;
- format(string,127,"[ADMIN:%s] has enabled %s's labels",adminname,name);
- SendClientMessageToAll(PINK,string);
- format(savestringname,sizeof(savestringname),"showlabel[%s]",name);
- dini_IntSet(objectsfilename,savestringname,(showlabel[id]));
- for(new count; count < MAX_OBJECTS;count++)
- {
- if((objectstate[count])==1)
- {
- format(string,128,"object:%s--ID:%i-Objectid-%i",objectstring[count],count,jbobjectid[count]);
- objectlabel[count] = CreatePlayer3DTextLabel(id,string,COLOR,objx[count],objy[count],objz[count],DISTANCELABEL,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0);
- }
- }
- }
- else
- {
- format(string,128,"the labels are already enabled for %s",name);
- SendClientMessage(playerid, RED, string);
- }
- }
- else if(strcmp(choice,"no",true,64)==0)
- {
- if((showlabel[id])==1)
- {
- showlabel[id] = 0;
- format(string,127,"[ADMIN:%s] has Disabled %s's labels",adminname,name);
- SendClientMessageToAll(PINK,string);
- format(savestringname,sizeof(savestringname),"showlabel[%s]",name);
- dini_IntSet(objectsfilename,savestringname,(showlabel[id]));
- for(new count;count < MAX_OBJECTS;count++)
- {
- if((objectstate[count])==1)
- {
- DeletePlayer3DTextLabel(id,objectlabel[count]);
- }
- }
- }
- else
- {
- format(string,128,"the labels are disabeled enabled for %s",name);
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "Yes or No");
- }
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "You have to be atleast admin level 4 or Rcon admin to use this command");
- }
- return 1;
- }
- CMD:jbobjectscheck(playerid,params[])
- {
- if(IsPlayerAdmince(playerid,5))
- {
- if((mapplayereditstate[playerid])==1)
- {
- SendClientMessage(playerid, ORANGE, "!NOTE you can not check objects from a private map");
- }
- new choice[128],input;
- if(sscanf(params,"s["#64"]i",choice,input))
- {
- SendClientMessage(playerid, RED, "SYNTAX /jbobjectscheck [choice] [input]");
- SendClientMessage(playerid, RED, "Choices are [objectpos,playersinput]");
- SendClientMessage(playerid, ORANGE, "NOTE:playerinput requirs a yes[1] or no[0] use appropriate symbol");
- return 1;
- }
- if(strcmp(choice,"objectpos",true,128)==0)
- {
- if((objectstate[input])==1)
- {
- new Float:ox,Float:oy,Float:oz,Float:oxrot,Float:oyrot,Float:ozrot;
- new Float:cx,Float:cy,Float:cz,Float:cxrot,Float:cyrot,Float:czrot;
- new savestringname[128],name[128],string[128];
- printf("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%s~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~",name);
- print("~~~~~~~~~~~~~~~~~~~~~~~checks the object current positions~~~~~~~~~~~~~~~~~");
- GetPlayerName(playerid,name,sizeof(name));
- GetDynamicObjectPos(objects[input],ox,oy,oz);
- GetDynamicObjectRot(objects[input],oxrot,oyrot,ozrot);
- format(savestringname,sizeof(savestringname),"objx[%i]",input);
- print(savestringname);
- cx = dini_Int(objectsfilename,savestringname);
- format(savestringname,sizeof(savestringname),"objy[%i]",input);
- print(savestringname);
- cy = dini_Int(objectsfilename,savestringname);
- format(savestringname,sizeof(savestringname),"objz[%i]",input);
- print(savestringname);
- cz = dini_Int(objectsfilename,savestringname);
- format(savestringname,sizeof(savestringname),"objxrot[%i]",input);
- print(savestringname);
- cxrot = dini_Int(objectsfilename,savestringname);
- format(savestringname,sizeof(savestringname),"objyrot[%i]",input);
- print(savestringname);
- cyrot = dini_Int(objectsfilename,savestringname);
- format(savestringname,sizeof(savestringname),"objzrot[%i]",input);
- print(savestringname);
- czrot = dini_Int(objectsfilename,savestringname);
- 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);
- SendClientMessageToAll(DARKBLUE,string);
- printf("loaded object floats [%f-%f-%f--angle:-%f-%f-%f",cx,cy,cz,cxrot,cyrot,czrot);
- printf("CurrentPosition floats [%f-%f-%f--angle:-%f-%f-%f",ox,oy,oz,oxrot,oyrot,ozrot);
- print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- }
- else
- {
- SendClientMessage(playerid,RED,"Object does not exist");
- }
- }
- else if(strcmp(choice,"playersinput",true,128)==0)
- {
- if((input)==0)
- {
- if((playersinput)==1)
- {
- new name[128],string[128];
- GetPlayerName(playerid, name,sizeof(name));
- format(string,128,"[ADMIN:%s] has Disabled the reading of the addobject,moveobjects,deleteobject commands",name);
- SendClientMessageToAll(PINK,string);
- playersinput = 0;
- }
- else
- {
- SendClientMessage(playerid, RED, "Players input is not enabled");
- }
- }
- else if((input)==1)
- {
- if((playersinput)==0)
- {
- new name[128],string[128];
- GetPlayerName(playerid, name,sizeof(name));
- format(string,128,"[ADMIN:%s] has Enabled the reading of the addobject,moveobjects,deleteobject commands",name);
- SendClientMessageToAll(PINK,string);
- playersinput = 1;
- }
- else
- {
- SendClientMessage(playerid, RED, "Players input has already been enabled");
- }
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "You enterd an invalid choice");
- SendClientMessage(playerid, RED, "Choices are [objectpos,playersinput]");
- SendClientMessage(playerid, RED, "NOTE:playersinput must be followed by 0 for no 1 for yes");
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "You have to be atleast admin level 5 or Rcon admin to use this command");
- }
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if((edittype[playerid])== 1)
- {
- if (PRESSED(KEY_SECONDARY_ATTACK))
- {
- new objectid = objects[editobjnum[playerid]];
- 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]]);
- }
- }
- if((edittype[playerid])== 2)
- {
- if (PRESSED(KEY_SECONDARY_ATTACK))
- {
- new slotid = mapplayerslotid[playerid];
- new objectid = mapobject[slotid][editobjnum[playerid]];
- 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]]);
- }
- }
- return 1;
- }
- public OnPlayerEditDynamicObject(playerid, objectid, response, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz)
- {
- if((edittype[playerid])==2)
- {
- new string[128],savestringname[128],playerfilename[128];
- new slotid = mapplayerslotid[playerid];
- format(playerfilename,sizeof(playerfilename),"%s",mapname[slotid]);
- if((editfirstcheck[playerid])==0)
- {
- editfirstcheck[playerid] = 1;
- oldx[playerid] = x;
- oldy[playerid] = y;
- oldz[playerid] = z;
- oldxrot[playerid] = rx;
- oldyrot[playerid] = ry;
- oldzrot[playerid] = rz;
- }
- if(response == EDIT_RESPONSE_UPDATE)
- {
- format(savestringname,sizeof(savestringname),"mapobjectstring[%i]",editobjnum[playerid]);
- new mapstring[128];
- format(mapstring,sizeof(mapstring),"%s",dini_Get(playerfilename,savestringname));
- format(string,sizeof(string),"object:%s--ID:Objectid-%i-%i-Mid:%i-mapname:%s",mapstring,editobjnum[playerid],slotid,mapobjectmid[slotid][editobjnum[playerid]],mapname[slotid]);
- playermapx[slotid][editobjnum[playerid]] = x;
- playermapy[slotid][editobjnum[playerid]] = y;
- playermapz[slotid][editobjnum[playerid]] = z;
- playermapxrot[slotid][editobjnum[playerid]] = rx;
- playermapyrot[slotid][editobjnum[playerid]] = ry;
- playermapzrot[slotid][editobjnum[playerid]] = rz;
- 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]]);
- for(new i;i < MAX_PLAYERS;i++)
- {
- if(IsPlayerConnected(i))
- {
- if((showlabel[i])==1)
- {
- DeletePlayer3DTextLabel(i,mapobjectlabel[slotid][editobjnum[playerid]]);
- 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);
- }
- }
- }
- }
- if(response == EDIT_RESPONSE_FINAL)
- {
- edittype[playerid] = 0;
- editfirstcheck[playerid] = 0;
- new Float:xpos,Float:ypos,Float:zpos,Float:xposrot,Float:yposrot,Float:zposrot;
- GetDynamicObjectPos(mapobject[slotid][editobjnum[playerid]],xpos,ypos,zpos);
- GetDynamicObjectRot(mapobject[slotid][editobjnum[playerid]],xposrot,yposrot,zposrot);
- playermapx[slotid][editobjnum[playerid]] = xpos;
- playermapy[slotid][editobjnum[playerid]] = ypos;
- playermapz[slotid][editobjnum[playerid]] = zpos;
- playermapxrot[slotid][editobjnum[playerid]] = xposrot;
- playermapyrot[slotid][editobjnum[playerid]] = yposrot;
- playermapzrot[slotid][editobjnum[playerid]] = zposrot;
- format(savestringname,sizeof(savestringname),"playermapx[%i]",editobjnum[playerid]);
- dini_FloatSet(playerfilename,savestringname,(playermapx[slotid][editobjnum[playerid]]));
- format(savestringname,sizeof(savestringname),"playermapy[%i]",editobjnum[playerid]);
- dini_FloatSet(playerfilename,savestringname,(playermapy[slotid][editobjnum[playerid]]));
- format(savestringname,sizeof(savestringname),"playermapz[%i]",editobjnum[playerid]);
- dini_FloatSet(playerfilename,savestringname,(playermapz[slotid][editobjnum[playerid]]));
- format(savestringname,sizeof(savestringname),"playermapxrot[%i]",editobjnum[playerid]);
- dini_FloatSet(playerfilename,savestringname,(playermapxrot[slotid][editobjnum[playerid]]));
- format(savestringname,sizeof(savestringname),"playermapyrot[%i]",editobjnum[playerid]);
- dini_FloatSet(playerfilename,savestringname,(playermapyrot[slotid][editobjnum[playerid]]));
- format(savestringname,sizeof(savestringname),"playermapzrot[%i]",editobjnum[playerid]);
- dini_FloatSet(playerfilename,savestringname,(playermapzrot[slotid][editobjnum[playerid]]));
- format(savestringname,sizeof(savestringname),"mapobjectstring[%i]",editobjnum[playerid]);
- new mapstring[128];
- format(mapstring,sizeof(mapstring),"%s",dini_Get(playerfilename,savestringname));
- format(string,sizeof(string),"object:%s--ID:Objectid-%i-%i-Mid:%i-mapname:%s",mapstring,editobjnum[playerid],slotid,mapobjectmid[slotid][editobjnum[playerid]],mapname[slotid]);
- for(new i;i < MAX_PLAYERS;i++)
- {
- if(IsPlayerConnected(i))
- {
- if((showlabel[i])==1)
- {
- DeletePlayer3DTextLabel(i,mapobjectlabel[slotid][editobjnum[playerid]]);
- 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);
- }
- }
- }
- if((allowence[1][playerid])==1)
- {
- if((playersinput)==1)
- {
- for(new count=0;count < MAX_PLAYERS;count++)
- {
- if(IsPlayerAdmince(count,3))
- {
- new name[128];
- GetPlayerName(playerid,name,sizeof(name));
- format(string,sizeof(string),"%s has moved object id:%i",name,editobjnum[playerid]);
- SendClientMessage(count,DARKBLUE,string);
- format(string,sizeof(string),"[from] [%f - %f -%f -angle- %f - %f - %f]",oldx[playerid],oldy[playerid],oldz[playerid],oldxrot[playerid],oldyrot[playerid],oldzrot[playerid]);
- SendClientMessage(count,DARKBLUE,string);
- 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]]);
- SendClientMessage(count,DARKBLUE,string);
- }
- }
- }
- }
- SendClientMessage(playerid, LIGHTBLUE, "You have move and object");
- CancelEdit(playerid);
- }
- if(response == EDIT_RESPONSE_CANCEL)
- {
- edittype[playerid] = 0;
- editfirstcheck[playerid] = 0;
- MoveDynamicObject(mapobject[slotid][editobjnum[playerid]],oldx[playerid],oldy[playerid],oldz[playerid],100.0,oldxrot[playerid],oldyrot[playerid],oldzrot[playerid]);
- playermapx[slotid][editobjnum[playerid]] = oldx[playerid];
- playermapy[slotid][editobjnum[playerid]] = oldy[playerid];
- playermapz[slotid][editobjnum[playerid]] = oldz[playerid];
- playermapxrot[slotid][editobjnum[playerid]] = oldxrot[playerid];
- playermapyrot[slotid][editobjnum[playerid]] = oldyrot[playerid];
- playermapzrot[slotid][editobjnum[playerid]] = oldzrot[playerid];
- format(savestringname,sizeof(savestringname),"playermapx[%i]",editobjnum[playerid]);
- dini_FloatSet(playerfilename,savestringname,(playermapx[slotid][editobjnum[playerid]]));
- format(savestringname,sizeof(savestringname),"playermapy[%i]",editobjnum[playerid]);
- dini_FloatSet(playerfilename,savestringname,(playermapy[slotid][editobjnum[playerid]]));
- format(savestringname,sizeof(savestringname),"playermapz[%i]",editobjnum[playerid]);
- dini_FloatSet(playerfilename,savestringname,(playermapz[slotid][editobjnum[playerid]]));
- format(savestringname,sizeof(savestringname),"playermapxrot[%i]",editobjnum[playerid]);
- dini_FloatSet(playerfilename,savestringname,(playermapxrot[slotid][editobjnum[playerid]]));
- format(savestringname,sizeof(savestringname),"playermapyrot[%i]",editobjnum[playerid]);
- dini_FloatSet(playerfilename,savestringname,(playermapyrot[slotid][editobjnum[playerid]]));
- format(savestringname,sizeof(savestringname),"playermapzrot[%i]",editobjnum[playerid]);
- dini_FloatSet(playerfilename,savestringname,(playermapzrot[slotid][editobjnum[playerid]]));
- format(savestringname,sizeof(savestringname),"mapobjectstring[%i]",editobjnum[playerid]);
- new mapstring[128];
- format(mapstring,sizeof(mapstring),"%s",dini_Get(playerfilename,savestringname));
- SendClientMessage(playerid, LIGHTBLUE, "You have canceled moveing an object");
- format(string,sizeof(string),"object:%s--ID:Objectid-%i-%i-Mid:%i-mapname:%s",mapstring,editobjnum[playerid],slotid,mapobjectmid[editobjnum[playerid]],mapname[slotid]);
- for(new i;i < MAX_PLAYERS;i++)
- {
- if(IsPlayerConnected(i))
- {
- if((showlabel[i])==1)
- {
- DeletePlayer3DTextLabel(i,mapobjectlabel[slotid][editobjnum[playerid]]);
- 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);
- }
- }
- }
- if((allowence[1][playerid])==1)
- {
- if((playersinput)==1)
- {
- for(new count=0;count < MAX_PLAYERS;count++)
- {
- if(IsPlayerAdmince(count,3))
- {
- new name[128];
- GetPlayerName(playerid,name,sizeof(name));
- format(string,sizeof(string),"%s has canceled moveing object id:%i",name,editobjnum[playerid]);
- SendClientMessage(count,DARKBLUE,string);
- format(string,sizeof(string),"[from] [%f - %f -%f -angle- %f - %f - %f]",oldx[playerid],oldy[playerid],oldz[playerid],oldxrot[playerid],oldyrot[playerid],oldzrot[playerid]);
- SendClientMessage(count,DARKBLUE,string);
- }
- }
- }
- }
- }
- }
- else if((edittype[playerid])==1)
- {
- if((editfirstcheck[playerid])==0)
- {
- editfirstcheck[playerid] = 1;
- oldx[playerid] = x;
- oldy[playerid] = y;
- oldz[playerid] = z;
- oldxrot[playerid] = rx;
- oldyrot[playerid] = ry;
- oldzrot[playerid] = rz;
- if((allowence[1][playerid])==1)
- {
- if((playersinput)==1)
- {
- for(new count=0;count < MAX_PLAYERS;count++)
- {
- if(IsPlayerAdmince(count,3))
- {
- new name[128],string[128];
- GetPlayerName(playerid,name,sizeof(name));
- format(string,sizeof(string),"%s has started moveing object id:%i",name,editobjnum[playerid]);
- SendClientMessage(count,DARKBLUE,string);
- }
- }
- }
- }
- }
- if(response == EDIT_RESPONSE_UPDATE)
- {
- new string[128];
- format(string,128,"object:%s--ID:%i-Objectid-%i",objectstring[editobjnum[playerid]],editobjnum[playerid],jbobjectid[editobjnum[playerid]]);
- objx[editobjnum[playerid]] =x;
- objy[editobjnum[playerid]] =y;
- objz[editobjnum[playerid]] =z;
- objxrot[editobjnum[playerid]] = rx;
- objyrot[editobjnum[playerid]] = ry;
- objzrot[editobjnum[playerid]] = rz;
- for(new i=0;i < MAX_PLAYERS;i++)
- {
- if(IsPlayerConnected(i))
- {
- if((showlabel[i])==1)
- {
- DeletePlayer3DTextLabel(i,objectlabel[editobjnum[playerid]]);
- objectlabel[editobjnum[playerid]] = CreatePlayer3DTextLabel(i,string,COLOR,objx[editobjnum[playerid]],objy[editobjnum[playerid]],objz[editobjnum[playerid]],DISTANCELABEL,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0);
- }
- }
- }
- MoveDynamicObject(objects[editobjnum[playerid]],objx[editobjnum[playerid]],objy[editobjnum[playerid]],objz[editobjnum[playerid]],10,objxrot[editobjnum[playerid]],objyrot[editobjnum[playerid]],objzrot[editobjnum[playerid]]);
- }
- if(response == EDIT_RESPONSE_FINAL)
- {
- new savestringname[128];
- new Float:xpos,Float:ypos,Float:zpos,Float:xposrot,Float:yposrot,Float:zposrot;
- GetDynamicObjectPos(objects[editobjnum[playerid]],xpos,ypos,zpos);
- GetDynamicObjectRot(objects[editobjnum[playerid]],xposrot,yposrot,zposrot);
- objx[editobjnum[playerid]] = xpos;
- objy[editobjnum[playerid]] = ypos;
- objz[editobjnum[playerid]] = zpos;
- objxrot[editobjnum[playerid]] = xposrot;
- objyrot[editobjnum[playerid]] = yposrot;
- objzrot[editobjnum[playerid]] = zposrot;
- SendClientMessage(playerid, LIGHTBLUE, "You have moved this object");
- format(savestringname,sizeof(savestringname),"objx[%i]",editobjnum[playerid]);
- dini_FloatSet(objectsfilename,savestringname,(objx[editobjnum[playerid]]));
- format(savestringname,sizeof(savestringname),"objy[%i]",editobjnum[playerid]);
- dini_FloatSet(objectsfilename,savestringname,(objy[editobjnum[playerid]]));
- format(savestringname,sizeof(savestringname),"objz[%i]",editobjnum[playerid]);
- dini_FloatSet(objectsfilename,savestringname,(objz[editobjnum[playerid]]));
- format(savestringname,sizeof(savestringname),"objxrot[%i]",editobjnum[playerid]);
- dini_FloatSet(objectsfilename,savestringname,(objxrot[editobjnum[playerid]]));
- format(savestringname,sizeof(savestringname),"objyrot[%i]",editobjnum[playerid]);
- dini_FloatSet(objectsfilename,savestringname,(objyrot[editobjnum[playerid]]));
- format(savestringname,sizeof(savestringname),"objzrot[%i]",editobjnum[playerid]);
- dini_FloatSet(objectsfilename,savestringname,(objzrot[editobjnum[playerid]]));
- editfirstcheck[playerid] = 0;
- edittype[playerid] = 0;
- if((allowence[1][playerid])==1)
- {
- if((playersinput)==1)
- {
- for(new count=0;count < MAX_PLAYERS;count++)
- {
- if(IsPlayerAdmince(count,3))
- {
- new name[128],string[128];
- GetPlayerName(playerid,name,sizeof(name));
- format(string,sizeof(string),"%s has moved object id:%i",name,editobjnum[playerid]);
- SendClientMessage(count,DARKBLUE,string);
- format(string,sizeof(string),"[from] [%f - %f -%f -angle- %f - %f - %f]",oldx[playerid],oldy[playerid],oldz[playerid],oldxrot[playerid],oldyrot[playerid],oldzrot[playerid]);
- SendClientMessage(count,DARKBLUE,string);
- 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]]);
- SendClientMessage(count,DARKBLUE,string);
- }
- }
- }
- }
- CancelEdit(playerid);
- }
- if(response == EDIT_RESPONSE_CANCEL)
- {
- new string[128], savestringname[128];
- format(savestringname,sizeof(savestringname),"objectlabel[%i]",editobjnum[playerid]);
- editfirstcheck[playerid] = 0;
- MoveDynamicObject(objectid,oldx[playerid],oldy[playerid],oldz[playerid],10,oldxrot[playerid],oldyrot[playerid],oldzrot[playerid]);
- editobjnum[playerid] = -1;
- objx[editobjnum[playerid]] = oldx[playerid];
- objy[editobjnum[playerid]] = oldy[playerid];
- objz[editobjnum[playerid]] = oldz[playerid];
- objxrot[editobjnum[playerid]] = oldxrot[playerid];
- objyrot[editobjnum[playerid]] = oldyrot[playerid];
- objzrot[editobjnum[playerid]] = oldzrot[playerid];
- format(savestringname,sizeof(savestringname),"objx[%i]",editobjnum[playerid]);
- dini_FloatSet(objectsfilename,savestringname,(oldx[playerid]));
- format(savestringname,sizeof(savestringname),"objy[%i]",editobjnum[playerid]);
- dini_FloatSet(objectsfilename,savestringname,(oldy[playerid]));
- format(savestringname,sizeof(savestringname),"objz[%i]",editobjnum[playerid]);
- dini_FloatSet(objectsfilename,savestringname,(oldz[playerid]));
- format(savestringname,sizeof(savestringname),"objxrot[%i]",editobjnum[playerid]);
- dini_FloatSet(objectsfilename,savestringname,(oldxrot[playerid]));
- format(savestringname,sizeof(savestringname),"objyrot[%i]",editobjnum[playerid]);
- dini_FloatSet(objectsfilename,savestringname,(oldyrot[playerid]));
- format(savestringname,sizeof(savestringname),"objzrot[%i]",editobjnum[playerid]);
- dini_FloatSet(objectsfilename,savestringname,(oldzrot[playerid]));
- edittype[playerid] = 0;
- format(string,128,"object:%s--ID:%i-Objectid-%i",objectstring[editobjnum[playerid]],editobjnum[playerid],jbobjectid[editobjnum[playerid]]);
- for(new i=0;i < MAX_PLAYERS;i++)
- {
- if(IsPlayerConnected(i))
- {
- if((showlabel[i])==1)
- {
- DeletePlayer3DTextLabel(i,objectlabel[editobjnum[playerid]]);
- objectlabel[editobjnum[playerid]] = CreatePlayer3DTextLabel(i,string,COLOR,objx[editobjnum[playerid]],objy[editobjnum[playerid]],objz[editobjnum[playerid]],DISTANCELABEL,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0);
- }
- }
- }
- if((allowence[1][playerid])==1)
- {
- if((playersinput)==1)
- {
- for(new count=0;count < MAX_PLAYERS;count++)
- {
- if(IsPlayerAdmince(count,3))
- {
- new name[128];
- GetPlayerName(playerid,name,sizeof(name));
- format(string,sizeof(string),"%s has canceled moveing object id:%i",name,editobjnum[playerid]);
- SendClientMessage(count,DARKBLUE,string);
- format(string,sizeof(string),"[from] [%f - %f -%f -angle- %f - %f - %f]",oldx[playerid],oldy[playerid],oldz[playerid],oldxrot[playerid],oldyrot[playerid],oldzrot[playerid]);
- SendClientMessage(count,DARKBLUE,string);
- }
- }
- }
- }
- }
- }
- return 1;
- }
- public IsPlayerLoggingIntoAdmin()
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(IsPlayerAdmince(i,3))
- {
- for(new count; count < MAX_OPERATIONS;count++)
- {
- if((allowence[count][i])==1)
- {
- allowence[count][i] = 0;
- new string[256],taskname[128];
- if((count)==0)
- {
- taskname = "addobjects";
- }
- if((count)==1)
- {
- taskname = "moveobjects";
- }
- if((count)==2)
- {
- taskname = "deleteobjects";
- }
- 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);
- SendClientMessage(i,PINK,string);
- }
- }
- }
- }
- }
- return 1;
- }
- public OnFilterScriptInit()
- {
- format(objectsfilename,sizeof(objectsfilename),"JBobjects/jbobjects.ini");
- if(!dini_Exists(objectsfilename))
- {
- dini_Create(objectsfilename);
- dini_IntSet(objectsfilename,"labeldistance",floatround(DISTANCELABEL));
- print("Objects Save File has been created");
- }
- DISTANCELABEL = dini_Int(objectsfilename,"labeldistance");
- if((DISTANCELABEL) < 5)
- {
- DISTANCELABEL = 5;
- }
- SetTimer("IsPlayerLoggingIntoAdmin",1000,true);
- print("------------------JB-------------------");
- print("-------------Samp-objects--------------");
- print("----------------Loaded-----------------");
- print("-----------------V1.6------------------");
- new savestringname[128];
- for(new count =0;count <= MAX_OBJECTS;count++)
- {
- format(savestringname,sizeof(savestringname),"objectstate[%i]",count);
- objectstate[count] = dini_Int(objectsfilename,savestringname);
- if((objectstate[count])==1)
- {
- format(savestringname,sizeof(savestringname),"object[%i]",count);
- jbobjectid[count] = dini_Int(objectsfilename,savestringname);
- format(savestringname,sizeof(savestringname),"objx[%i]",count);
- objx[count] = dini_Int(objectsfilename,savestringname);
- format(savestringname,sizeof(savestringname),"objy[%i]",count);
- objy[count] = dini_Int(objectsfilename,savestringname);
- format(savestringname,sizeof(savestringname),"objz[%i]",count);
- objz[count] = dini_Int(objectsfilename,savestringname);
- format(savestringname,sizeof(savestringname),"objxrot[%i]",count);
- objxrot[count] = dini_Int(objectsfilename,savestringname);
- format(savestringname,sizeof(savestringname),"objyrot[%i]",count);
- objyrot[count] = dini_Int(objectsfilename,savestringname);
- format(savestringname,sizeof(savestringname),"objzrot[%i]",count);
- objzrot[count] = dini_Int(objectsfilename,savestringname);
- format(savestringname,sizeof(savestringname),"objectlabel[%i]",count);
- objectstring[count] = dini_Get(objectsfilename,savestringname);
- format(savestringname,sizeof(savestringname),"objectcolor[%i]",count);
- objectcolor[count] = dini_Int(objectsfilename,savestringname);
- format(savestringname,sizeof(savestringname),"object[%i]",count);
- jbobjectid[count] = dini_Int(objectsfilename,savestringname);
- objects[count] = CreateDynamicObject(jbobjectid[count],objx[count],objy[count],objz[count],objxrot[count],objyrot[count],objzrot[count],0);
- if((objectcolor[count])==0)
- {
- SetDynamicObjectMaterial(objects[count],0,-1,"none","none",0);
- }
- else
- {
- SetDynamicObjectMaterial(objects[count],0 ,2707, "Shopping", "white",objectcolor[count]);
- }
- for(new i = 0;i < MAX_PLAYERS;i++)
- {
- if(IsPlayerConnected(i))
- {
- new name[128];
- GetPlayerName(i,name,sizeof(name));
- format(savestringname,sizeof(savestringname),"showlabel[%s]",name);
- showlabel[i] = dini_Int(objectsfilename,savestringname);
- if((showlabel[i])==1)
- {
- new string[128];
- format(string,128,"object:%s--ID:%i-Objectid-%i",objectstring[count],count,jbobjectid[count]);
- objectlabel[count] = CreatePlayer3DTextLabel(i,string,COLOR,objx[count],objy[count],objz[count],DISTANCELABEL,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0);
- }
- }
- }
- }
- }
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- new string[128],name[128];
- new savestringname[128];
- GetPlayerName(playerid,name,sizeof(name));
- format(savestringname,sizeof(savestringname),"showlabel[%s]",name);
- showlabel[playerid] = dini_Int(objectsfilename,savestringname);
- if((showlabel[playerid])==1)
- {
- for(new count=0;count <= MAX_OBJECTS;count++)
- {
- if((objectstate[count])==1)
- {
- format(string,128,"object:%s--ID:%i-Objectid-%i",objectstring[count],count,jbobjectid[count]);
- objectlabel[count] = CreatePlayer3DTextLabel(playerid,string,COLOR,objx[count],objy[count],objz[count],DISTANCELABEL,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0);
- }
- }
- }
- for(new count=0;count < MAX_OPERATIONS;count ++)
- {
- if((allowencejoin[count])==1)
- {
- if(IsPlayerAdmince(count,3))
- {
- }
- else
- {
- new command[128];
- if((count)==0)
- {
- format(command,128,"addobjects");
- }
- if((count)==1)
- {
- format(command,128,"moveobjects");
- }
- if((count) == 2)
- {
- format(command,128,"deleteobjects");
- }
- if((count)==3)
- {
- format(command,128,"editmap");
- }
- GetPlayerName(playerid,name,sizeof(name));
- allowence[count][playerid]=1;
- format(string,128, "%s has joined and has been give autorization for the %s command",name,command);
- SendClientMessageToAll(GREY,string);
- }
- }
- }
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- for(new count;count < MAX_OPERATIONS;count++)
- {
- if((allowence[count][playerid])==1)
- {
- allowence[count][playerid] = 0;
- }
- }
- new slotid = mapplayerslotid[playerid];
- if((mapplayerslot[slotid])==1)
- {
- CloseMap(playerid);
- }
- return 1;
- }
- public OnFilterScriptExit()
- {
- for(new count=0;count <= MAX_OBJECTS;count++)
- {
- if((objectstate[count])==1)
- {
- DestroyDynamicObject(objects[count]);
- for(new i;i < MAX_PLAYERS;i++)
- {
- if(IsPlayerConnected(i))
- {
- DeletePlayer3DTextLabel(i,objectlabel[count]);
- }
- }
- }
- }
- for(new i;i < MAX_PLAYERS;i++)
- {
- if(IsPlayerConnected(i))
- {
- if((mapplayerslotid[i])==1)
- {
- CloseMap(i);
- }
- }
- }
- for(new count;count < 12;count++)
- {
- if((viewslot[count])==1)
- {
- viewslot[count] = 0;
- format(viewstring[count],sizeof(viewstring),"");
- for(new count2;count2 < MAX_OBJECTS;count2++)
- {
- if(IsValidDynamicObject(viewobject[count][count2]))
- {
- DestroyDynamicObject(viewobject[count][count2]);
- }
- }
- }
- }
- print("------------------JB-------------------");
- print("-------------Samp-objects--------------");
- print("----------------UnLoaded---------------");
- print("-----------------V1.6----------------");
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- new string[256],savestringname[256];
- if(dialogid == CLOSEMAP)
- {
- if(response)
- {
- if((mapplayereditstate[playerid])==1)
- {
- ShowPlayerDialog(playerid,CLOSEMAPEDIT,DIALOG_STYLE_MSGBOX,"Confirmation","Are you sure you want to close the map","Yes","No");
- }
- else
- {
- SendClientMessage(playerid,RED, "You can't close a map if you don't even have one open");
- }
- }
- else
- {
- if(IsPlayerAdmince(playerid, 3))
- {
- string = "";
- for(new count;count < 12;count++)
- {
- if((viewslot[count])==1)
- {
- new addstr[128];
- new storestring[128];
- format(storestring,sizeof(storestring),"%s",string);
- format(addstr,sizeof(addstr),"%s",viewstring[count]);
- if(isnull(string))
- {
- format(string,sizeof(string),"%s",addstr);
- }
- else
- {
- format(string,sizeof(string),"%s\n%s",storestring,addstr);
- }
- }
- else
- {
- new addstr[128];
- new storestring[128];
- format(storestring,sizeof(storestring),"%s",string);
- format(addstr,sizeof(addstr),"emptyslot\n");
- if(isnull(string))
- {
- format(string,sizeof(string),"%s",addstr);
- }
- else
- {
- format(string,sizeof(string),"%s\n%s",storestring,addstr);
- }
- }
- }
- ShowPlayerDialog(playerid,CLOSEMAPVIEW,DIALOG_STYLE_LIST,"Select map to close",string,"Ok","Close");//view
- }
- else
- {
- SendClientMessage(playerid, RED, "You have to be admin inorder to use this function");
- }
- }
- }
- else if(dialogid == CLOSEMAPVIEW)
- {
- if(response)
- {
- if((viewslot[viewselected[playerid]])==1)
- {
- viewslot[listitem] = 0;
- format(viewstring[listitem],sizeof(viewstring),"");
- for(new count;count < MAX_OBJECTS;count++)
- {
- if(IsValidDynamicObject(viewobject[viewselected[playerid]][count]))
- {
- DestroyDynamicObject(viewobject[viewselected[playerid]][count]);
- }
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "This slot is unoccupide you can't close it");
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "You have canceled closeing a map");
- }
- }
- else if(dialogid == CLOSEMAPEDIT)
- {
- if(response)
- {
- viewselected[playerid] =0;
- SendClientMessage(playerid, LIGHTBLUE, "You have closed a map");
- CloseMap(playerid);
- }
- else
- {
- SendClientMessage(playerid,RED,"You have canceled closeing a map");
- }
- }
- else if(dialogid == MAPDOSENOTEXITS)
- {
- if(response)
- {
- ShowPlayerDialog(playerid,OPENMAP,DIALOG_STYLE_MSGBOX,"Select","you can ether edit a map or open it just for viewing purposes","Edit","View");
- }
- else
- {
- SendClientMessage(playerid, RED, "You have canceled opening this map");
- }
- }
- else if(dialogid == OPENMAPINPUTEDIT)
- {
- if(response)
- {
- new mname[128];
- format(mname,sizeof(mname),"JBobjects/%s.map",inputtext);
- if(dini_Exists(mname))
- {
- for(new count;count < MAX;count++)
- {
- if(!isnull(mapname[count]))
- {
- if(strcmp(mapname[count],mname,true,64)==0)
- {
- 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]);
- SendClientMessage(playerid,RED,string);
- return 1;
- }
- }
- }
- for(new count;count < MAX;count++)
- {
- if((mapplayerslot[count])==0)
- {
- format(mapname[count],sizeof(mapname),"%s",dini_Get(mname,"mapname"));
- format(mapplayereditingname[count],sizeof(mapplayereditingname),"%s",dini_Get(mapname[count],"mapplayereditingname"));
- new name[128];
- GetPlayerName(playerid,name,sizeof(name));
- if(!IsPlayerAdmince(playerid,4))
- {
- if(strcmp(name,mapplayereditingname[count],true,128)!=0)
- {
- return SendClientMessage(playerid,RED,"you have to be admin level4 or the creater of this map inorder to edit it");
- }
- }
- mapplayereditstate[playerid] = 1;
- mapplayerslot[count] = 1;
- mapplayerslotid[playerid] = count;
- for(new count2;count2 < MAX_OBJECTS;count2++)
- {
- format(savestringname,sizeof(savestringname),"mapobjectstate[%i]",count2);
- mapobjectstate[count][count2] = dini_Int(mapname[count],savestringname);
- if((mapobjectstate[count][count2])==1)
- {
- format(savestringname,sizeof(savestringname),"playermapx[%i]",count2);
- playermapx[count][count2] = dini_Int(mapname[count],savestringname);
- format(savestringname,sizeof(savestringname),"playermapy[%i]",count2);
- playermapy[count][count2] = dini_Int(mapname[count],savestringname);
- format(savestringname,sizeof(savestringname),"playermapz[%i]",count2);
- playermapz[count][count2] = dini_Int(mapname[count],savestringname);
- format(savestringname,sizeof(savestringname),"playermapxrot[%i]",count2);
- playermapxrot[count][count2] = dini_Int(mapname[count],savestringname);
- format(savestringname,sizeof(savestringname),"playermapyrot[%i]",count2);
- playermapyrot[count][count2] = dini_Int(mapname[count],savestringname);
- format(savestringname,sizeof(savestringname),"playermapzrot[%i]",count2);
- playermapzrot[count][count2] = dini_Int(mapname[count],savestringname);
- format(savestringname,sizeof(savestringname),"mapobjectstring[%i]",count2);
- new mapstring[128];
- format(mapstring,sizeof(mapstring),"%s",dini_Get(mapname[count],savestringname));
- format(savestringname,sizeof(savestringname),"mapobjectmid[%i]",count2);
- mapobjectmid[count][count2] = dini_Int(mapname[count],savestringname);
- format(string,sizeof(string),"object:%s--ID:Objectid-%i-%i-Mid:%i-mapname:%s",mapstring,count2,count,mapobjectmid[count][count2],mapname[count]);
- 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]);
- printf("loading object:%i objectmid-%i-x-%f-y-%f-z-%f-xr-%f-yr-%f-zr-%f-objstring-%s-state-%i",count2,mapobjectmid[count][count2],playermapx[count][count2],playermapy[count][count2],playermapz[count][count2],playermapxrot[count][count2],playermapyrot[count][count2],playermapzrot[count][count2],mapstring,mapobjectstate[count][count2]);
- for(new i;i < MAX_PLAYERS;i++)
- {
- if((showlabel[i])==1)
- {
- mapobjectlabel[count][count2] = CreatePlayer3DTextLabel(i,string,COLOR,playermapx[count][count2],playermapy[count][count2],playermapz[count][count2],DISTANCELABEL,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0);
- }
- }
- }
- }
- SendClientMessage(playerid, LIGHTBLUE,"You have opened a map");
- return 1;
- }
- }
- return SendClientMessage(playerid, RED," There are no avaliable slots");
- }
- else
- {
- ShowPlayerDialog(playerid,MAPDOSENOTEXITS,DIALOG_STYLE_MSGBOX,"ERROR","The name you entered does not exist","Back","Close");
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "You canceled editing a map");
- }
- }
- else if(dialogid == OPENMAPINPUTVIEW)
- {
- if(response)
- {
- new mname[128];
- format(mname,sizeof(mname),"JBobjects/%s.map",inputtext);
- if(dini_Exists(mname))
- {
- for(new count;count < 12;count++)
- {
- if(!isnull(viewstring[count]))
- {
- if(strcmp(mname,viewstring[count],true,128)==0)
- {
- SendClientMessage(playerid, RED, "this map is already open");
- return 1;
- }
- }
- }
- format(viewstring[viewselected[playerid]],sizeof(viewstring),"%s",mname);
- viewslot[viewselected[playerid]] = 1;
- new playerfilename[128];
- format(playerfilename,sizeof(playerfilename),"%s",viewstring[viewselected[playerid]]);
- new maxobj = dini_Int(playerfilename,"mapobjectscount");
- for(new count;count < maxobj;count++)
- {
- format(savestringname,sizeof(savestringname),"mapobjectstate[%i]",count);
- new objstate = dini_Int(playerfilename,savestringname);
- if((objstate)==1)
- {
- new Float:x,Float:y,Float:z,Float:xrot,Float:yrot,Float:zrot;
- new objectmid;
- format(savestringname,sizeof(savestringname),"playermapx[%i]",count);
- x = dini_Int(playerfilename,savestringname);
- format(savestringname,sizeof(savestringname),"playermapy[%i]",count);
- y = dini_Int(playerfilename,savestringname);
- format(savestringname,sizeof(savestringname),"playermapz[%i]",count);
- z = dini_Int(playerfilename,savestringname);
- format(savestringname,sizeof(savestringname),"playermapxrot[%i]",count);
- xrot = dini_Int(playerfilename,savestringname);
- format(savestringname,sizeof(savestringname),"playermapyrot[%i]",count);
- yrot = dini_Int(playerfilename,savestringname);
- format(savestringname,sizeof(savestringname),"playermapzrot[%i]",count);
- zrot = dini_Int(playerfilename,savestringname);
- format(savestringname,sizeof(savestringname),"mapobjectmid[%i]",count);
- objectmid = dini_Int(playerfilename,savestringname);
- viewobject[viewselected[playerid]][count] = CreateDynamicObject(objectmid,x,y,z,xrot,yrot,zrot);
- }
- }
- SendClientMessage(playerid, LIGHTBLUE, "You have opened a map in view mode");
- }
- else
- {
- format(viewstring[viewselected[playerid]],sizeof(viewstring),"");
- ShowPlayerDialog(playerid,MAPDOSENOTEXITS,DIALOG_STYLE_MSGBOX,"ERROR","this map does not exist","Back","Close");
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "You canceled viewing a map");
- }
- }
- else if(dialogid == OPENMAP)
- {
- if(response)
- {
- ShowPlayerDialog(playerid,OPENMAPINPUTEDIT,DIALOG_STYLE_INPUT,"mapname","please enter the name of the map you want to edit","Ok","Cancel");
- }
- else
- {
- if(IsPlayerAdmince(playerid,3))
- {
- string = "";
- for(new count;count< 12;count++)
- {
- if((viewslot[count])==1)
- {
- new addstr[128];
- new storestring[128];
- format(storestring,sizeof(storestring),"%s",string);
- format(addstr,sizeof(addstr),"%s",viewstring[count]);
- if(isnull(string))
- {
- format(string,sizeof(string),"%s",addstr);
- }
- else
- {
- format(string,sizeof(string),"%s\n%s",storestring,addstr);
- }
- }
- else
- {
- new addstr[128];
- new storestring[128];
- format(storestring,sizeof(storestring),"%s",string);
- format(addstr,sizeof(addstr),"emptyslot\n");
- if(isnull(string))
- {
- format(string,sizeof(string),"%s",addstr);
- }
- else
- {
- format(string,sizeof(string),"%s\n%s",storestring,addstr);
- }
- }
- }
- ShowPlayerDialog(playerid,OPENMAPLISTVIEW,DIALOG_STYLE_LIST,"select a slot",string,"Ok","Back");
- }
- else
- {
- SendClientMessage(playerid,RED, "You have to be atleast adminlevel 3 inorder to use this command");
- }
- }
- }
- else if(dialogid == OPENMAPLISTVIEW)
- {
- if(response)
- {
- if((viewslot[listitem])==0)
- {
- viewselected[playerid] = listitem;
- ShowPlayerDialog(playerid,OPENMAPINPUTVIEW,DIALOG_STYLE_INPUT,"mapname","please enter the name of the map you want to view","Ok","Cancel");
- }
- else
- {
- SendClientMessage(playerid, RED, "This Slot is already occupide");
- }
- }
- else
- {
- ShowPlayerDialog(playerid,OPENMAP,DIALOG_STYLE_MSGBOX,"Select","you can ether edit a map or open it just for viewing purposes","Edit","View");
- }
- }
- else if(dialogid == MAPNAMEEXITS)
- {
- if(response)
- {
- ShowPlayerDialog(playerid,MAPNAME,DIALOG_STYLE_INPUT,"Input","Please input the name of the map you wish to create","Ok","Cancel");
- }
- else
- {
- SendClientMessage(playerid, RED, "you have canceled makeing a map");
- }
- }
- else if(dialogid == MAPNAME)
- {
- if(response)
- {
- if(isnull(inputtext))
- {
- return SendClientMessage(playerid, RED, "You can't name the map nothing");
- }
- for(new count;count < MAX;count++)
- {
- if((mapplayerslot[count])==0)
- {
- format(mapname[count],sizeof(mapname),"JBobjects/%s.map",inputtext);
- if(dini_Exists(mapname[count]))
- {
- format(mapname[count],sizeof(mapname),"");
- ShowPlayerDialog(playerid,MAPNAMEEXITS,DIALOG_STYLE_MSGBOX,"ERROR","the map name you have enter is invalid","Ok","Close");
- return 1;
- }
- new name[128];
- GetPlayerName(playerid,name,sizeof(name));
- mapplayereditstate[playerid] = 1;
- mapplayerslot[count] = 1;
- mapplayerslotid[playerid] = count;
- format(mapplayereditingname[count],sizeof(mapplayereditingname),"%s",name);
- format(mapname[count],sizeof(mapname),"JBobjects/%s.map",inputtext);
- dini_Create(mapname[count]);
- dini_Set(mapname[count],"mapname",(mapname[count]));
- dini_Set(mapname[count],"mapplayereditingname",(mapplayereditingname[count]));
- SendClientMessage(playerid, LIGHTBLUE, "You have created a map");
- return 1;
- }
- }
- return SendClientMessage(playerid, RED, "all slots are currently taken");
- }
- else
- {
- SendClientMessage(playerid, RED, "You have cancel makeing a map");
- }
- }
- else if(dialogid == DIALOG_ADDOBJECTS)
- {
- if(response)
- {
- if(listitem == 0)
- {
- ShowPlayerDialog(playerid, DIALOG_CUSTOMINPUT, DIALOG_STYLE_INPUT,"Manualy enter","Enter the id of the object you want to add","OK","Back");
- }
- else if(listitem ==1)
- {
- ShowPlayerDialog(playerid,DIALOG_SAMPLOGOS,DIALOG_STYLE_LIST,"SAMP logos","SAMPLogoSmall\nSAMPLogoBig","Ok","Back");
- }
- //I did not include partical effects becuse it lasts only like one second for some of them if you want it follow these instruction
- //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");
- //make sure you put it as the third one(after SA:MP Logos)
- //uncomment the section below.. if(listitem ==2)
- //make sure in this catagory you change the number back to the right order EXAPLE: if(listitem ==0) --next-- if(listitem ==1)
- //make sure you uncomment the section bellow that has the labels DIALOG_PARTICLEEFFECTSP1,DIALOG_PARTICLEEFFECTSP2,DIALOG_PARTICLEEFFECTSP3,DIALOG_PARTICLEEFFECTSP4,DIALOG_PARTICLEEFFECTSP5)
- //make sure you uncomment the section called DIALOG_PARTICLEEFFECTS for the pages
- //you are done and ready to use the script if you don't do one this chances are that the script will not work
- //if you want to revers it ether redownload or reverse these steps
- /*else if(listitem ==2)
- {
- ShowPlayerDialog(playerid,DIALOG_PARTICLEEFFECTS,DIALOG_STYLE_LIST,"Particle effects","Page1\nPage2\nPage3\nPage4\nPage5","Ok","Back");
- }*/
- else if(listitem ==2)
- {
- ShowPlayerDialog(playerid,DIALOG_LANDMASSES,DIALOG_STYLE_LIST,"Land Masses","Volcano\nIslandBase1","Ok","Back");
- }
- else if(listitem ==3)
- {
- ShowPlayerDialog(playerid,DIALOG_BASES,DIALOG_STYLE_LIST,"Base Sections","Base125mx125m1\nBase250mx250m1","Ok","Back");
- }
- else if(listitem ==4)
- {
- ShowPlayerDialog(playerid,DIALOG_ELEVATOR,DIALOG_STYLE_LIST,"Elevators","VCElevator1\nElevatorDoor1\nElevatorDoor2\nVCElevatorFront1","Ok","Back");
- }
- else if(listitem ==5)
- {
- ShowPlayerDialog(playerid,DIALOG_DMCAGES,DIALOG_STYLE_LIST,"DM Cages","DMCage1\nDMCage2","Ok","Back");
- }
- else if(listitem ==6)
- {
- //18761 RaceFinishLine1
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"RaceFinishLine1");
- jbobjectid[objectindex[playerid]]= 18761;
- }
- else if(listitem ==7)
- {
- ShowPlayerDialog(playerid,DIALOG_PARKOUR,DIALOG_STYLE_LIST,"ParkOur","Concrete1mx1mx5m\nConcrete3mx3mx5m\nConcrete5mx5mx5m\nConcrete10mx10mx5m\nConcrete10mx1mx5m\nConcreteStair1","Ok","Back");
- }
- else if(listitem ==8)
- {
- ShowPlayerDialog(playerid,DIALOG_PLATFORMS,DIALOG_STYLE_LIST,"Platforms","SkyDivePlatform1\nSkyDivePlatform1a\nSkyDivePlatform1b\nSpiralStair1","Ok","Back");
- }
- else if(listitem ==9)
- {
- ShowPlayerDialog(playerid,DIALOG_TUNNELS,DIALOG_STYLE_LIST,"Tunnels","TunnelSection1\nTunnelJoinSection1\nTunnelJoinSection2\nTunnelJoinSection3\nTunnelJoinSection4\nTunnelSpiral1","Ok","Back");
- }
- else if(listitem ==10)
- {
- ShowPlayerDialog(playerid,DIALOG_RAMPS,DIALOG_STYLE_LIST,"Ramps","RampT1\nRampT2\nRampT3\nMeshRampBig\nCookieRamp1\nFunBoxTop1\nFunBoxRamp1\nFunBoxRamp2\nFunBoxRamp3\nFunBoxRamp4","Ok","Back");
- }
- else if(listitem ==11)
- {
- ShowPlayerDialog(playerid,DIALOG_ROADS,DIALOG_STYLE_LIST,"Roads","MRoad40m\nMRoad150m\nMRoadBend180Deg1\nMRoadBend45Deg\nMRoadTwist15DegL\nMRoadTwist15DegR\nMRoadBend15Deg1\nMRoadBend15Deg2\nMRoadBend15Deg3\nMRoadBend15Deg4\nMRoadB45T15DegL\nMRoadB45T15DegR\nMRoadHelix1\nMRoadLoop1","Ok","Back");
- }
- else if(listitem ==12)
- {
- ShowPlayerDialog(playerid,DIALOG_BRIDGES,DIALOG_STYLE_LIST,"Bridges","MBridgeRamp1\nMBridge150m1\nMBridge150m2\nMBridge150m3\nMBridge150m4\nMBridge75mHalf","Ok","Back");
- }
- else if(listitem ==13)
- {
- ShowPlayerDialog(playerid,DIALOG_TUBES,DIALOG_STYLE_LIST,"Tubes","Page1\nPage2","Ok","Back");
- }
- else if(listitem ==14)
- {
- ShowPlayerDialog(playerid,DIALOG_SPHERES,DIALOG_STYLE_LIST,"Spheres","GlassSphere1\nWaterUVAnimSphere1\nRTexturesphere","Ok","Back");
- }
- else if(listitem ==15)
- {
- ShowPlayerDialog(playerid,DIALOG_OTHERS,DIALOG_STYLE_LIST,"Others","HugeHalfPipe1\nSamSiteNonDynamic\nParaDropNonDynamic\nHeliPad1","Ok","Back");
- }
- else if(listitem ==16)
- {
- ShowPlayerDialog(playerid,DIALOG_FAVORITEADDDELETE,DIALOG_STYLE_LIST,"Delete&Add","Addobject\nDeleteobject\nInport object to game","Ok","Back");
- }
- }
- else
- {
- SendClientMessage(playerid, RED, "You have closed the diolog boxes");
- }
- }
- //main screen ends
- else if(dialogid == DIALOG_CUSTOMINPUT)
- {
- if(response)
- {
- new val;
- val = strval(inputtext);
- if((val)==0)
- {
- return SendClientMessage(playerid, RED, "You have to enter a valid number, you entered 0 or a string");
- }
- jbobjectid[objectindex[playerid]] = strval(inputtext);
- 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");
- }
- else
- {
- 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");
- }
- }
- else if(dialogid == DIALOG_SAMPLOGOS)
- {
- if(response)
- {
- if(listitem ==0)
- {
- //18749 SAMPLogoSmall
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"SAMPLogoSmall");
- jbobjectid[objectindex[playerid]]= 18749;
- }
- else if(listitem ==1)
- {
- //18750 SAMPLogoBig
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"SAMPLogoBig");
- jbobjectid[objectindex[playerid]]= 18750;
- }
- }
- else
- {
- 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");
- }
- }
- //remove this becuse it disapears after 1 second
- /*else if(dialogid == DIALOG_PARTICLEEFFECTS)
- {
- if(response)
- {
- if(listitem == 0)
- {
- 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");
- }
- else if(listitem == 1)
- {
- 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");
- }
- else if(listitem == 2)
- {
- 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");
- }
- else if(listitem == 3)
- {
- 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");
- }
- else if(listitem == 4)
- {
- 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");
- }
- }
- else
- {
- 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");
- }
- }*/
- else if(dialogid == DIALOG_LANDMASSES)
- {
- if(response)
- {
- if(listitem ==0)
- {
- //18751 IslandBase1
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"IslandBase1");
- jbobjectid[objectindex[playerid]]= 18751;
- }
- else if(listitem ==1)
- {
- //18752 Volcano
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"Volcano");
- jbobjectid[objectindex[playerid]]= 18752;
- }
- }
- else
- {
- 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");
- }
- }
- else if(dialogid == DIALOG_BASES)
- {
- if(response)
- {
- if(listitem ==0)
- {
- //18753 Base125mx125m1
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"Base125mx125m1");
- jbobjectid[objectindex[playerid]]= 18753;
- }
- else if(listitem ==1)
- {
- //18754 Base250mx250m1
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"Base250mx250m1");
- jbobjectid[objectindex[playerid]]= 18754;
- }
- }
- else
- {
- 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");
- }
- }
- else if(dialogid == DIALOG_ELEVATOR)
- {
- if(response)
- {
- if(listitem ==0)
- {
- //18755 VCElevator1
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"VCElevator1");
- jbobjectid[objectindex[playerid]]= 18755;
- }
- else if(listitem ==1)
- {
- //18756 ElevatorDoor1
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"ElevatorDoor1");
- jbobjectid[objectindex[playerid]]= 18756;
- }
- else if(listitem ==2)
- {
- //18757 ElevatorDoor2
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"ElevatorDoor2");
- jbobjectid[objectindex[playerid]]= 18757;
- }
- else if(listitem ==3)
- {
- //18758 VCElevatorFront1
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"VCElevatorFront1");
- jbobjectid[objectindex[playerid]]= 18758;
- }
- }
- else
- {
- 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");
- }
- }
- else if(dialogid == DIALOG_DMCAGES)
- {
- if(response)
- {
- if(listitem ==0)
- {
- //18759 DMCage1
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"DMCage1");
- jbobjectid[objectindex[playerid]]= 18759;
- }
- else if(listitem ==1)
- {
- //18760 DMCage2
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"DMCage2");
- jbobjectid[objectindex[playerid]]= 18760;
- }
- }
- else
- {
- 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");
- }
- }
- else if(dialogid == DIALOG_PARKOUR)
- {
- if(response)
- {
- if(listitem ==0)
- {
- //18762 Concrete1mx1mx5m
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"Concrete1mx1mx5m");
- jbobjectid[objectindex[playerid]]= 18762;
- }
- else if(listitem ==1)
- {
- //18763 Concrete3mx3mx5m
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"Concrete3mx3mx5m");
- jbobjectid[objectindex[playerid]]= 18763;
- }
- else if(listitem ==2)
- {
- //18764 Concrete5mx5mx5m
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"Concrete5mx5mx5m");
- jbobjectid[objectindex[playerid]]= 18764;
- }
- else if(listitem ==3)
- {
- //18765 Concrete10mx10mx5m
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"Concrete10mx10mx5m");
- jbobjectid[objectindex[playerid]]= 18765;
- }
- else if(listitem ==4)
- {
- //18766 Concrete10mx1mx5m
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"Concrete10mx1mx5m");
- jbobjectid[objectindex[playerid]]= 18766;
- }
- else if(listitem ==5)
- {
- //18767 ConcreteStair1
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"ConcreteStair1");
- jbobjectid[objectindex[playerid]]= 18767;
- }
- }
- else
- {
- 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");
- }
- }
- else if(dialogid == DIALOG_PLATFORMS)
- {
- if(response)
- {
- if(listitem ==0)
- {
- //18768 SkyDivePlatform1
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"SkyDivePlatform1");
- jbobjectid[objectindex[playerid]]= 18768;
- }
- else if(listitem ==1)
- {
- //18769 SkyDivePlatform1a
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"SkyDivePlatform1a");
- jbobjectid[objectindex[playerid]]= 18769;
- }
- else if(listitem ==2)
- {
- //18770 SkyDivePlatform1b
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"SkyDivePlatform1b");
- jbobjectid[objectindex[playerid]]= 18770;
- }
- else if(listitem ==3)
- {
- //18771 SpiralStair1
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"SpiralStair1");
- jbobjectid[objectindex[playerid]]= 18771;
- }
- }
- else
- {
- 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");
- }
- }
- else if(dialogid == DIALOG_TUNNELS)
- {
- if(response)
- {
- if(listitem ==0)
- {
- //18772 TunnelSection1
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"TunnelSection1");
- jbobjectid[objectindex[playerid]]= 18772;
- }
- else if(listitem ==1)
- {
- //18773 TunnelJoinSection1
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"TunnelJoinSection1");
- jbobjectid[objectindex[playerid]]= 18773;
- }
- else if(listitem ==2)
- {
- //18774 TunnelJoinSection2
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"TunnelJoinSection2");
- jbobjectid[objectindex[playerid]]= 18774;
- }
- else if(listitem ==3)
- {
- //18775 TunnelJoinSection3
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"TunnelJoinSection3");
- jbobjectid[objectindex[playerid]]= 18775;
- }
- else if(listitem ==4)
- {
- //18776 TunnelJoinSection4
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"TunnelJoinSection4");
- jbobjectid[objectindex[playerid]]= 18776;
- }
- else if(listitem ==5)
- {
- //18777 TunnelSpiral1
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"TunnelSpiral1");
- jbobjectid[objectindex[playerid]]= 18777;
- }
- }
- else
- {
- 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");
- }
- }
- else if(dialogid == DIALOG_RAMPS)
- {
- if(response)
- {
- if(listitem ==0)
- {
- //18778 RampT1
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"RampT1");
- jbobjectid[objectindex[playerid]]= 18778;
- }
- else if(listitem ==1)
- {
- //18779 RampT2
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"RampT2");
- jbobjectid[objectindex[playerid]]= 18779;
- }
- else if(listitem ==2)
- {
- //18780 RampT3
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"RampT3");
- jbobjectid[objectindex[playerid]]= 18780;
- }
- else if(listitem ==3)
- {
- //18781 MeshRampBig
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"MeshRampBig");
- jbobjectid[objectindex[playerid]]= 18781;
- }
- else if(listitem ==4)
- {
- //18782 CookieRamp1
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"CookieRamp1");
- jbobjectid[objectindex[playerid]]= 18782 ;
- }
- else if(listitem ==5)
- {
- //18783 FunBoxTop1
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"FunBoxTop1");
- jbobjectid[objectindex[playerid]]= 18783;
- }
- else if(listitem ==6)
- {
- //18784 FunBoxRamp1
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"FunBoxRamp1");
- jbobjectid[objectindex[playerid]]= 18784;
- }
- else if(listitem ==7)
- {
- //18785 FunBoxRamp2
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"FunBoxRamp2");
- jbobjectid[objectindex[playerid]]= 18785;
- }
- else if(listitem ==8)
- {
- //18786 FunBoxRamp3
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"FunBoxRamp3");
- jbobjectid[objectindex[playerid]]= 18786;
- }
- else if(listitem ==9)
- {
- //18787 FunBoxRamp4
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"FunBoxRamp4");
- jbobjectid[objectindex[playerid]]= 18787;
- }
- }
- else
- {
- 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");
- }
- }
- else if(dialogid == DIALOG_ROADS)
- {
- if(response)
- {
- if(listitem ==0)
- {
- //18788 MRoad40m
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"MRoad40m");
- jbobjectid[objectindex[playerid]]= 18788;
- }
- else if(listitem ==1)
- {
- //18789 MRoad150m
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"MRoad150m");
- jbobjectid[objectindex[playerid]]= 18789;
- }
- else if(listitem ==2)
- {
- //18790 MRoadBend180Deg1
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"MRoadBend180Deg1");
- jbobjectid[objectindex[playerid]]= 18790;
- }
- else if(listitem ==3)
- {
- //18791 MRoadBend45Deg
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"MRoadBend45Deg");
- jbobjectid[objectindex[playerid]]= 18791;
- }
- else if(listitem ==4)
- {
- //18792 MRoadTwist15DegL
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"MRoadTwist15DegL");
- jbobjectid[objectindex[playerid]]= 18792;
- }
- else if(listitem ==5)
- {
- //18793 MRoadTwist15DegR
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"MRoadTwist15DegR");
- jbobjectid[objectindex[playerid]]= 18793;
- }
- else if(listitem ==6)
- {
- //18794 MRoadBend15Deg1
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"MRoadBend15Deg1");
- jbobjectid[objectindex[playerid]]= 18794;
- }
- else if(listitem ==7)
- {
- //18795 MRoadBend15Deg2
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"MRoadBend15Deg2");
- jbobjectid[objectindex[playerid]]= 18795;
- }
- else if(listitem ==8)
- {
- //18796 MRoadBend15Deg3
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"MRoadBend15Deg3");
- jbobjectid[objectindex[playerid]]= 18796;
- }
- else if(listitem ==9)
- {
- //18797 MRoadBend15Deg4
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"MRoadBend15Deg4");
- jbobjectid[objectindex[playerid]]= 18797;
- }
- else if(listitem ==10)
- {
- //18798 MRoadB45T15DegL
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"MRoadB45T15DegL");
- jbobjectid[objectindex[playerid]]= 18798;
- }
- else if(listitem ==11)
- {
- //18799 MRoadB45T15DegR
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"MRoadB45T15DegR");
- jbobjectid[objectindex[playerid]]= 18799;
- }
- else if(listitem ==12)
- {
- //18800 MRoadHelix1
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"MRoadHelix1");
- jbobjectid[objectindex[playerid]]= 18800;
- }
- else if(listitem ==13)
- {
- //18801 MRoadLoop1
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"MRoadLoop1");
- jbobjectid[objectindex[playerid]]= 18801;
- }
- }
- else
- {
- 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");
- }
- }
- else if(dialogid == DIALOG_BRIDGES)
- {
- if(response)
- {
- if(listitem ==0)
- {
- //18802 MBridgeRamp1
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"MBridgeRamp1");
- jbobjectid[objectindex[playerid]]= 18802;
- }
- else if(listitem ==1)
- {
- //18803 MBridge150m1
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"MBridge150m1");
- jbobjectid[objectindex[playerid]]= 18803;
- }
- else if(listitem ==2)
- {
- //18804 MBridge150m2
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"MBridge150m2");
- jbobjectid[objectindex[playerid]]= 18804;
- }
- else if(listitem ==3)
- {
- //18805 MBridge150m3
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"MBridge150m3");
- jbobjectid[objectindex[playerid]]= 18805;
- }
- else if(listitem ==4)
- {
- //18806 MBridge150m4
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"MBridge150m4");
- jbobjectid[objectindex[playerid]]= 18806;
- }
- else if(listitem ==5)
- {
- //18807 MBridge75mHalf
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"MBridge75mHalf");
- jbobjectid[objectindex[playerid]]= 18807;
- }
- }
- else
- {
- 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");
- }
- }
- else if(dialogid == DIALOG_TUBES)
- {
- if(response)
- {
- if(listitem == 0)
- {
- 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");
- }
- else if(listitem == 1)
- {
- 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");
- }
- }
- else
- {
- 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");
- }
- }
- else if(dialogid == DIALOG_SPHERES)
- {
- if(response)
- {
- if(listitem ==0)
- {
- //18843 GlassSphere1
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"GlassSphere1");
- jbobjectid[objectindex[playerid]]= 18843;
- }
- else if(listitem ==1)
- {
- //18844 WaterUVAnimSphere1
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"WaterUVAnimSphere1");
- jbobjectid[objectindex[playerid]]= 18844;
- }
- else if(listitem ==2)
- {
- //18845 RTexturesphere
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"RTexturesphere");
- jbobjectid[objectindex[playerid]]= 18845;
- }
- }
- else
- {
- 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");
- }
- }
- else if(dialogid == DIALOG_OTHERS)
- {
- if(response)
- {
- if(listitem ==0)
- {
- //18847 HugeHalfPipe1
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"HugeHalfPipe1");
- jbobjectid[objectindex[playerid]]= 18847;
- }
- else if(listitem ==1)
- {
- //18848 SamSiteNonDynamic
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"SamSiteNonDynamic");
- jbobjectid[objectindex[playerid]]= 18848;
- }
- else if(listitem ==2)
- {
- //18849 ParaDropNonDynamic
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"ParaDropNonDynamic");
- jbobjectid[objectindex[playerid]]= 18849;
- }
- else if(listitem ==3)
- {
- //18850 HeliPad1
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"HeliPad1");
- jbobjectid[objectindex[playerid]]= 18850;
- }
- }
- else
- {
- 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");
- }
- }
- else if(dialogid == DIALOG_TUBESP1)
- {
- if(response)
- {
- if(listitem ==0)
- {
- //18808 Tube50m1
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"Tube50m1");
- jbobjectid[objectindex[playerid]]= 18808;
- }
- else if(listitem ==1)
- {
- //18809 Tube50mGlass1
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"Tube50mGlass1");
- jbobjectid[objectindex[playerid]]= 18809;
- }
- else if(listitem ==2)
- {
- //18810 Tube50mBulge1
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"Tube50mBulge1");
- jbobjectid[objectindex[playerid]]= 18810;
- }
- else if(listitem ==3)
- {
- //18811 Tube50mGlassBulge1
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"Tube50mGlassBulge1");
- jbobjectid[objectindex[playerid]]= 18811;
- }
- else if(listitem ==4)
- {
- //18812 Tube50mFunnel1
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"Tube50mFunnel1");
- jbobjectid[objectindex[playerid]]= 18812;
- }
- else if(listitem ==5)
- {
- //18813 Tube50mGlassFunnel1
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"Tube50mGlassFunnel1");
- jbobjectid[objectindex[playerid]]= 18813;
- }
- else if(listitem ==6)
- {
- //18814 Tube50mFunnel2
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"Tube50mFunnel2");
- jbobjectid[objectindex[playerid]]= 18814;
- }
- else if(listitem ==7)
- {
- //18815 Tube50mFunnel3
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"Tube50mFunnel3");
- jbobjectid[objectindex[playerid]]= 18815;
- }
- else if(listitem ==8)
- {
- //18816 Tube50mFunnel4
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"Tube50mFunnel4");
- jbobjectid[objectindex[playerid]]= 18816;
- }
- else if(listitem ==9)
- {
- //18817 Tube50mTSection1
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"Tube50mTSection1");
- jbobjectid[objectindex[playerid]]= 18817;
- }
- else if(listitem ==10)
- {
- //18818 Tube50mGlassT1
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"Tube50mGlassT1");
- jbobjectid[objectindex[playerid]]= 18818;
- }
- else if(listitem ==11)
- {
- //18819 Tube50mPlus1
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"Tube50mPlus1");
- jbobjectid[objectindex[playerid]]= 18819;
- }
- else if(listitem ==12)
- {
- //18820 Tube50mGlassPlus1
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"Tube50mGlassPlus1");
- jbobjectid[objectindex[playerid]]= 18820;
- }
- else if(listitem ==13)
- {
- //18821 Tube50m45Bend1
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"Tube50m45Bend1");
- jbobjectid[objectindex[playerid]]= 18821;
- }
- else if(listitem ==14)
- {
- //18822 Tube50mGlass45Bend1
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"Tube50mGlass45Bend1");
- jbobjectid[objectindex[playerid]]= 18822;
- }
- else if(listitem ==15)
- {
- //18823 Tube50m90Bend1
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"Tube50m90Bend1");
- jbobjectid[objectindex[playerid]]= 18823;
- }
- else if(listitem ==16)
- {
- //18824 Tube50mGlass90Bend1
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"Tube50mGlass90Bend1");
- jbobjectid[objectindex[playerid]]= 18824;
- }
- else if(listitem ==17)
- {
- 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");
- }
- }
- else
- {
- ShowPlayerDialog(playerid,DIALOG_TUBES,DIALOG_STYLE_LIST,"Tubes","Page1\nPage2","Ok","Back");
- }
- }
- else if(dialogid == DIALOG_TUBESP2)
- {
- if(response)
- {
- if(listitem ==0)
- {
- //18825 Tube50m180Bend1
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"Tube50m180Bend1");
- jbobjectid[objectindex[playerid]]= 18825;
- }
- else if(listitem ==1)
- {
- //18826 Tube50mGlass180Bend
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"Tube50mGlass180Bend");
- jbobjectid[objectindex[playerid]]= 18826;
- }
- else if(listitem ==2)
- {
- //18827 Tube100m2
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"Tube100m2");
- jbobjectid[objectindex[playerid]]= 18827;
- }
- else if(listitem ==3)
- {
- //18828 SpiralTube1
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"SpiralTube1");
- jbobjectid[objectindex[playerid]]= 18828;
- }
- else if(listitem ==4)
- {
- //18829 RTexturetube
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"RTexturetube");
- jbobjectid[objectindex[playerid]]= 18829;
- }
- else if(listitem ==5)
- {
- //18830 RTexturebridge
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"RTexturebridge");
- jbobjectid[objectindex[playerid]]= 18830;
- }
- else if(listitem ==6)
- {
- //18831 RT25mBend90Tube1
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"RT25mBend90Tube1");
- jbobjectid[objectindex[playerid]]= 18831;
- }
- else if(listitem ==7)
- {
- //18832 RT25mBend180Tube1
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"RT25mBend180Tube1");
- jbobjectid[objectindex[playerid]]= 18832;
- }
- else if(listitem ==8)
- {
- //18833 RT50mBend45Tube1
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"RT50mBend45Tube1");
- jbobjectid[objectindex[playerid]]= 18833;
- }
- else if(listitem ==9)
- {
- //18834 RT50mBend180Tube1
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"RT50mBend180Tube1");
- jbobjectid[objectindex[playerid]]= 18834;
- }
- else if(listitem ==10)
- {
- //18835 RBFunnel
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"RBFunnel");
- jbobjectid[objectindex[playerid]]= 18835;
- }
- else if(listitem ==11)
- {
- //18836 RBHalfpipe
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"RBHalfpipe");
- jbobjectid[objectindex[playerid]]= 18836;
- }
- else if(listitem ==12)
- {
- //18837 RB25mBend90Tube
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"RB25mBend90Tube");
- jbobjectid[objectindex[playerid]]= 18837;
- }
- else if(listitem ==13)
- {
- //18838 RB25mBend180Tube
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"RB25mBend180Tube");
- jbobjectid[objectindex[playerid]]= 18838;
- }
- else if(listitem ==14)
- {
- //18839 RB50mBend45Tube
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"RB50mBend45Tube");
- jbobjectid[objectindex[playerid]]= 18839;
- }
- else if(listitem ==15)
- {
- //18840 RB50mBend90Tube
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"RB50mBend90Tube");
- jbobjectid[objectindex[playerid]]= 18840;
- }
- else if(listitem ==16)
- {
- //18841 RB50mBend180Tube
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"RB50mBend180Tube");
- jbobjectid[objectindex[playerid]]= 18841;
- }
- else if(listitem ==17)
- {
- //18842 RB50mTube
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"RB50mTube");
- jbobjectid[objectindex[playerid]]= 18842;
- }
- else if(listitem ==18)
- {
- 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");
- }
- }
- else
- {
- ShowPlayerDialog(playerid,DIALOG_TUBES,DIALOG_STYLE_LIST,"Tubes","Page1\nPage2","Ok","Back");
- }
- }
- //--------------------------------------------------------------------------------------------------------------//
- //-------------------Removed-this-becuse-there-was-no-point-most-of-the-action-disapear-in-1-sec----------------//
- //--------------------------------------------------------------------------------------------------------------//
- /*else if(dialogid == DIALOG_PARTICLEEFFECTSP1)
- {
- if(response)
- {
- if(listitem ==0)
- { //18668 blood_heli
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"blood_heli");
- jbobjectid[objectindex[playerid]]= 18668;
- }
- else if(listitem ==1)
- {
- //18669 boat_prop
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"boat_prop");
- jbobjectid[objectindex[playerid]]= 18669;
- }
- else if(listitem ==2)
- {
- //18670 camflash
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"camflash");
- jbobjectid[objectindex[playerid]]= 18670;
- }
- else if(listitem ==3)
- {
- //18671 carwashspray
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"carwashspray");
- jbobjectid[objectindex[playerid]]= 18671;
- }
- else if(listitem ==4)
- {
- //18672 cementp
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"cementp");
- jbobjectid[objectindex[playerid]]= 18672;
- }
- else if(listitem ==5)
- {
- //18673 cigarette_smoke
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"cigarette_smoke");
- jbobjectid[objectindex[playerid]]= 18673;
- }
- else if(listitem ==6)
- {
- //18674 cloudfast
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"cloudfast");
- jbobjectid[objectindex[playerid]]= 18674;
- }
- else if(listitem ==7)
- {
- //18676 coke_trail
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"coke_trail");
- jbobjectid[objectindex[playerid]]= 18676;
- }
- else if(listitem ==8)
- {
- //18677 exhale
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"exhale");
- jbobjectid[objectindex[playerid]]= 18677;
- }
- else if(listitem ==9)
- {//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
- //18678 explosion_barrel
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"explosion_barrel");
- jbobjectid[objectindex[playerid]]= 18678;
- }
- else if(listitem ==10)
- {
- //18679 explosion_crate
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"explosion_crate");
- jbobjectid[objectindex[playerid]]= 18679;
- }
- else if(listitem ==11)
- {
- //18680 explosion_door
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"explosion_door");
- jbobjectid[objectindex[playerid]]= 18680;
- }
- else if(listitem ==12)
- {
- //18681 explosion_fuel_car
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"explosion_fuel_car");
- jbobjectid[objectindex[playerid]]= 18681;
- }
- else if(listitem ==13)
- {
- //18682 explosion_large
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"explosion_large");
- jbobjectid[objectindex[playerid]]= 18682;
- }
- else if(listitem ==14)
- {
- //18683 explosion_medium
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"explosion_medium");
- jbobjectid[objectindex[playerid]]= 18683;
- }
- else if(listitem ==15)
- {
- //18684 explosion_molotov
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"explosion_molotov");
- jbobjectid[objectindex[playerid]]= 18684;
- }
- else if(listitem ==16)
- {
- //18685 explosion_small
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"explosion_small");
- jbobjectid[objectindex[playerid]]= 18685;
- }
- else if(listitem ==17)
- {
- //18686 explosion_tiny
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"explosion_tiny");
- jbobjectid[objectindex[playerid]]= 18686;
- }
- else if(listitem ==18)
- {
- 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");
- }
- }
- else
- {
- ShowPlayerDialog(playerid,DIALOG_PARTICLEEFFECTS,DIALOG_STYLE_LIST,"Particle effects","Page1\nPage2\nPage3\nPage4\nPage5","Ok","Back");
- }
- }
- else if(dialogid == DIALOG_PARTICLEEFFECTSP2)
- {
- if(response)
- {
- if(listitem ==0)
- {
- //18687 extinguisher
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"extinguisher");
- jbobjectid[objectindex[playerid]]= 18687;
- }
- else if(listitem ==1)
- {
- //18688 fire
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"fire");
- jbobjectid[objectindex[playerid]]= 18688;
- }
- else if(listitem ==2)
- {
- //18689 fire_bike+
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"fire_bike+");
- jbobjectid[objectindex[playerid]]= 18689;
- }
- else if(listitem ==3)
- {
- //18690 fire_car
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"fire_car");
- jbobjectid[objectindex[playerid]]= 18690;
- }
- else if(listitem ==4)
- {
- //fire_large 18691
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"fire_large");
- jbobjectid[objectindex[playerid]]= 18691;
- }
- else if(listitem ==5)
- {
- //18692 fire_med
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"fire_med");
- jbobjectid[objectindex[playerid]]= 18692;
- }
- else if(listitem ==6)
- {
- //18693 Flame99
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"Flame99");
- jbobjectid[objectindex[playerid]]= 18693;
- }
- else if(listitem ==7)
- {
- //18694 flamethrower
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"flamethrower");
- jbobjectid[objectindex[playerid]]= 18694;
- }
- else if(listitem ==8)
- {
- //18695 gunflash
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"gunflash");
- jbobjectid[objectindex[playerid]]= 18695;
- }
- else if(listitem ==9)
- {
- //18696 gunsmoke
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"gunsmoke");
- jbobjectid[objectindex[playerid]]= 18696;
- }
- else if(listitem ==10)
- {
- //18697 heli_dust
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"heli_dust");
- jbobjectid[objectindex[playerid]]= 18697;
- }
- else if(listitem ==11)
- {
- 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");
- }
- else if(listitem ==12)
- {
- 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");
- }
- }
- else
- {
- ShowPlayerDialog(playerid,DIALOG_PARTICLEEFFECTS,DIALOG_STYLE_LIST,"Particle effects","Page1\nPage2\nPage3\nPage4\nPage5","Ok","Back");
- }
- }
- else if(dialogid == DIALOG_PARTICLEEFFECTSP3)
- {
- if(response)
- {
- if(listitem ==0)
- {
- //18698 insects
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"insects");
- jbobjectid[objectindex[playerid]]= 18698;
- }
- else if(listitem ==1)
- {
- //18699 jetpack
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"jetpack");
- jbobjectid[objectindex[playerid]]= 18699;
- }
- else if(listitem ==2)
- {
- //18700 jetthrust
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"jetthrust");
- jbobjectid[objectindex[playerid]]= 18700;
- }
- else if(listitem ==3)
- {
- //18701 molotov_flame
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"molotov_flame");
- jbobjectid[objectindex[playerid]]= 18701;
- }
- else if(listitem ==4)
- {
- //18702 nitro
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"nitro");
- jbobjectid[objectindex[playerid]]= 18702;
- }
- else if(listitem ==5)
- {
- //18703 overheat_car
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"overheat_car");
- jbobjectid[objectindex[playerid]]= 18703;
- }
- else if(listitem ==6)
- {
- //18704 overheat_car_elec
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"overheat_car_elec");
- jbobjectid[objectindex[playerid]]= 18704;
- }
- else if(listitem ==7)
- {
- //18705 petrolcan
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"petrolcan");
- jbobjectid[objectindex[playerid]]= 18705;
- }
- else if(listitem ==8)
- {
- //18706 prt_blood
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"prt_blood");
- jbobjectid[objectindex[playerid]]= 18706;
- }
- else if(listitem ==9)
- {
- //18707 prt_boatsplash
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"prt_boatsplash");
- jbobjectid[objectindex[playerid]]= 18707;
- }
- else if(listitem ==10)
- {
- //18708 prt_bubble
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"prt_bubble");
- jbobjectid[objectindex[playerid]]= 18708;
- }
- else if(listitem ==11)
- {
- //18709 prt_cardebris
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"prt_cardebris");
- jbobjectid[objectindex[playerid]]= 18709;
- }
- else if(listitem ==12)
- {
- //18710 prt_collisionsmoke
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"prt_collisionsmoke");
- jbobjectid[objectindex[playerid]]= 18710;
- }
- else if(listitem ==13)
- {
- //18711 prt_glass
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"prt_glass");
- jbobjectid[objectindex[playerid]]= 18711;
- }
- else if(listitem ==14)
- {
- //18712 prt_gunshell
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"prt_gunshell");
- jbobjectid[objectindex[playerid]]= 18712;
- }
- else if(listitem ==15)
- {
- //18713 prt_sand2
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"prt_sand2");
- jbobjectid[objectindex[playerid]]= 18713;
- }
- else if(listitem ==16)
- {
- //18714 prt_sand
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"prt_sand");
- jbobjectid[objectindex[playerid]]= 18714;
- }
- else if(listitem ==17)
- {
- 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");
- }
- else if(listitem ==18)
- {
- 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");
- }
- }
- else
- {
- ShowPlayerDialog(playerid,DIALOG_PARTICLEEFFECTS,DIALOG_STYLE_LIST,"Particle effects","Page1\nPage2\nPage3\nPage4\nPage5","Ok","Back");
- }
- }
- else if(dialogid == DIALOG_PARTICLEEFFECTSP4)
- {
- if(response)
- {
- if(listitem ==0)
- {
- //18715 prt_smoke_huge
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"prt_smoke_huge");
- jbobjectid[objectindex[playerid]]= 18715;
- }
- else if(listitem ==1)
- {
- //18716 prt_smoke_expand
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"prt_smoke_expand");
- jbobjectid[objectindex[playerid]]= 18716;
- }
- else if(listitem ==2)
- {
- //prt_spark 18717
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"prt_spark");
- jbobjectid[objectindex[playerid]]= 18717;
- }
- else if(listitem ==3)
- {
- //18718 prt_spark_2
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"prt_spark_2");
- jbobjectid[objectindex[playerid]]= 18718;
- }
- else if(listitem ==4)
- {
- //18719 prt_wake
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"prt_wake");
- jbobjectid[objectindex[playerid]]= 18719;
- }
- else if(listitem ==5)
- {
- //18720 prt_watersplash
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"prt_watersplash");
- jbobjectid[objectindex[playerid]]= 18720;
- }
- else if(listitem ==6)
- {
- //18721 prt_wheeldirt
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"prt_wheeldirt");
- jbobjectid[objectindex[playerid]]= 18721;
- }
- else if(listitem ==7)
- {
- //18722 puke
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"puke");
- jbobjectid[objectindex[playerid]]= 18722;
- }
- else if(listitem ==8)
- {
- //18723 riot_smoke
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"riot_smoke");
- jbobjectid[objectindex[playerid]]= 18723;
- }
- else if(listitem ==9)
- {
- //18724 shootlight
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"shootlight");
- jbobjectid[objectindex[playerid]]= 18724;
- }
- else if(listitem ==10)
- {
- //18725 smoke30lit
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"smoke30lit");
- jbobjectid[objectindex[playerid]]= 18725;
- }
- else if(listitem ==11)
- {
- //18726 smoke30m
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"smoke30m");
- jbobjectid[objectindex[playerid]]= 18726;
- }
- else if(listitem ==12)
- {
- //18727 smoke50lit
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"smoke50lit");
- jbobjectid[objectindex[playerid]]= 18727;
- }
- else if(listitem ==13)
- {
- //18728 smoke_flare
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"smoke_flare");
- jbobjectid[objectindex[playerid]]= 18728;
- }
- else if(listitem ==14)
- {
- //18729 spraycan
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"spraycan");
- jbobjectid[objectindex[playerid]]= 18729;
- }
- else if(listitem ==15)
- {
- 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");
- }
- else if(listitem ==16)
- {
- 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");
- }
- }
- else
- {
- ShowPlayerDialog(playerid,DIALOG_PARTICLEEFFECTS,DIALOG_STYLE_LIST,"Particle effects","Page1\nPage2\nPage3\nPage4\nPage5","Ok","Back");
- }
- }
- else if(dialogid == DIALOG_PARTICLEEFFECTSP5)
- {
- if(response)
- {
- if(listitem ==0)
- {
- //18730 tank_fire
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"tank_fire");
- jbobjectid[objectindex[playerid]]= 18730;
- }
- else if(listitem ==1)
- {
- //18731 teargas99
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"teargas99");
- jbobjectid[objectindex[playerid]]= 18731;
- }
- else if(listitem ==2)
- {
- //18732 teargasAD
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"teargasAD");
- jbobjectid[objectindex[playerid]]= 18732;
- }
- else if(listitem ==3)
- {
- //18733 tree_hit_fir
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"tree_hit_fir");
- jbobjectid[objectindex[playerid]]= 18733;
- }
- else if(listitem ==4)
- {
- //18734 tree_hit_palm
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"tree_hit_palm");
- jbobjectid[objectindex[playerid]]= 18734;
- }
- else if(listitem ==5)
- {
- //18735 vent2
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"vent2");
- jbobjectid[objectindex[playerid]]= 18735;
- }
- else if(listitem ==6)
- {
- //18736 vent
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"vent");
- jbobjectid[objectindex[playerid]]= 18736;
- }
- else if(listitem ==7)
- {
- //18737 wallbust
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"wallbust");
- jbobjectid[objectindex[playerid]]= 18737;
- }
- else if(listitem ==8)
- {
- //18738 water_fnt_tme
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"water_fnt_tme");
- jbobjectid[objectindex[playerid]]= 18738;
- }
- else if(listitem ==9)
- {
- //18739 water_fountain
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"water_fountain");
- jbobjectid[objectindex[playerid]]= 18739;
- }
- else if(listitem ==10)
- {
- //18740 water_hydrant
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"water_hydrant");
- jbobjectid[objectindex[playerid]]= 18740;
- }
- else if(listitem ==11)
- {
- //18741 water_ripples
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"water_ripples");
- jbobjectid[objectindex[playerid]]= 18741;
- }
- else if(listitem ==12)
- {
- //18742 water_speed
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"water_speed");
- jbobjectid[objectindex[playerid]]= 18742;
- }
- else if(listitem ==13)
- {
- //18743 water_splash
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"water_splash");
- jbobjectid[objectindex[playerid]]= 18743;
- }
- else if(listitem ==14)
- {
- //18744 water_splash_big
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"water_splash_big");
- jbobjectid[objectindex[playerid]]= 18744;
- }
- else if(listitem ==15)
- {
- //18745 water_splsh_sml
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"water_splsh_sml");
- jbobjectid[objectindex[playerid]]= 18745;
- }
- else if(listitem ==16)
- {
- //18746 water_swim
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"water_swim");
- jbobjectid[objectindex[playerid]]= 18746;
- }
- else if(listitem ==17)
- {
- //18747 waterfall_end
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"waterfall_end");
- jbobjectid[objectindex[playerid]]= 18747;
- }
- else if(listitem ==18)
- {
- //18748 WS_factorysmoke
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"WS_factorysmoke");
- jbobjectid[objectindex[playerid]]= 18748;
- }
- else if(listitem ==19)
- {
- 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");
- }
- }
- else
- {
- ShowPlayerDialog(playerid,DIALOG_PARTICLEEFFECTS,DIALOG_STYLE_LIST,"Particle effects","Page1\nPage2\nPage3\nPage4\nPage5","Ok","Back");
- }
- }*/
- else if(dialogid == DIALOG_CUSTOMINPUTSTRING)
- {
- if(response)
- {
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"%s",inputtext);
- }
- else
- {
- format(objectstring[objectindex[playerid]],128,"Custom Object");
- playerpick[playerid] = 1;
- }
- }
- else if(dialogid == DIALOG_FAVORITEADDDELETE)
- {//Addobject\nDeleteobject\nInport object to game
- if(response)
- {
- favoritedialogstring = "";
- for(new count =0;count < 11;count++)
- {
- format(savestringname,sizeof(savestringname),"slotstate[%i]",count);
- slotstate[count] = dini_Int(objectsfilename,savestringname);
- if((slotstate[count])==1)
- {
- format(savestringname,sizeof(savestringname),"slotstring[%i]",count);
- format(slotstring[count],sizeof(slotstring), "%s",dini_Get(objectsfilename,savestringname));
- format(savestringname,sizeof(savestringname),"slotobjectid[%i]",count);
- slotobjectid[count] = dini_Int(objectsfilename,savestringname);
- }
- else if((slotstate[count])==0)
- {
- format(slotstring[count],sizeof(slotstring),"Empty");
- slotobjectid[count] =0;
- }
- format(string,sizeof(string),"%s",favoritedialogstring);
- format(favoritedialogstring,sizeof(favoritedialogstring),"%s\n%s",string,slotstring[count]);
- }
- if(listitem ==0)
- {
- ShowPlayerDialog(playerid,DIALOG_FAVORITEADD,DIALOG_STYLE_LIST,"Add favorite object",favoritedialogstring,"Ok","back");
- }
- else if(listitem ==1)
- {
- ShowPlayerDialog(playerid,DIALOG_FAVORITEDELETE,DIALOG_STYLE_LIST,"Delete favorite object",favoritedialogstring,"Ok","back");
- }
- else if(listitem ==2)
- {
- ShowPlayerDialog(playerid,DIALOG_FAVORITEINPORT,DIALOG_STYLE_LIST,"Inport favorite object",favoritedialogstring,"Ok","back");
- }
- }
- else
- {
- 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");
- }
- }
- else if(dialogid == DIALOG_FAVORITEADD)
- {
- if(response)
- {
- if(IsPlayerAdmince(playerid,4))
- {
- if((slotstate[listitem])==0)
- {
- listitempicked[playerid] = listitem;
- ShowPlayerDialog(playerid,DIALOG_FAVORITEINPUTOBJECTID,DIALOG_STYLE_INPUT,"Input object id","Please insert the object id you would like to save","Ok","Back");
- }
- else
- {
- 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");
- }
- }
- else
- {
- 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");
- }
- }
- else
- {
- ShowPlayerDialog(playerid,DIALOG_FAVORITEADDDELETE,DIALOG_STYLE_LIST,"Delete&Add","Addobject\nDeleteobject\nInport object to game","Ok","Back");
- }
- }
- else if(dialogid == DIALOG_FAVORITEDELETE)
- {
- if(response)
- {
- if(IsPlayerAdmince(playerid,4))
- {
- if((slotstate[listitem]) ==1)
- {
- format(slotstring[listitem],sizeof(slotstring),"Empty");
- dini_Set(objectsfilename, string,(""));
- format(string,sizeof(string),"slotobjectid[%i]",listitem);
- slotobjectid[listitem] = 0;
- dini_IntSet(objectsfilename, string,(slotobjectid[listitem]));
- slotstate[listitem] = 0;
- format(string,sizeof(string),"slotstate[%i]",listitem);
- dini_IntSet(objectsfilename, string, (slotstate[listitem]));
- }
- else
- {
- ShowPlayerDialog(playerid,DIALOG_NOT,DIALOG_STYLE_MSGBOX,"ERROR","ERROR this box does not contain and object in it","back","close");
- }
- }
- else
- {
- 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");
- }
- }
- else
- {
- ShowPlayerDialog(playerid,DIALOG_FAVORITEADDDELETE,DIALOG_STYLE_LIST,"Delete&Add","Addobject\nDeleteobject\nInport object to game","Ok","Back");
- }
- }
- else if(dialogid == DIALOG_FAVORITEINPORT)
- {
- if(response)
- {
- if((slotstate[listitem]) ==1)
- {
- playerpick[playerid]=1;
- format(objectstring[objectindex[playerid]],128,"%s",slotstring[listitem]);
- jbobjectid[objectindex[playerid]]= slotobjectid[listitem];
- }
- else
- {
- ShowPlayerDialog(playerid,DIALOG_NOT,DIALOG_STYLE_MSGBOX,"ERROR","ERROR you must have and object in the box inorder to spawn it","back","close");
- }
- }
- else
- {
- ShowPlayerDialog(playerid,DIALOG_FAVORITEADDDELETE,DIALOG_STYLE_LIST,"Delete&Add","Addobject\nDeleteobject\nInport object to game","Ok","Back");
- }
- }
- else if(dialogid == DIALOG_NOT)
- {
- if(response)
- {
- ShowPlayerDialog(playerid,DIALOG_FAVORITEADDDELETE,DIALOG_STYLE_LIST,"Delete&Add","Addobject\nDeleteobject\nInport object to game","Ok","Back");
- }
- else
- {
- SendClientMessage(playerid, RED, "You have closed the diolog boxes");
- }
- }
- else if(dialogid == DIALOG_FAVORITEINPUTOBJECTID)
- {
- if(response)
- {
- slotobjectid[listitempicked[playerid]] = strval(inputtext);
- ShowPlayerDialog(playerid,DIALOG_FAVORITEINPUTSTRING,DIALOG_STYLE_INPUT,"Input object name","Please enter the name of the object you would like to save","Ok","Back");
- }
- else
- {
- slotobjectid[listitempicked[playerid]] = 0;
- ShowPlayerDialog(playerid,DIALOG_FAVORITEADDDELETE,DIALOG_STYLE_LIST,"Delete&Add","Addobject\nDeleteobject\nInport object to game","Ok","Back");
- }
- }
- else if(dialogid == DIALOG_FAVORITEINPUTSTRING)
- {
- if(response)
- {
- format(slotstring[listitempicked[playerid]],sizeof(listitempicked),"%s",inputtext);
- format(string,sizeof(string),"slotstring[%i]",listitempicked[playerid]);
- dini_Set(objectsfilename, string,(slotstring[listitempicked[playerid]]));
- format(string,sizeof(string),"slotobjectid[%i]",listitempicked[playerid]);
- dini_IntSet(objectsfilename, string,(slotobjectid[listitempicked[playerid]]));
- slotstate[listitempicked[playerid]] = 1;
- format(string,sizeof(string),"slotstate[%i]",listitempicked[playerid]);
- dini_IntSet(objectsfilename, string, (slotstate[listitempicked[playerid]]));
- listitempicked[playerid] = 0;
- }
- else
- {
- ShowPlayerDialog(playerid,DIALOG_FAVORITEADDDELETE,DIALOG_STYLE_LIST,"Delete&Add","Addobject\nDeleteobject\nInport object to game","Ok","Back");
- }
- }
- if((playerpick[playerid])==1)
- {
- if((mapplayereditstate[playerid])==1)
- {
- new playerfilename[128];
- new slotid = mapplayerslotid[playerid];
- playerpick[playerid]=0;
- mapobjectmid[slotid][objectindex[playerid]] = jbobjectid[objectindex[playerid]];
- jbobjectid[objectindex[playerid]] = 0;
- format(playerfilename,sizeof(playerfilename),"%s",mapname[slotid]);
- GetPlayerPos(playerid,playermapx[slotid][objectindex[playerid]],playermapy[slotid][objectindex[playerid]],playermapz[slotid][objectindex[playerid]]);
- mapobject[slotid][objectindex[playerid]] = CreateDynamicObject(mapobjectmid[slotid][objectindex[playerid]],playermapx[slotid][objectindex[playerid]],playermapy[slotid][objectindex[playerid]],playermapz[slotid][objectindex[playerid]],playermapxrot[slotid][objectindex[playerid]],playermapyrot[slotid][objectindex[playerid]],playermapzrot[slotid][objectindex[playerid]]);
- SendClientMessage(playerid, LIGHTBLUE, "You have created an object");
- mapobjectstate[slotid][objectindex[playerid]] = 1;
- format(savestringname,sizeof(savestringname),"mapobjectstring[%i]",objectindex[playerid]);
- new mapstring[128];
- format(mapstring,sizeof(mapstring),"%s",objectstring[objectindex[playerid]]);
- format(objectstring[objectindex[playerid]],sizeof(objectstring),"");
- for(new i;i < MAX_PLAYERS;i++)
- {
- if((showlabel[i])==1)
- {
- format(string,sizeof(string),"object:%s--ID:Objectid-%i-%i-Mid:%i-mapname:%s",mapstring,objectindex[playerid],slotid,mapobjectmid[slotid][objectindex[playerid]],mapname[slotid]);
- mapobjectlabel[slotid][objectindex[playerid]] = CreatePlayer3DTextLabel(i,string,COLOR,playermapx[slotid][objectindex[playerid]],playermapy[slotid][objectindex[playerid]],playermapz[slotid][objectindex[playerid]],DISTANCELABEL,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0);
- }
- }
- format(savestringname,sizeof(savestringname),"playermapx[%i]",objectindex[playerid]);
- dini_FloatSet(playerfilename,savestringname,(playermapx[slotid][objectindex[playerid]]));
- format(savestringname,sizeof(savestringname),"playermapy[%i]",objectindex[playerid]);
- dini_FloatSet(playerfilename,savestringname,(playermapy[slotid][objectindex[playerid]]));
- format(savestringname,sizeof(savestringname),"playermapz[%i]",objectindex[playerid]);
- dini_FloatSet(playerfilename,savestringname,(playermapz[slotid][objectindex[playerid]]));
- format(savestringname,sizeof(savestringname),"playermapxrot[%i]",objectindex[playerid]);
- dini_FloatSet(playerfilename,savestringname,(playermapxrot[slotid][objectindex[playerid]]));
- format(savestringname,sizeof(savestringname),"playermapyrot[%i]",objectindex[playerid]);
- dini_FloatSet(playerfilename,savestringname,(playermapyrot[slotid][objectindex[playerid]]));
- format(savestringname,sizeof(savestringname),"playermapzrot[%i]",objectindex[playerid]);
- dini_FloatSet(playerfilename,savestringname,(playermapzrot[slotid][objectindex[playerid]]));
- format(savestringname,sizeof(savestringname),"mapobjectstring[%i]",objectindex[playerid]);
- dini_Set(playerfilename,savestringname,(mapstring));
- format(savestringname,sizeof(savestringname),"mapobjectmid[%i]",objectindex[playerid]);
- dini_IntSet(playerfilename,savestringname,(mapobjectmid[slotid][objectindex[playerid]]));
- format(savestringname,sizeof(savestringname),"mapobjectstate[%i]",objectindex[playerid]);
- dini_IntSet(playerfilename,savestringname,(mapobjectstate[slotid][objectindex[playerid]]));
- if((allowence[0][playerid])==1)
- {
- if((playersinput)==1)
- {
- for(new count=0;count < MAX_PLAYERS;count++)
- {
- if(IsPlayerConnected(count))
- {
- if(IsPlayerAdmince(count,3))
- {
- new name[128];
- GetPlayerName(playerid,name,sizeof(name));
- format(string,128,"%s has addobject id:%i-%i. The objectid of this is %i. mapname: %s",name,objectindex[playerid],slotid,mapobjectmid[slotid][objectindex[playerid]],mapname[slotid]);
- SendClientMessage(count,DARKBLUE,string);
- }
- }
- }
- }
- }
- return 1;
- }
- playerpick[playerid]=0;
- objectcolor[objectindex[playerid]] = 0;
- objectstate[objectindex[playerid]] = 1;
- GetPlayerPos(playerid,objx[objectindex[playerid]],objy[objectindex[playerid]],objz[objectindex[playerid]]);
- objx[objectindex[playerid]] = objx[objectindex[playerid]]+5;
- objects[objectindex[playerid]] = CreateDynamicObject(jbobjectid[objectindex[playerid]],objx[objectindex[playerid]],objy[objectindex[playerid]],objz[objectindex[playerid]],objxrot[objectindex[playerid]],objyrot[objectindex[playerid]],objzrot[objectindex[playerid]],0);
- format(savestringname,sizeof(savestringname),"objx[%i]",objectindex[playerid]);
- dini_FloatSet(objectsfilename,savestringname,(objx[objectindex[playerid]]));
- format(savestringname,sizeof(savestringname),"objy[%i]",objectindex[playerid]);
- dini_FloatSet(objectsfilename,savestringname,(objy[objectindex[playerid]]));
- format(savestringname,sizeof(savestringname),"objz[%i]",objectindex[playerid]);
- dini_FloatSet(objectsfilename,savestringname,(objz[objectindex[playerid]]));
- format(savestringname,sizeof(savestringname),"objxrot[%i]",objectindex[playerid]);
- dini_FloatSet(objectsfilename,savestringname,(objxrot[objectindex[playerid]]));
- format(savestringname,sizeof(savestringname),"objyrot[%i]",objectindex[playerid]);
- dini_FloatSet(objectsfilename,savestringname,(objyrot[objectindex[playerid]]));
- format(savestringname,sizeof(savestringname),"objzrot[%i]",objectindex[playerid]);
- dini_FloatSet(objectsfilename,savestringname,(objzrot[objectindex[playerid]]));
- format(savestringname,sizeof(savestringname),"object[%i]",objectindex[playerid]);
- dini_IntSet(objectsfilename,savestringname,(jbobjectid[objectindex[playerid]]));
- format(savestringname,sizeof(savestringname),"objectcolor[%i]",objectindex[playerid]);
- dini_IntSet(objectsfilename,savestringname,(objectcolor[objectindex[playerid]]));
- format(savestringname,sizeof(savestringname),"objectlabel[%i]",objectindex[playerid]);
- dini_Set(objectsfilename,savestringname,(objectstring[objectindex[playerid]]));
- format(savestringname,sizeof(savestringname),"objectstate[%i]",objectindex[playerid]);
- dini_IntSet(objectsfilename,savestringname,(objectstate[objectindex[playerid]]));
- for(new i; i < MAX_PLAYERS;i++)
- {
- if(IsPlayerConnected(i))
- {
- if((showlabel[i])==1)
- {
- format(string,128,"object:%s--ID:%i-Objectid-%i",objectstring[objectindex[playerid]],objectindex[playerid],jbobjectid[objectindex[playerid]]);
- objectlabel[objectindex[playerid]] = CreatePlayer3DTextLabel(i,string,COLOR,objx[objectindex[playerid]],objy[objectindex[playerid]],objz[objectindex[playerid]],DISTANCELABEL,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,0);
- }
- }
- }
- if((allowence[0][playerid])==1)
- {
- if((playersinput)==1)
- {
- for(new count=0;count < MAX_PLAYERS;count++)
- {
- if(IsPlayerConnected(count))
- {
- if(IsPlayerAdmince(count,3))
- {
- new name[128];
- GetPlayerName(playerid,name,sizeof(name));
- format(string,128,"%s has addobject id:%i. The objectid of this is %i.",name,objectindex[playerid],jbobjectid[playerid]);
- SendClientMessage(count,DARKBLUE,string);
- }
- }
- }
- }
- }
- }
- return 0;
- }
- CloseMap(playerid)
- {
- new slotid = mapplayerslotid[playerid];
- for(new count;count < MAX_OBJECTS;count++)
- {
- if((mapobjectstate[slotid][count])==1)
- {
- DestroyDynamicObject(mapobject[slotid][count]);
- for(new i;i < MAX_PLAYERS;i++)
- {
- if(IsPlayerConnected(i))
- {
- DeletePlayer3DTextLabel(i, mapobjectlabel[slotid][count]);
- }
- }
- mapobjectmid[slotid][count] = 0;
- playermapx[slotid][count] = 0;
- playermapy[slotid][count] = 0;
- playermapz[slotid][count] = 0;
- playermapxrot[slotid][count] = 0;
- playermapyrot[slotid][count] = 0;
- playermapzrot[slotid][count] = 0;
- mapobjectstate[slotid][count] = 0;
- }
- }
- mapplayereditstate[playerid] = 0;
- mapplayerslot[slotid] = 0;
- mapplayereditingname[slotid] = "";
- viewselected[playerid] =0;
- format(mapname[slotid],sizeof(mapname),"");
- mapplayerslotid[playerid] = 0;
- }
- stock IsPlayerAdmince(playerid,level)
- {
- if(IsPlayerAdmin(playerid)||CustomAdmin(playerid,level))
- {
- return true;
- }
- else
- {
- return false;
- }
- }
- stock CustomAdmin(playerid,level)
- {
- return CallLocalFunction("InputAdminSystem","ii",playerid,level);
- }
Add Comment
Please, Sign In to add comment