Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- new sendername[MAX_PLAYER_NAME];
- new string[128];
- if(dialogid == DIALOG_RADIO)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0: CallRemoteFunction("OnPlayerCommandText", "is", playerid, "/radiowish");
- case 1: CallRemoteFunction("OnPlayerCommandText", "is", playerid, "/radiohit");
- case 2: CallRemoteFunction("OnPlayerCommandText", "is", playerid, "/contactfm");
- case 3: CallRemoteFunction("OnPlayerCommandText", "is", playerid, "/romanianhiphop");
- case 4: CallRemoteFunction("OnPlayerCommandText", "is", playerid, "/romanianmanele");
- case 5: CallRemoteFunction("OnPlayerCommandText", "is", playerid, "/romanianpopular");
- case 6: CallRemoteFunction("OnPlayerCommandText", "is", playerid, "/profm");
- case 7: CallRemoteFunction("OnPlayerCommandText", "is", playerid, "/gmusic");
- case 8: CallRemoteFunction("OnPlayerCommandText", "is", playerid, "/radiotube");
- case 9: CallRemoteFunction("OnPlayerCommandText", "is", playerid, "/radiomafia");
- case 10: CallRemoteFunction("OnPlayerCommandText", "is", playerid, "/greudedifuzat");
- case 11: CallRemoteFunction("OnPlayerCommandText", "is", playerid, "/stopradio");
- }
- }
- return 1;
- }
- if(dialogid == 1212)
- {
- if(response)
- {
- ShowPlayerDialog(playerid,1216,DIALOG_STYLE_MSGBOX,"Atentie!","{FFFF00}Trebuie sa conduci mereu pe partea dreapta!\nSingura data cand poti conduce pe partea stanga este atunci cand drumul este blocat \nNu trebuie sa stai la semafoare,deoarecere ar dura prea mult \nNu ai voie sa conduci cu viteza foarte mare,poti primi amenda pentru asa ceva sau carnetul iti poate fi confiscat!","Continua","");
- }
- }
- if(dialogid == 1213)
- {
- if(response)
- {
- ShowPlayerDialog(playerid,1214,DIALOG_STYLE_LIST,"Ce trebuie sa faci daca un politist vrea sa te opreasca?","Fug si le arat semne obscene\nOpresc si arat permisul de conducere\nAccelerez mai mult\nOpresc ii injur si apoi fug","Select","");
- }
- }
- if(dialogid == 1216)
- {
- if(response)
- {
- ShowPlayerDialog(playerid,1217,DIALOG_STYLE_MSGBOX,"Atentie!","{FFFF00}Trebuie sa tragi pe dreapta daca o masina de politie ti-o cere\nDeasemenea,trebuie sa tragi pe dreapta daca o masina de politie trece cu girofarele pornite\nNu folosi nitro daca nu ai acordul unui politist\nTine minte: Pentru curse ilegale poti fi arestat iar masina iti va fi confiscata","Continua","");
- }
- }
- if(dialogid == 1217)
- {
- if(response)
- {
- ShowPlayerDialog(playerid,1218,DIALOG_STYLE_MSGBOX,"Atentie!","{FFFF00}Daca cineva iti fura masina foloseste /call 911\nDeasemenea,daca esti martorul unui accident si victimele sunt prea ranite sa o faca,suna medicii\nNu ai voie sa opresti in mijlocul strazii\n\n\n{FF0000}Acesta a fost tutorialul!\nAcum urmeaza testul!","Continua","");
- }
- }
- if(dialogid == 1218)
- {
- if(response)
- {
- ShowPlayerDialog(playerid,1214,DIALOG_STYLE_LIST,"Ce trebuie sa faci daca un politist vrea sa te opreasca?","Fug si le arat semne obscene\nOpresc si arat permisul de conducere\nAccelerez mai mult\nOpresc ii injur si apoi fug","Select","");
- }
- }
- if(dialogid == 50)
- {
- if(response)
- {
- if(listitem == 0)
- {
- PlayerInfo[playerid][pSex] = 1;
- SendClientMessage(playerid,COLOR_YELLOW,"OK,Deci esti baiat");
- ShowPlayerDialog(playerid,51,DIALOG_STYLE_LIST,"Alege unde vrei sa fi spawnat","LosSantos \nLasVenturas","Select","");
- }
- else if(listitem == 1)
- {
- PlayerInfo[playerid][pSex] = 2;
- SendClientMessage(playerid,COLOR_YELLOW,"OK,Deci esti fata");
- ShowPlayerDialog(playerid,51,DIALOG_STYLE_LIST,"Alege unde vrei sa fi spawnat","LosSantos \nLasVenturas","Select","");
- }
- }
- }
- if(dialogid == 51)
- {
- if(response)
- {
- if(listitem == 0)
- {
- PlayerInfo[playerid][pOrigin] = 1;//LS
- SendClientMessage(playerid,COLOR_YELLOW,"OK,Deci vei fi spawnat in LS");
- //SpawnPlayer(playerid);
- ShowPlayerDialog(playerid,52,DIALOG_STYLE_INPUT,"Varsta","Scrie ce varsta ai!","OK","");
- }
- else if(listitem == 1)
- {
- PlayerInfo[playerid][pOrigin] = 2;//LV
- SendClientMessage(playerid,COLOR_YELLOW,"OK,Deci vei fi spawnat in LV");
- //SpawnPlayer(playerid);
- ShowPlayerDialog(playerid,52,DIALOG_STYLE_INPUT,"Varsta","Scrie ce varsta ai!","OK","");
- }
- }
- }
- if(dialogid == 52)
- {
- if(response)
- {
- new varsta = strval(inputtext);
- if(varsta >5 && varsta<90)
- {
- format(string,256,"Deci ai %d ani",varsta);
- SendClientMessage(playerid,COLOR_GRAD1,string);
- PlayerInfo[playerid][pAge] = varsta;
- RegistrationStep[playerid] = 0;
- TutTime[playerid] = 1;
- OnPlayerUpdateEx(playerid);
- }
- else return ShowPlayerDialog(playerid,52,DIALOG_STYLE_INPUT,"Varsta","Scrie ce varsta ai!","OK","");
- }
- }
- if(response)
- {
- if(dialogid == 12346 || dialogid == 12347)
- {
- if(strlen(inputtext))
- {
- new tmppass[64];
- strmid(tmppass, inputtext, 0, strlen(inputtext), 255);
- //Encrypt(tmppass);
- OnPlayerLogin(playerid,tmppass);
- }
- else
- {
- new loginstring[128];
- new loginname[64];
- GetPlayerName(playerid,loginname,sizeof(loginname));
- format(loginstring,sizeof(loginstring),"WRONG PASSWORD\nPlease enter the correct password:",loginname);
- ShowPlayerDialog(playerid,12347,DIALOG_STYLE_PASSWORD,"Login",loginstring,"Login","Exit");
- gPlayerLogTries[playerid] += 1;
- if(gPlayerLogTries[playerid] == 5) { Ban(playerid); }
- }
- }
- if(dialogid == 171)
- {
- if(response)
- {
- new Float:x,Float:y,Float:z,Float:ang;
- new idcar = GetPlayerVehicleID(playerid);
- SetVehicleNumberPlate(GetPlayerVehicleID(playerid), inputtext);
- GetVehiclePos(GetPlayerVehicleID(playerid),x,y,z);
- GetVehicleZAngle(GetPlayerVehicleID(playerid),ang);
- SetVehicleToRespawn(GetPlayerVehicleID(playerid));
- SetVehiclePos(GetPlayerVehicleID(playerid),x,y,z);
- SetVehicleZAngle(GetPlayerVehicleID(playerid),ang);
- strmid(CarInfo[idcar][cLicense], inputtext, 0, strlen(inputtext), 999);
- SaveCarCoords();
- OnPropUpdate();
- }
- }
- //==========================================[Savecar]=====================================================
- if(dialogid == 1300)
- {
- if(response)
- {
- new car = GetPlayerVehicleID(playerid);
- if(listitem == 0)
- {
- new Float:X,Float:Y,Float:Z,Float:A;
- GetVehiclePos(car,X,Y,Z);
- GetVehicleZAngle(car, A);
- CarInfo[car][cLocationx] = X;
- CarInfo[car][cLocationy] = Y;
- CarInfo[car][cLocationz] = Z;
- CarInfo[car][cAngle] = A;
- format(string, sizeof(string), "~n~ You have parked your vehicle in this location. ~n~");
- GameTextForPlayer(playerid, "You have parked your vehicle in this position. It will respawn here.", 10000, 3);
- }
- else if(listitem == 1)
- {
- new list[] = "Spoiler \n Hood \n Roof \n Sideskirt \n Lamps \n Nitro \n Exhaust \n Wheels \n Stereo \n Hydraulics \n Front Bumper \n Rear Bumper \n Vent Right \n Vent Left";
- ShowPlayerDialog(playerid, 1301,DIALOG_STYLE_LIST,"Select the Modification",list,"Ok","");
- }
- else if(listitem == 2)
- {
- SaveVehicleComponents(car);
- SendClientMessage(playerid, COLOR_GREY,"* All the modifications on the car were saved!");
- }
- else if(listitem == 3)
- {
- new list[] = "Spoiler \n Hood \n Roof \n Sideskirt \n Lamps \n Nitro \n Exhaust \n Wheels \n Stereo \n Hydraulics \n Front Bumper \n Rear Bumper \n Vent Right \n Vent Left";
- ShowPlayerDialog(playerid, 1302,DIALOG_STYLE_LIST,"Select the Modification",list,"Ok","");
- }
- else if(listitem == 4)
- {
- ClearVehicleComponents(car);
- SendClientMessage(playerid, COLOR_GREY,"* All the modifications on the car were saved!");
- }
- }
- }
- if(dialogid == 1301)
- {
- if(response)
- {
- new car = GetPlayerVehicleID(playerid);
- if(listitem == 0)
- {
- new component2 = GetVehicleComponentInSlot(car, 0);
- new component = CarInfo[car][cComponent0];
- if(component2 != 0)
- {
- if(component == 0)
- {
- CarInfo[car][cComponent0] = component2;
- SendClientMessage(playerid, COLOR_GREY,"* You have Saved your Spoiler");
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You have already an spoiler, use the Clear option first!");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You don't have an Spoiler to Save!");
- return 1;
- }
- }
- if(listitem == 1)
- {
- new component2 = GetVehicleComponentInSlot(car, 1);
- new component = CarInfo[car][cComponent1];
- if(component2 != 0)
- {
- if(component == 0)
- {
- CarInfo[car][cComponent1] = component2;
- SendClientMessage(playerid, COLOR_GREY,"* You have Saved your Hood");
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You have already a hood, use the Clear option first!");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You don't have a hood to Save!");
- return 1;
- }
- }
- if(listitem == 2)
- {
- new component2 = GetVehicleComponentInSlot(car, 2);
- new component = CarInfo[car][cComponent2];
- if(component2 != 0)
- {
- if(component == 0)
- {
- CarInfo[car][cComponent2] = component2;
- SendClientMessage(playerid, COLOR_GREY,"* You have Saved your Roof");
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You have already a roof, use the Clear option first!");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You don't have a Roof to Save!");
- return 1;
- }
- }
- if(listitem == 3)
- {
- new component2 = GetVehicleComponentInSlot(car, 3);
- new component = CarInfo[car][cComponent3];
- if(component2 != 0)
- {
- if(component == 0)
- {
- CarInfo[car][cComponent0] = component2;
- SendClientMessage(playerid, COLOR_GREY,"* You have Saved your Sideskirt");
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You have already an Sideskirt, use the Clear option first!");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You don't have a Sideskirt to Save!");
- return 1;
- }
- }
- if(listitem == 4)
- {
- new component2 = GetVehicleComponentInSlot(car, 4);
- new component = CarInfo[car][cComponent4];
- if(component2 != 0)
- {
- if(component == 0)
- {
- CarInfo[car][cComponent4] = component2;
- SendClientMessage(playerid, COLOR_GREY,"* You have Saved your Lamps");
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You have already Lamps, use the Clear option first!");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You don't have Lamps to Save!");
- return 1;
- }
- }
- if(listitem == 5)
- {
- new component2 = GetVehicleComponentInSlot(car, 5);
- new component = CarInfo[car][cComponent5];
- if(component2 != 0)
- {
- if(component == 0)
- {
- CarInfo[car][cComponent5] = component2;
- SendClientMessage(playerid, COLOR_GREY,"* You have Saved your Nitro");
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You have already a Nitro, use the Clear option first!");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You don't have Nitro to Save!");
- return 1;
- }
- }
- if(listitem == 6)
- {
- new component2 = GetVehicleComponentInSlot(car, 6);
- new component = CarInfo[car][cComponent6];
- if(component2 != 0)
- {
- if(component == 0)
- {
- CarInfo[car][cComponent6] = component2;
- SendClientMessage(playerid, COLOR_GREY,"* You have Saved your Exhausts");
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You have already an exhausts, use the Clear option first!");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You don't have Exhausts to Save!");
- return 1;
- }
- }
- if(listitem == 7)
- {
- new component2 = GetVehicleComponentInSlot(car, 7);
- new component = CarInfo[car][cComponent7];
- if(component2 != 0)
- {
- if(component == 0)
- {
- CarInfo[car][cComponent7] = component2;
- SendClientMessage(playerid, COLOR_GREY,"* You have Saved your Wheels");
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You have already Wheels, use the Clear option first!");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You don't have Wheels to Save!");
- return 1;
- }
- }
- if(listitem == 8)
- {
- new component2 = GetVehicleComponentInSlot(car, 8);
- new component = CarInfo[car][cComponent8];
- if(component2 != 0)
- {
- if(component == 0)
- {
- CarInfo[car][cComponent8] = component2;
- SendClientMessage(playerid, COLOR_GREY,"* You have Saved your Stereo");
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You have already an Stereo, use the Clear option first!");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You don't have a Stereo to Save!");
- return 1;
- }
- }
- if(listitem == 9)
- {
- new component2 = GetVehicleComponentInSlot(car, 9);
- new component = CarInfo[car][cComponent9];
- if(component2 != 0)
- {
- if(component == 0)
- {
- CarInfo[car][cComponent9] = component2;
- SendClientMessage(playerid, COLOR_GREY,"* You have Saved your Hydraulics");
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You have already Hydraulics, use the Clear option first!");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You don't have Hydraulics to Save!");
- return 1;
- }
- }
- if(listitem == 10)
- {
- new component2 = GetVehicleComponentInSlot(car, 10);
- new component = CarInfo[car][cComponent10];
- if(component2 != 0)
- {
- if(component == 0)
- {
- CarInfo[car][cComponent10] = component2;
- SendClientMessage(playerid, COLOR_GREY,"* You have Saved your Front Bumper");
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You have already a Front Bumper, use the Clear option first!");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You don't have a Front Bumper to Save!");
- return 1;
- }
- }
- if(listitem == 11)
- {
- new component2 = GetVehicleComponentInSlot(car, 11);
- new component = CarInfo[car][cComponent11];
- if(component2 != 0)
- {
- if(component == 0)
- {
- CarInfo[car][cComponent11] = component2;
- SendClientMessage(playerid, COLOR_GREY,"* You have Saved your Rear Bumper");
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You have already a Rear Bumper, use the Clear option first!");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You don't have a Rear Bumper to Save!");
- return 1;
- }
- }
- if(listitem == 12)
- {
- new component2 = GetVehicleComponentInSlot(car, 12);
- new component = CarInfo[car][cComponent12];
- if(component2 != 0)
- {
- if(component == 0)
- {
- CarInfo[car][cComponent12] = component2;
- SendClientMessage(playerid, COLOR_GREY,"* You have Saved your Right Vent");
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You have already a Right Vent, use the Clear option first!");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You don't have a Right Vent to Save!");
- return 1;
- }
- }
- if(listitem == 13)
- {
- new component2 = GetVehicleComponentInSlot(car, 13);
- new component = CarInfo[car][cComponent13];
- if(component2 != 0)
- {
- if(component == 0)
- {
- CarInfo[car][cComponent13] = component2;
- SendClientMessage(playerid, COLOR_GREY,"* You have Saved your Left vent");
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You have already a Left Vent, use the Clear option first!");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You don't have a Left Vent to Save!");
- return 1;
- }
- }
- }
- }
- if(dialogid == 1302)
- {
- if(response)
- {
- new car = GetPlayerVehicleID(playerid);
- if(listitem == 0)
- {
- new component2 = GetVehicleComponentInSlot(car, 0);
- new component = CarInfo[car][cComponent0];
- if(component2 != 0)
- {
- if(component != 0)
- {
- CarInfo[car][cComponent0] = 0;
- SendClientMessage(playerid, COLOR_GREY,"* You have Cleared your Spoiler");
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You don't have an spoiler, use the Save option first!");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You don't have a Spoiler to Clear!");
- return 1;
- }
- }
- if(listitem == 1)
- {
- new component2 = GetVehicleComponentInSlot(car, 1);
- new component = CarInfo[car][cComponent1];
- if(component2 != 0)
- {
- if(component != 0)
- {
- CarInfo[car][cComponent1] = 0;
- SendClientMessage(playerid, COLOR_GREY,"* You have Cleared your Hood");
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You don't have a Hood, use the Save option first!");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You don't have a Hood to Clear!");
- return 1;
- }
- }
- if(listitem == 2)
- {
- new component2 = GetVehicleComponentInSlot(car, 2);
- new component = CarInfo[car][cComponent2];
- if(component2 != 0)
- {
- if(component != 0)
- {
- CarInfo[car][cComponent2] = 0;
- SendClientMessage(playerid, COLOR_GREY,"* You have Cleared your Roof");
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You don't have a roof, use the Save option first!");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You don't have a Roof to Clear!");
- return 1;
- }
- }
- if(listitem == 3)
- {
- new component2 = GetVehicleComponentInSlot(car, 3);
- new component = CarInfo[car][cComponent3];
- if(component2 != 0)
- {
- if(component != 0)
- {
- CarInfo[car][cComponent0] = 0;
- SendClientMessage(playerid, COLOR_GREY,"* You have Cleared your Sideskirt");
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You don't have a Sideskirt, use the Save option first!");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You don't have a Sideskirt to Clear!");
- return 1;
- }
- }
- if(listitem == 4)
- {
- new component2 = GetVehicleComponentInSlot(car, 4);
- new component = CarInfo[car][cComponent4];
- if(component2 != 0)
- {
- if(component != 0)
- {
- CarInfo[car][cComponent4] = 0;
- SendClientMessage(playerid, COLOR_GREY,"* You have Cleared your Lamps");
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You don't have Lamps, use the Save option first!");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You don't have Lamps to Clear!");
- return 1;
- }
- }
- if(listitem == 5)
- {
- new component2 = GetVehicleComponentInSlot(car, 5);
- new component = CarInfo[car][cComponent5];
- if(component2 != 0)
- {
- if(component != 0)
- {
- CarInfo[car][cComponent5] = 0;
- SendClientMessage(playerid, COLOR_GREY,"* You have Cleared your Nitro");
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You don't have Nitro, use the Save option first!");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You don't have Nitro to Clear!");
- return 1;
- }
- }
- if(listitem == 6)
- {
- new component2 = GetVehicleComponentInSlot(car, 6);
- new component = CarInfo[car][cComponent6];
- if(component2 != 0)
- {
- if(component != 0)
- {
- CarInfo[car][cComponent6] = 0;
- SendClientMessage(playerid, COLOR_GREY,"* You have Cleared your Exhaust");
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You don't have an Exhaust, use the Save option first!");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You don't have Exhausts to Clear!");
- return 1;
- }
- }
- if(listitem == 7)
- {
- new component2 = GetVehicleComponentInSlot(car, 7);
- new component = CarInfo[car][cComponent7];
- if(component2 != 0)
- {
- if(component != 0)
- {
- CarInfo[car][cComponent7] = 0;
- SendClientMessage(playerid, COLOR_GREY,"* You have Cleared your Wheels");
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You don't have Wheels, use the Save option first!");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You don't have Wheels to Clear!");
- return 1;
- }
- }
- if(listitem == 8)
- {
- new component2 = GetVehicleComponentInSlot(car, 8);
- new component = CarInfo[car][cComponent8];
- if(component2 != 0)
- {
- if(component != 0)
- {
- CarInfo[car][cComponent8] = 0;
- SendClientMessage(playerid, COLOR_GREY,"* You have Cleared your Stereo");
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You don't have an Stereo, use the Save option first!");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You don't have a Stereo to Clear!");
- return 1;
- }
- }
- if(listitem == 9)
- {
- new component2 = GetVehicleComponentInSlot(car, 9);
- new component = CarInfo[car][cComponent9];
- if(component2 != 0)
- {
- if(component != 0)
- {
- CarInfo[car][cComponent9] = 0;
- SendClientMessage(playerid, COLOR_GREY,"* You have Cleared your Hydraulics");
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You don't have Hydraulics, use the Save option first!");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You don't have Hydraulics to Clear!");
- return 1;
- }
- }
- if(listitem == 10)
- {
- new component2 = GetVehicleComponentInSlot(car, 10);
- new component = CarInfo[car][cComponent10];
- if(component2 != 0)
- {
- if(component != 0)
- {
- CarInfo[car][cComponent10] = 0;
- SendClientMessage(playerid, COLOR_GREY,"* You have Cleared your Front Bumper");
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You don't have a front Bumper, use the Save option first!");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You don't have a Front Bumper to Clear!");
- return 1;
- }
- }
- if(listitem == 11)
- {
- new component2 = GetVehicleComponentInSlot(car, 11);
- new component = CarInfo[car][cComponent11];
- if(component2 != 0)
- {
- if(component != 0)
- {
- CarInfo[car][cComponent11] = 0;
- SendClientMessage(playerid, COLOR_GREY,"* You have Cleared your Rear Bumper");
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You don't have a rear bumper, use the Save option first!");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You don't have a Rear Bumper to Clear!");
- return 1;
- }
- }
- if(listitem == 12)
- {
- new component2 = GetVehicleComponentInSlot(car, 12);
- new component = CarInfo[car][cComponent12];
- if(component2 != 0)
- {
- if(component != 0)
- {
- CarInfo[car][cComponent12] = 0;
- SendClientMessage(playerid, COLOR_GREY,"* You have Cleared your Right Vent");
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You don't have a Right Vent, use the Save option first!");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You don't have a Right Vent to Clear!");
- return 1;
- }
- }
- if(listitem == 13)
- {
- new component2 = GetVehicleComponentInSlot(car, 13);
- new component = CarInfo[car][cComponent13];
- if(component2 != 0)
- {
- if(component != 0)
- {
- CarInfo[car][cComponent13] = 0;
- SendClientMessage(playerid, COLOR_GREY,"* You have Cleared your Left vent");
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You don't have a LEft Vent, use the Save option first!");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY,"* You don't have a Left Vent to Clear!");
- return 1;
- }
- }
- }
- }
- //==========================================[SaveCar]========================================
- if(dialogid == 12345)
- {
- if(strlen(inputtext))
- {
- GetPlayerName(playerid, sendername, sizeof(sendername));
- format(string, sizeof(string), "users/%s.ini", sendername);
- new File: hFile = fopen(string, io_read);
- if (hFile)
- {
- SendClientMessage(playerid, COLOR_RED, "[USERS] Acest nickname este luat deja de alt player, incearca altul!");
- fclose(hFile);
- return 1;
- }
- new tmppass[64];
- strmid(tmppass, inputtext, 0, strlen(inputtext), 255);
- //Encrypt(tmppass);
- OnPlayerRegister(playerid,tmppass);
- }
- else
- {
- new regstring[128];
- new regname[64];
- GetPlayerName(playerid,regname,sizeof(regname));
- format(regstring,sizeof(regstring),"{FFFFFF}Welcome, {00bfff}%s\n{FFFFFF}You dont have an account.\nPlease register:",regname);
- ShowPlayerDialog(playerid,12345,DIALOG_STYLE_INPUT,"Register",regstring,"Register","Exit");
- }
- }
- }
- else
- {
- Kick(playerid);
- }
- if(dialogid == 668 && response)
- {
- if(!strcmp(inputtext, "Light", true))
- {
- TextDrawHideForPlayer(playerid, SunGlasses);
- TextDrawBoxColor(SunGlasses, 0x00000025);
- TextDrawShowForPlayer(playerid, SunGlasses);
- }
- if(!strcmp(inputtext, "Normal", true))
- {
- TextDrawHideForPlayer(playerid, SunGlasses);
- TextDrawBoxColor(SunGlasses, 0x00000040);
- TextDrawShowForPlayer(playerid, SunGlasses);
- }
- if(!strcmp(inputtext, "Dark", true))
- {
- TextDrawHideForPlayer(playerid, SunGlasses);
- TextDrawBoxColor(SunGlasses, 0x00000055);
- TextDrawShowForPlayer(playerid, SunGlasses);
- }
- if(!strcmp(inputtext, "Darkest", true))
- {
- TextDrawHideForPlayer(playerid, SunGlasses);
- TextDrawBoxColor(SunGlasses, 0x00000065);
- TextDrawShowForPlayer(playerid, SunGlasses);
- }
- }
- if(dialogid == DIALOG_STYLES)
- {
- if(response)
- {
- if(listitem == 0)
- {
- ShowPlayerDialog(playerid, DIALOG_STYLES+1, DIALOG_STYLE_LIST, "Fight Styles", "Elbow\nBoxe\nGrab and kick\nStreet fight\nKungFu\nNormal", "Select", "Cancel");
- }
- }
- return 1;
- }
- if(dialogid == DIALOG_STYLES+1)
- {
- if(response)
- {
- if(listitem == 0)
- {
- SetPlayerFightingStyle(playerid, FIGHT_STYLE_ELBOW);
- FightStyle[playerid] = 0;
- }
- if(listitem == 1)
- {
- SetPlayerFightingStyle(playerid, FIGHT_STYLE_BOXING);
- FightStyle[playerid] = 1;
- }
- if(listitem == 2)
- {
- SetPlayerFightingStyle(playerid, FIGHT_STYLE_GRABKICK);
- FightStyle[playerid] = 2;
- }
- if(listitem == 3)
- {
- SetPlayerFightingStyle(playerid, FIGHT_STYLE_KNEEHEAD);
- FightStyle[playerid] = 3;
- }
- if(listitem == 4)
- {
- SetPlayerFightingStyle(playerid, FIGHT_STYLE_KUNGFU);
- FightStyle[playerid] = 4;
- }
- if(listitem == 5)
- {
- SetPlayerFightingStyle(playerid, FIGHT_STYLE_NORMAL);
- FightStyle[playerid] = 5;
- }
- }
- return 1;
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement