12.12.2012, 08:40
Alguem me podia dizer se uma FS pode-se por diretamente no GM?
E se poder me podiam dizer como?
E se poder me podiam dizer como?
/*============================================================================== Striker Samp www.StrikerSamp.blogspot.com SISTEMA DE TUNNING E MOTOR CRIADO POR MIM MATTEUS_X Seja um bom menino e nгo retire os creditos, quase nгo aparecem. Scripter: Matteus_x Mapper: Joao_Lemos Faзa um bom uso e com moderaзгo . ==============================================================================*/ #include <a_samp> new motor[MAX_PLAYERS], luz[MAX_PLAYERS], capo[MAX_PLAYERS], portamalas[MAX_PLAYERS]; #define PlayerToPoint IsPlayerRangeOfPoint //==================[Dialogs]=================================================== #define DIALOGID 3300 #define nitro 1010 #define rodawire 1081 #define suspensao 1087 #define neondialog 8131 #pragma tabsize 0 #if defined FILTERSCRIPT public OnFilterScriptInit() { print("\n-------------------------------------------"); print(" Garagem de modificaзхes iniciada com sucesso"); print("-------------------------------------------\n"); return 1; } AddStaticPickup(1276, 23, 1617.7235,-1889.6929,13.5469); //Tunning Create3DTextLabel("Sistema de Tunning\n /Neon /Tunar",COR_3DLABEL,1617.7235,-1889.6929,13.5469,10.0,0); CreateObject(5774,1605.75170898,-1900.41723633,19.47380447,0.00000000,0.00000000,179.99993896); //object(garage01_lawn) (1) CreateObject(1075,1615.33496094,-1887.22460938,13.03900909,0.00000000,0.00000000,0.00000000); //object(wheel_sr2) (1) CreateObject(1073,1615.41418457,-1885.94079590,13.03900909,0.00000000,0.00000000,0.00000000); //object(wheel_sr6) (1) CreateObject(1008,1615.19299316,-1884.72973633,13.55302238,0.00000000,0.00000000,0.00000000); //object(nto_b_l) (1) CreateObject(2625,1619.63537598,-1897.43212891,13.67506313,0.00000000,0.00000000,179.99993896); //object(cj_shoe_urban2) (1) CreateObject(3096,1613.17553711,-1884.72973633,14.35956955,0.00000000,0.00000000,0.00000000); //object(bb_pickup) (1) CreateObject(1010,1621.04492188,-1892.39733887,12.54914665,0.00000000,0.00000000,0.00000000); //object(nto_b_tw) (1) CreateObject(1096,1616.48059082,-1897.37854004,14.04061985,0.00000000,0.00000000,72.00000000); //object(wheel_gn3) (1) public OnFilterScriptExit() { return 1; } #else main() { print("\n------------------------------------"); print(" Garagem de modificaзхes By: RedBulL_x"); print("------------------------------------\n"); } #endif public OnPlayerConnect(playerid) { SendClientMessage(playerid, 0xFF0019AA, "Este serve contem Sistema de Tunning e motor By:Matteus_x"); return 1; } public OnPlayerDisconnect(playerid, reason) { return 1; } public OnPlayerSpawn(playerid) { return 1; } public OnPlayerDeath(playerid, killerid, reason) { return 1; } public OnVehicleSpawn(vehicleid) { return 1; } public OnVehicleDeath(vehicleid, killerid) { return 1; } public OnPlayerText(playerid, text[]) { return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { if(!strcmp("/creditost", cmdtext, true)) { ShowPlayerDialog(playerid, 5053, DIALOG_STYLE_MSGBOX, "{FF8C00}Creditos sistema de Tunning e motor", " Este Filter Script(FS) foi Criado por Matteus_x\n\n Para uso do servidor FanatiC'S Samp.\n Postado na net por Matteus_x\n Scripter: Matteus_Fanatic e RedBulL_x \n Mapper: Joao_Lemos \nCreditos reservados a TecnoSamp\n\n\n\n\nObrigado e tenha um уtimo jogo.", "Ok", "Sair"); return 1; } if(strcmp(cmdtext, "/neon", true) == 0) { if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "Vocк precisa de um carro para colocar Neon"); if(!PlayerToPoint(25.0,playerid,1617.7235,-1889.6929,13.5469)) return SendClientMessage(playerid, -1, " Vocк nгo estб na Garagem de modificaзхes para equipar seu veiculo com neon!"); ShowPlayerDialog(playerid, neondialog, DIALOG_STYLE_LIST, "Sistema De Tunning", " Neon Azul\nNeon Vermelho\nNeon Verde\nNeon Branco\nNeon Rosa\nNeon Amarelo\nRemover neon do veiculo", "Aceitar", "Cancelar"); PlayerPlaySound(playerid, 1133, 0.0, 0.0, 10.0); return 1; } if(strcmp(cmdtext, "/tunar", true) == 0) { if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "Vocк precisa de um carro para tunar"); if(!PlayerToPoint(25.0,playerid,1617.7235,-1889.6929,13.5469)) return SendClientMessage(playerid, -1, " Vocк nгo estб na Garagem de modificaзхes para equipar seu veiculo !"); ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST, "Sistema De Tunning", "Rodas\nCores\nPaintjobs\nNitro\nSuspensгo\nAutoTuning", "Okay", "Cancelar"); PlayerPlaySound(playerid, 1133, 0.0, 0.0, 10.0); return 1; } if (strcmp("/motoron", cmdtext, true, 10) == 0) { new mot, lu, alar, por, cap, porma, ob; new carro = GetPlayerVehicleID(playerid); if(carro != INVALID_VEHICLE_ID) { if(motor[playerid] == 0) { GetVehicleParamsEx(carro, mot, lu, alar, por, cap, porma, ob); SetVehicleParamsEx(carro, VEHICLE_PARAMS_ON, lu, alar, por, cap, porma, ob); motor[playerid] = 1; SendClientMessage(playerid, 0xFFFFFFAA, "Veiculo {2F991A}Ligado!"); } } } if (strcmp("/motoroff", cmdtext, true, 10) == 0) { new mot, lu, alar, por, cap, porma, ob; new carro = GetPlayerVehicleID(playerid); if(carro != INVALID_VEHICLE_ID) { if(motor[playerid] == 1) { GetVehicleParamsEx(carro, mot, lu, alar, por, cap, porma, ob); SetVehicleParamsEx(carro, VEHICLE_PARAMS_OFF, lu, alar, por, cap, porma, ob); motor[playerid] = 0; SendClientMessage(playerid, 0xFFFFFFAA, "Veiculo {E31919}Desligado!"); } } } if (strcmp("/farolon", cmdtext, true, 10) == 0) { new mot, lu, alar, por, cap, porma, ob; new carro = GetPlayerVehicleID(playerid); if(carro != INVALID_VEHICLE_ID) { if(luz[playerid] == 0) { GetVehicleParamsEx(carro, mot, lu, alar, por, cap, porma, ob); SetVehicleParamsEx(carro, mot, VEHICLE_PARAMS_ON, alar, por, cap, porma, ob); luz[playerid] = 1; SendClientMessage(playerid, 0xFFFFFFAA, "Farol {2F991A}Ligado!"); } } } if (strcmp("/faroloff", cmdtext, true, 10) == 0) { new mot, lu, alar, por, cap, porma, ob; new carro = GetPlayerVehicleID(playerid); if(carro != INVALID_VEHICLE_ID) { if(luz[playerid] == 1) { GetVehicleParamsEx(carro, mot, lu, alar, por, cap, porma, ob); SetVehicleParamsEx(carro, mot, VEHICLE_PARAMS_OFF, alar, por, cap, porma, ob); luz[playerid] = 0; SendClientMessage(playerid, 0xFFFFFFAA, "Farol {E31919}Desligado!"); } } } if (strcmp("/capoon", cmdtext, true, 10) == 0) { new mot, lu, alar, por, cap, porma, ob; new carro = GetPlayerVehicleID(playerid); if(carro != INVALID_VEHICLE_ID) { if(capo[playerid] == 0) { GetVehicleParamsEx(carro, mot, lu, alar, por, cap, porma, ob); SetVehicleParamsEx(carro, mot, lu, alar, por, VEHICLE_PARAMS_ON, porma, ob); capo[playerid] = 1; SendClientMessage(playerid, 0xFFFFFFAA, "Capo {2F991A}Aberto!"); } } } if (strcmp("/capooff", cmdtext, true, 10) == 0) { new mot, lu, alar, por, cap, porma, ob; new carro = GetPlayerVehicleID(playerid); if(carro != INVALID_VEHICLE_ID) { if(capo[playerid] == 1) { GetVehicleParamsEx(carro, mot, lu, alar, por, cap, porma, ob); SetVehicleParamsEx(carro, mot, lu, alar, por, VEHICLE_PARAMS_OFF, porma, ob); capo[playerid] = 0; SendClientMessage(playerid, 0xFFFFFFAA, "Capo {E31919}Fechado!"); } } } if (strcmp("/pmalaon", cmdtext, true, 10) == 0) { new mot, lu, alar, por, cap, porma, ob; new carro = GetPlayerVehicleID(playerid); if(carro != INVALID_VEHICLE_ID) { if(portamalas[playerid] == 0) { GetVehicleParamsEx(carro, mot, lu, alar, por, cap, porma, ob); SetVehicleParamsEx(carro, mot, lu, alar, por, cap, VEHICLE_PARAMS_ON, ob); portamalas[playerid] = 1; SendClientMessage(playerid, 0xFFFFFFAA, "Portamalas {2F991A}Aberto!"); } } } if (strcmp("/pmalaoff", cmdtext, true, 10) == 0) { new mot, lu, alar, por, cap, porma, ob; new carro = GetPlayerVehicleID(playerid); if(carro != INVALID_VEHICLE_ID) { if(portamalas[playerid] == 1) { GetVehicleParamsEx(carro, mot, lu, alar, por, cap, porma, ob); SetVehicleParamsEx(carro, mot, lu, alar, por, cap, VEHICLE_PARAMS_OFF, ob); portamalas[playerid] = 0; SendClientMessage(playerid, 0xFFFFFFAA, "Portamalas {E31919}Fechado!"); } } } if(strcmp(cmdtext, "/ajudacarro", true) ==0) { SendClientMessage(playerid, 0xFF0019AA, "|______________ Ajuda Carro ______________|"); SendClientMessage(playerid, 0x0087D0AA, "Ligue e desligue seu veiculo apertando CTRL"); SendClientMessage(playerid, 0x0087D0AA, "Ligue e desligue o farol de veiculo apertando CapsLock"); SendClientMessage(playerid, 0x0087D0AA, "Abra e fecha o capф de seu carro usando /capoon e /capooff"); SendClientMessage(playerid, 0x0087D0AA, "Abra e fecha o porta malas usando /pmalaon e {8B8386}/pmalaoff"); } return 0; } public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { SendClientMessage(playerid, 0xC8BE00AA, "Ligue seu Veiculo apertando 'CTRL' "); SendClientMessage(playerid, 0x0087D0AA, "Ligue o farol apertando 'CapsLock' "); return 1; } public OnPlayerExitVehicle(playerid, vehicleid) { SendClientMessage(playerid, 0xFF103FAA, " Desligue Seu Veiculo para nгo gastar gasolina apertando 'Ctrl' "); return 1; } public OnPlayerStateChange(playerid, newstate, oldstate) { return 1; } public OnPlayerEnterCheckpoint(playerid) { return 1; } public OnPlayerLeaveCheckpoint(playerid) { return 1; } public OnPlayerEnterRaceCheckpoint(playerid) { return 1; } public OnPlayerLeaveRaceCheckpoint(playerid) { return 1; } public OnRconCommand(cmd[]) { return 1; } public OnPlayerRequestSpawn(playerid) { return 1; } public OnObjectMoved(objectid) { return 1; } public OnPlayerObjectMoved(playerid, objectid) { return 1; } public OnPlayerPickUpPickup(playerid, pickupid) { return 1; } public OnVehicleMod(playerid, vehicleid, componentid) { return 1; } public OnVehiclePaintjob(playerid, vehicleid, paintjobid) { return 1; } public OnVehicleRespray(playerid, vehicleid, color1, color2) { return 1; } public OnPlayerSelectedMenuRow(playerid, row) { return 1; } public OnPlayerExitedMenu(playerid) { return 1; } public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid) { return 1; } public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { //============================================================================== if((newkeys == 1) && (IsPlayerInAnyVehicle(playerid))) { if(!GetPVarInt(playerid, "Motor ON")) { SetPVarInt(playerid, "Motor ON", true); OnPlayerCommandText(playerid,"/motoron"); } else { SetPVarInt(playerid, "Motor ON", false); OnPlayerCommandText(playerid,"/motoroff"); } return true; } if((newkeys == 2) && (IsPlayerInAnyVehicle(playerid))) { if(!GetPVarInt(playerid, "Farol ON")) { SetPVarInt(playerid, "Motor ON", true); OnPlayerCommandText(playerid,"/farolon"); } else { SetPVarInt(playerid, "Farol ON", false); OnPlayerCommandText(playerid,"/faroloff"); } return true; } //============================================================================== return 1; } public OnRconLoginAttempt(ip[], password[], success) { return 1; } public OnPlayerUpdate(playerid) { return 1; } public OnPlayerStreamIn(playerid, forplayerid) { return 1; } public OnPlayerStreamOut(playerid, forplayerid) { return 1; } public OnVehicleStreamIn(vehicleid, forplayerid) { return 1; } public OnVehicleStreamOut(vehicleid, forplayerid) { return 1; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == neondialog) { if(response) { if(listitem == 0) { SetPVarInt(playerid, "Status", 1); SetPVarInt(playerid, "neon", CreateObject(18648,0,0,0,0,0,0)); SetPVarInt(playerid, "neon1", CreateObject(18648,0,0,0,0,0,0)); AttachObjectToVehicle(GetPVarInt(playerid, "neon"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0); AttachObjectToVehicle(GetPVarInt(playerid, "neon1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0); SendClientMessage(playerid, 0xAA3333AA, "Neon instalado com sucesso."); } if(listitem == 1) { SetPVarInt(playerid, "Status", 1); SetPVarInt(playerid, "neon2", CreateObject(18647,0,0,0,0,0,0)); SetPVarInt(playerid, "neon3", CreateObject(18647,0,0,0,0,0,0)); AttachObjectToVehicle(GetPVarInt(playerid, "neon2"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0); AttachObjectToVehicle(GetPVarInt(playerid, "neon3"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0); SendClientMessage(playerid, 0xAA3333AA, "Neon instalado com sucesso."); } if(listitem == 2) { SetPVarInt(playerid, "Status", 1); SetPVarInt(playerid, "neon4", CreateObject(18649,0,0,0,0,0,0)); SetPVarInt(playerid, "neon5", CreateObject(18649,0,0,0,0,0,0)); AttachObjectToVehicle(GetPVarInt(playerid, "neon4"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0); AttachObjectToVehicle(GetPVarInt(playerid, "neon5"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0); SendClientMessage(playerid, 0xAA3333AA, "Neon instalado com sucesso."); } if(listitem == 3) { SetPVarInt(playerid, "Status", 1); SetPVarInt(playerid, "neon6", CreateObject(18652,0,0,0,0,0,0)); SetPVarInt(playerid, "neon7", CreateObject(18652,0,0,0,0,0,0)); AttachObjectToVehicle(GetPVarInt(playerid, "neon6"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0); AttachObjectToVehicle(GetPVarInt(playerid, "neon7"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0); SendClientMessage(playerid, 0xAA3333AA, "Neon instalado com sucesso."); } if(listitem == 4) { SetPVarInt(playerid, "Status", 1); SetPVarInt(playerid, "neon8", CreateObject(18651,0,0,0,0,0,0)); SetPVarInt(playerid, "neon9", CreateObject(18651,0,0,0,0,0,0)); AttachObjectToVehicle(GetPVarInt(playerid, "neon8"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0); AttachObjectToVehicle(GetPVarInt(playerid, "neon9"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0); SendClientMessage(playerid, 0xAA3333AA, "Neon instalado com sucesso."); } if(listitem == 5) { SetPVarInt(playerid, "Status", 1); SetPVarInt(playerid, "neon10", CreateObject(18650,0,0,0,0,0,0)); SetPVarInt(playerid, "neon11", CreateObject(18650,0,0,0,0,0,0)); AttachObjectToVehicle(GetPVarInt(playerid, "neon10"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0); AttachObjectToVehicle(GetPVarInt(playerid, "neon11"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0); SendClientMessage(playerid, 0xAA3333AA, "Neon instalado com sucesso."); } if(listitem == 6) { DestroyObject(GetPVarInt(playerid, "neon")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon1")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon2")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon3")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon4")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon5")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon6")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon7")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon8")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon9")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon10")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon11")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon12")); DeletePVar(playerid, "Status"); SendClientMessage(playerid, 0xAA3333AA, "Neon retirado com sucesso."); } } } new car66; car66 = GetPlayerVehicleID(playerid); if(dialogid == DIALOGID) // Menu { if(response) { if(listitem == 0) // Rodas { ShowPlayerDialog(playerid, DIALOGID+1, DIALOG_STYLE_LIST, "Rodas", "Estilo 1 \nEstilo 2 \nEstilo 3 \nEstilo 4 \nEstilo 5 \nEstilo 6 \nVoltar", "Okay", "Cancelar"); } if(listitem == 1) // Cores { ShowPlayerDialog(playerid, DIALOGID+2, DIALOG_STYLE_LIST, "Cores", "Preto \nBranco \nAzul Escuro \nAzul Claro \nVerde \nVermelho \nAmarelo \nRosa \nVoltar", "Pintar!", "Cancelar"); } if(listitem == 2) // Paintjobs { ShowPlayerDialog(playerid, DIALOGID+3, DIALOG_STYLE_LIST, "Paintjobs", "Estilo 1 \nEstilo 2 \nEstilo 3 \nVoltar", "Pintar!", "Cancelar"); } if(listitem == 3) // Nitro { AddVehicleComponent(car66,1010); } if(listitem == 4) // Suspensгo { AddVehicleComponent(car66,1087); } if(listitem == 5) // AutoTuning { new idcarro; idcarro = GetPlayerVehicleID(playerid); if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 562) { AddVehicleComponent(idcarro,1046); AddVehicleComponent(idcarro,1171); AddVehicleComponent(idcarro,1149); AddVehicleComponent(idcarro,1035); AddVehicleComponent(idcarro,1147); AddVehicleComponent(idcarro,1036); AddVehicleComponent(idcarro,1040); ChangeVehiclePaintjob(idcarro, 2); ChangeVehicleColor(idcarro, 6, 6); AddVehicleComponent(idcarro,nitro); AddVehicleComponent(idcarro,rodawire); AddVehicleComponent(idcarro,suspensao); } if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 560) { AddVehicleComponent(idcarro,1028); AddVehicleComponent(idcarro,1169); AddVehicleComponent(idcarro,1141); AddVehicleComponent(idcarro,1032); AddVehicleComponent(idcarro,1138); AddVehicleComponent(idcarro,1026); AddVehicleComponent(idcarro,1027); ChangeVehiclePaintjob(idcarro, 2); AddVehicleComponent(idcarro,nitro); AddVehicleComponent(idcarro,rodawire); AddVehicleComponent(idcarro,suspensao); } if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 565) { AddVehicleComponent(idcarro,1046); AddVehicleComponent(idcarro,1153); AddVehicleComponent(idcarro,1150); AddVehicleComponent(idcarro,1054); AddVehicleComponent(idcarro,1049); AddVehicleComponent(idcarro,1047); AddVehicleComponent(idcarro,1051); AddVehicleComponent(idcarro,nitro); AddVehicleComponent(idcarro,rodawire); AddVehicleComponent(idcarro,suspensao); ChangeVehiclePaintjob(idcarro, 2); } if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 559) { AddVehicleComponent(idcarro,1065); AddVehicleComponent(idcarro,1160); AddVehicleComponent(idcarro,1159); AddVehicleComponent(idcarro,1067); AddVehicleComponent(idcarro,1162); AddVehicleComponent(idcarro,1069); AddVehicleComponent(idcarro,1071); AddVehicleComponent(idcarro,nitro); AddVehicleComponent(idcarro,rodawire); AddVehicleComponent(idcarro,suspensao); ChangeVehiclePaintjob(idcarro, 1); } if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 561) { AddVehicleComponent(idcarro,1064); AddVehicleComponent(idcarro,1155); AddVehicleComponent(idcarro,1154); AddVehicleComponent(idcarro,1055); AddVehicleComponent(idcarro,1158); AddVehicleComponent(idcarro,1056); AddVehicleComponent(idcarro,1062); AddVehicleComponent(idcarro,nitro); AddVehicleComponent(idcarro,rodawire); AddVehicleComponent(idcarro,suspensao); ChangeVehiclePaintjob(idcarro, 2); } if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 558) { AddVehicleComponent(idcarro,1089); AddVehicleComponent(idcarro,1166); AddVehicleComponent(idcarro,1168); AddVehicleComponent(idcarro,1088); AddVehicleComponent(idcarro,1164); AddVehicleComponent(idcarro,1090); AddVehicleComponent(idcarro,1094); AddVehicleComponent(idcarro,nitro); AddVehicleComponent(idcarro,rodawire); AddVehicleComponent(idcarro,suspensao); ChangeVehiclePaintjob(idcarro, 2); } if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 575) { AddVehicleComponent(idcarro,1044); AddVehicleComponent(idcarro,1174); AddVehicleComponent(idcarro,1176); AddVehicleComponent(idcarro,1042); AddVehicleComponent(idcarro,1099); AddVehicleComponent(idcarro,nitro); AddVehicleComponent(idcarro,rodawire); AddVehicleComponent(idcarro,suspensao); ChangeVehiclePaintjob(idcarro, 0); } if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 534) { AddVehicleComponent(idcarro,1126); AddVehicleComponent(idcarro,1179); AddVehicleComponent(idcarro,1180); AddVehicleComponent(idcarro,1122); AddVehicleComponent(idcarro,1101); AddVehicleComponent(idcarro,1125); AddVehicleComponent(idcarro,1123); AddVehicleComponent(idcarro,1100); AddVehicleComponent(idcarro,nitro); AddVehicleComponent(idcarro,rodawire); AddVehicleComponent(idcarro,suspensao); ChangeVehiclePaintjob(idcarro, 2); } if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 536) { AddVehicleComponent(idcarro,1104); AddVehicleComponent(idcarro,1182); AddVehicleComponent(idcarro,1184); AddVehicleComponent(idcarro,1108); AddVehicleComponent(idcarro,1107); AddVehicleComponent(idcarro,nitro); AddVehicleComponent(idcarro,rodawire); AddVehicleComponent(idcarro,suspensao); ChangeVehiclePaintjob(idcarro, 1); } if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 567) { AddVehicleComponent(idcarro,1129); AddVehicleComponent(idcarro,1189); AddVehicleComponent(idcarro,1187); AddVehicleComponent(idcarro,1102); AddVehicleComponent(idcarro,1133); AddVehicleComponent(idcarro,nitro); AddVehicleComponent(idcarro,rodawire); AddVehicleComponent(idcarro,suspensao); ChangeVehiclePaintjob(idcarro, 2); } if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 420) { AddVehicleComponent(idcarro,1010); AddVehicleComponent(idcarro,1087); AddVehicleComponent(idcarro,1081); AddVehicleComponent(idcarro,1139); } if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 400) { AddVehicleComponent(idcarro,1010); AddVehicleComponent(idcarro,1087); AddVehicleComponent(idcarro,1018); AddVehicleComponent(idcarro,1013); AddVehicleComponent(idcarro,1081); AddVehicleComponent(idcarro,1086); } if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 401) { AddVehicleComponent(idcarro,1086); AddVehicleComponent(idcarro,1139); AddVehicleComponent(idcarro,1081); AddVehicleComponent(idcarro,1010); AddVehicleComponent(idcarro,1087); AddVehicleComponent(idcarro,1012); AddVehicleComponent(idcarro,1013); AddVehicleComponent(idcarro,1042); AddVehicleComponent(idcarro,1043); AddVehicleComponent(idcarro,1018); AddVehicleComponent(idcarro,1006); AddVehicleComponent(idcarro,1007); AddVehicleComponent(idcarro,1017); } if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 576) { ChangeVehiclePaintjob(idcarro,2); AddVehicleComponent(idcarro,1191); AddVehicleComponent(idcarro,1193); AddVehicleComponent(idcarro,1010); AddVehicleComponent(idcarro,1018); AddVehicleComponent(idcarro,1081); AddVehicleComponent(idcarro,1087); AddVehicleComponent(idcarro,1134); AddVehicleComponent(idcarro,1137); } else { AddVehicleComponent(idcarro,nitro); AddVehicleComponent(idcarro,rodawire); AddVehicleComponent(idcarro,suspensao); } } } return 1; } if(dialogid == DIALOGID+1) // Rodas { if(response) { if(listitem == 0) // Estilo 1 { AddVehicleComponent(car66,1084); } if(listitem == 1) // Estilo 2 { AddVehicleComponent(car66,1073); } if(listitem == 2) // Estilo 3 { AddVehicleComponent(car66,1075); } if(listitem == 3) // Estilo 4 { AddVehicleComponent(car66,1077); } if(listitem == 4) // Estilo 5 { AddVehicleComponent(car66,1079); } if(listitem == 5) // Estilo 6 { AddVehicleComponent(car66,1080); } if(listitem == 6) // Voltar { ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST, "Sistema De Tunning", "Rodas\nCores\nPaintjobs\nNitro\nSuspensгo\nAutoTuning", "Okay", "Cancelar"); } } return 1; } if(dialogid == DIALOGID+2) // Cores { if(response) { if(listitem == 0) // Preto { ChangeVehicleColor(car66,0,0); } if(listitem == 1) // Branco { ChangeVehicleColor(car66,1,1); } if(listitem == 2) // Azul Escuro { ChangeVehicleColor(car66,425,425); } if(listitem == 3) // Azul Claro { ChangeVehicleColor(car66,2,2); } if(listitem == 4) // Verde { ChangeVehicleColor(car66,16,16); } if(listitem == 5) // Vermelho { ChangeVehicleColor(car66,3,3); } if(listitem == 6) // Amarelo { ChangeVehicleColor(car66,6,6); } if(listitem == 7) // Rosa { ChangeVehicleColor(car66,146,146); } if(listitem == 8) // Voltar { ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST, "Sistema de tunning", "Rodas\nCores\nPaintjobs\nNitro\nSuspensгo\nAutoTuning", "Okay", "Cancelar"); } } } if(dialogid == DIALOGID+3) // Paintjobs { if(response) { if(listitem == 0) // Estilo 1 { ChangeVehiclePaintjob(car66,0); } if(listitem == 1) // Estilo 2 { ChangeVehiclePaintjob(car66,1); } if(listitem == 2) // Estilo 3 { ChangeVehiclePaintjob(car66,2); } if(listitem == 4) // Voltar { ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST, "Sistema de tunning", "Rodas\nCores\nPaintjobs\nNitro\nSuspensгo\nAutoTuning", "Okay", "Cancelar"); } } return 1; } return 0; } public OnPlayerClickPlayer(playerid, clickedplayerid, source) { return 1; } stock IsPlayerRangeOfPoint(Float:radi, playerid, Float:x, Float:y, Float:z) { if(IsPlayerConnected(playerid)) { new Float:oldposx, Float:oldposy, Float:oldposz; new Float:tempposx, Float:tempposy, Float:tempposz; GetPlayerPos(playerid, oldposx, oldposy, oldposz); tempposx = (oldposx -x); tempposy = (oldposy -y); tempposz = (oldposz -z); if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) { return 1; } } return 0; }
#include <a_samp> // TOPO DO GM, SE TIVER NГO POE
new motor[MAX_PLAYERS], luz[MAX_PLAYERS], capo[MAX_PLAYERS], portamalas[MAX_PLAYERS]; // TOPO DO GM
#define PlayerToPoint IsPlayerRangeOfPoint// TOPO DO GM
#define DIALOGID 3300// TOPO DO GM
#define nitro 1010// TOPO DO GM
#define rodawire 1081// TOPO DO GM
#define suspensao 1087// TOPO DO GM
#define neondialog 8131// TOPO DO GM
#pragma tabsize 0// TOPO DO GM
#if defined FILTERSCRIPT// TOPO DO GM
//========================================== COLOCA NA PUBLIC ONGAMEMODEENIT
AddStaticPickup(1276, 23, 1617.7235,-1889.6929,13.5469); //Tunning
Create3DTextLabel("Sistema de Tunning\n /Neon /Tunar",COR_3DLABEL,1617.7235,-1889.6929,13.5469,10.0,0);
CreateObject(5774,1605.75170898,-1900.41723633,19.47380447,0.00000000,0.00000000,179.99993896); //object(garage01_lawn) (1)
CreateObject(1075,1615.33496094,-1887.22460938,13.03900909,0.00000000,0.00000000,0.00000000); //object(wheel_sr2) (1)
CreateObject(1073,1615.41418457,-1885.94079590,13.03900909,0.00000000,0.00000000,0.00000000); //object(wheel_sr6) (1)
CreateObject(1008,1615.19299316,-1884.72973633,13.55302238,0.00000000,0.00000000,0.00000000); //object(nto_b_l) (1)
CreateObject(2625,1619.63537598,-1897.43212891,13.67506313,0.00000000,0.00000000,179.99993896); //object(cj_shoe_urban2) (1)
CreateObject(3096,1613.17553711,-1884.72973633,14.35956955,0.00000000,0.00000000,0.00000000); //object(bb_pickup) (1)
CreateObject(1010,1621.04492188,-1892.39733887,12.54914665,0.00000000,0.00000000,0.00000000); //object(nto_b_tw) (1)
CreateObject(1096,1616.48059082,-1897.37854004,14.04061985,0.00000000,0.00000000,72.00000000); //object(wheel_gn3) (1)
//================================= COLOCA NA PUBLIC OnPlayerConnect
SendClientMessage(playerid, 0xFF0019AA, "Este serve contem Sistema de Tunning e motor By:Matteus_x");
//======================================== COLOCA NA PUBLIC OnPlayerCommandText
if(!strcmp("/creditost", cmdtext, true))
{
ShowPlayerDialog(playerid, 5053, DIALOG_STYLE_MSGBOX, "{FF8C00}Creditos sistema de Tunning e motor", " Este Filter Script(FS) foi Criado por Matteus_x\n\n Para uso do servidor FanatiC'S Samp.\n Postado na net por Matteus_x\n Scripter: Matteus_Fanatic e RedBulL_x \n Mapper: Joao_Lemos \nCreditos reservados a TecnoSamp\n\n\n\n\nObrigado e tenha um уtimo jogo.", "Ok", "Sair");
return 1;
}
if(strcmp(cmdtext, "/neon", true) == 0)
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "Vocк precisa de um carro para colocar Neon");
if(!PlayerToPoint(25.0,playerid,1617.7235,-1889.6929,13.5469)) return SendClientMessage(playerid, -1, " Vocк nгo estб na Garagem de modificaзхes para equipar seu veiculo com neon!");
ShowPlayerDialog(playerid, neondialog, DIALOG_STYLE_LIST, "Sistema De Tunning", " Neon Azul\nNeon Vermelho\nNeon Verde\nNeon Branco\nNeon Rosa\nNeon Amarelo\nRemover neon do veiculo", "Aceitar", "Cancelar");
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 10.0);
return 1;
}
if(strcmp(cmdtext, "/tunar", true) == 0)
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "Vocк precisa de um carro para tunar");
if(!PlayerToPoint(25.0,playerid,1617.7235,-1889.6929,13.5469)) return SendClientMessage(playerid, -1, " Vocк nгo estб na Garagem de modificaзхes para equipar seu veiculo !");
ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST, "Sistema De Tunning", "Rodas\nCores\nPaintjobs\nNitro\nSuspensгo\nAutoTuning", "Okay", "Cancelar");
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 10.0);
return 1;
}
if (strcmp("/motoron", cmdtext, true, 10) == 0)
{
new mot, lu, alar, por, cap, porma, ob;
new carro = GetPlayerVehicleID(playerid);
if(carro != INVALID_VEHICLE_ID)
{
if(motor[playerid] == 0)
{
GetVehicleParamsEx(carro, mot, lu, alar, por, cap, porma, ob);
SetVehicleParamsEx(carro, VEHICLE_PARAMS_ON, lu, alar, por, cap, porma, ob);
motor[playerid] = 1;
SendClientMessage(playerid, 0xFFFFFFAA, "Veiculo {2F991A}Ligado!");
}
}
}
if (strcmp("/motoroff", cmdtext, true, 10) == 0)
{
new mot, lu, alar, por, cap, porma, ob;
new carro = GetPlayerVehicleID(playerid);
if(carro != INVALID_VEHICLE_ID)
{
if(motor[playerid] == 1)
{
GetVehicleParamsEx(carro, mot, lu, alar, por, cap, porma, ob);
SetVehicleParamsEx(carro, VEHICLE_PARAMS_OFF, lu, alar, por, cap, porma, ob);
motor[playerid] = 0;
SendClientMessage(playerid, 0xFFFFFFAA, "Veiculo {E31919}Desligado!");
}
}
}
if (strcmp("/farolon", cmdtext, true, 10) == 0)
{
new mot, lu, alar, por, cap, porma, ob;
new carro = GetPlayerVehicleID(playerid);
if(carro != INVALID_VEHICLE_ID)
{
if(luz[playerid] == 0)
{
GetVehicleParamsEx(carro, mot, lu, alar, por, cap, porma, ob);
SetVehicleParamsEx(carro, mot, VEHICLE_PARAMS_ON, alar, por, cap, porma, ob);
luz[playerid] = 1;
SendClientMessage(playerid, 0xFFFFFFAA, "Farol {2F991A}Ligado!");
}
}
}
if (strcmp("/faroloff", cmdtext, true, 10) == 0)
{
new mot, lu, alar, por, cap, porma, ob;
new carro = GetPlayerVehicleID(playerid);
if(carro != INVALID_VEHICLE_ID)
{
if(luz[playerid] == 1)
{
GetVehicleParamsEx(carro, mot, lu, alar, por, cap, porma, ob);
SetVehicleParamsEx(carro, mot, VEHICLE_PARAMS_OFF, alar, por, cap, porma, ob);
luz[playerid] = 0;
SendClientMessage(playerid, 0xFFFFFFAA, "Farol {E31919}Desligado!");
}
}
}
if (strcmp("/capoon", cmdtext, true, 10) == 0)
{
new mot, lu, alar, por, cap, porma, ob;
new carro = GetPlayerVehicleID(playerid);
if(carro != INVALID_VEHICLE_ID)
{
if(capo[playerid] == 0)
{
GetVehicleParamsEx(carro, mot, lu, alar, por, cap, porma, ob);
SetVehicleParamsEx(carro, mot, lu, alar, por, VEHICLE_PARAMS_ON, porma, ob);
capo[playerid] = 1;
SendClientMessage(playerid, 0xFFFFFFAA, "Capo {2F991A}Aberto!");
}
}
}
if (strcmp("/capooff", cmdtext, true, 10) == 0)
{
new mot, lu, alar, por, cap, porma, ob;
new carro = GetPlayerVehicleID(playerid);
if(carro != INVALID_VEHICLE_ID)
{
if(capo[playerid] == 1)
{
GetVehicleParamsEx(carro, mot, lu, alar, por, cap, porma, ob);
SetVehicleParamsEx(carro, mot, lu, alar, por, VEHICLE_PARAMS_OFF, porma, ob);
capo[playerid] = 0;
SendClientMessage(playerid, 0xFFFFFFAA, "Capo {E31919}Fechado!");
}
}
}
if (strcmp("/pmalaon", cmdtext, true, 10) == 0)
{
new mot, lu, alar, por, cap, porma, ob;
new carro = GetPlayerVehicleID(playerid);
if(carro != INVALID_VEHICLE_ID)
{
if(portamalas[playerid] == 0)
{
GetVehicleParamsEx(carro, mot, lu, alar, por, cap, porma, ob);
SetVehicleParamsEx(carro, mot, lu, alar, por, cap, VEHICLE_PARAMS_ON, ob);
portamalas[playerid] = 1;
SendClientMessage(playerid, 0xFFFFFFAA, "Portamalas {2F991A}Aberto!");
}
}
}
if (strcmp("/pmalaoff", cmdtext, true, 10) == 0)
{
new mot, lu, alar, por, cap, porma, ob;
new carro = GetPlayerVehicleID(playerid);
if(carro != INVALID_VEHICLE_ID)
{
if(portamalas[playerid] == 1)
{
GetVehicleParamsEx(carro, mot, lu, alar, por, cap, porma, ob);
SetVehicleParamsEx(carro, mot, lu, alar, por, cap, VEHICLE_PARAMS_OFF, ob);
portamalas[playerid] = 0;
SendClientMessage(playerid, 0xFFFFFFAA, "Portamalas {E31919}Fechado!");
}
}
}
if(strcmp(cmdtext, "/ajudacarro", true) ==0)
{
SendClientMessage(playerid, 0xFF0019AA, "|______________ Ajuda Carro ______________|");
SendClientMessage(playerid, 0x0087D0AA, "Ligue e desligue seu veiculo apertando CTRL");
SendClientMessage(playerid, 0x0087D0AA, "Ligue e desligue o farol de veiculo apertando CapsLock");
SendClientMessage(playerid, 0x0087D0AA, "Abra e fecha o capф de seu carro usando /capoon e /capooff");
SendClientMessage(playerid, 0x0087D0AA, "Abra e fecha o porta malas usando /pmalaon e {8B8386}/pmalaoff");
}
//=============================== COLOCA NA PUBLIC OnPlayerEnterVehicle
SendClientMessage(playerid, 0xC8BE00AA, "Ligue seu Veiculo apertando 'CTRL' ");
SendClientMessage(playerid, 0x0087D0AA, "Ligue o farol apertando 'CapsLock' ");
//=============================== COLOCA NA PUBLIC OnPlayerExitVehicle
SendClientMessage(playerid, 0xFF103FAA, " Desligue Seu Veiculo para nгo gastar gasolina apertando 'Ctrl' ");
//============================ COLOCA NA PUBLIC OnPlayerKeyStateChange
if((newkeys == 1) && (IsPlayerInAnyVehicle(playerid)))
{
if(!GetPVarInt(playerid, "Motor ON"))
{
SetPVarInt(playerid, "Motor ON", true);
OnPlayerCommandText(playerid,"/motoron");
}
else
{
SetPVarInt(playerid, "Motor ON", false);
OnPlayerCommandText(playerid,"/motoroff");
}
return true;
}
if((newkeys == 2) && (IsPlayerInAnyVehicle(playerid)))
{
if(!GetPVarInt(playerid, "Farol ON"))
{
SetPVarInt(playerid, "Motor ON", true);
OnPlayerCommandText(playerid,"/farolon");
}
else
{
SetPVarInt(playerid, "Farol ON", false);
OnPlayerCommandText(playerid,"/faroloff");
}
//==============================================================================
//==================================== COLOCA NA PUBLIC ONDIALOGRESPONSE ====================================//
if(dialogid == neondialog)
{
if(response)
{
if(listitem == 0)
{
SetPVarInt(playerid, "Status", 1);
SetPVarInt(playerid, "neon", CreateObject(18648,0,0,0,0,0,0));
SetPVarInt(playerid, "neon1", CreateObject(18648,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "neon"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
SendClientMessage(playerid, 0xAA3333AA, "Neon instalado com sucesso.");
}
if(listitem == 1)
{
SetPVarInt(playerid, "Status", 1);
SetPVarInt(playerid, "neon2", CreateObject(18647,0,0,0,0,0,0));
SetPVarInt(playerid, "neon3", CreateObject(18647,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "neon2"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon3"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
SendClientMessage(playerid, 0xAA3333AA, "Neon instalado com sucesso.");
}
if(listitem == 2)
{
SetPVarInt(playerid, "Status", 1);
SetPVarInt(playerid, "neon4", CreateObject(18649,0,0,0,0,0,0));
SetPVarInt(playerid, "neon5", CreateObject(18649,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "neon4"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon5"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
SendClientMessage(playerid, 0xAA3333AA, "Neon instalado com sucesso.");
}
if(listitem == 3)
{
SetPVarInt(playerid, "Status", 1);
SetPVarInt(playerid, "neon6", CreateObject(18652,0,0,0,0,0,0));
SetPVarInt(playerid, "neon7", CreateObject(18652,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "neon6"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon7"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
SendClientMessage(playerid, 0xAA3333AA, "Neon instalado com sucesso.");
}
if(listitem == 4)
{
SetPVarInt(playerid, "Status", 1);
SetPVarInt(playerid, "neon8", CreateObject(18651,0,0,0,0,0,0));
SetPVarInt(playerid, "neon9", CreateObject(18651,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "neon8"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon9"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
SendClientMessage(playerid, 0xAA3333AA, "Neon instalado com sucesso.");
}
if(listitem == 5)
{
SetPVarInt(playerid, "Status", 1);
SetPVarInt(playerid, "neon10", CreateObject(18650,0,0,0,0,0,0));
SetPVarInt(playerid, "neon11", CreateObject(18650,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "neon10"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon11"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
SendClientMessage(playerid, 0xAA3333AA, "Neon instalado com sucesso.");
}
if(listitem == 6)
{
DestroyObject(GetPVarInt(playerid, "neon"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon1"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon2"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon3"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon4"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon5"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon6"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon7"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon8"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon9"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon10"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon11"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon12"));
DeletePVar(playerid, "Status");
SendClientMessage(playerid, 0xAA3333AA, "Neon retirado com sucesso.");
}
}
}
new car66;
car66 = GetPlayerVehicleID(playerid);
if(dialogid == DIALOGID) // Menu
{
if(response)
{
if(listitem == 0) // Rodas
{
ShowPlayerDialog(playerid, DIALOGID+1, DIALOG_STYLE_LIST, "Rodas", "Estilo 1 \nEstilo 2 \nEstilo 3 \nEstilo 4 \nEstilo 5 \nEstilo 6 \nVoltar", "Okay", "Cancelar");
}
if(listitem == 1) // Cores
{
ShowPlayerDialog(playerid, DIALOGID+2, DIALOG_STYLE_LIST, "Cores", "Preto \nBranco \nAzul Escuro \nAzul Claro \nVerde \nVermelho \nAmarelo \nRosa \nVoltar", "Pintar!", "Cancelar");
}
if(listitem == 2) // Paintjobs
{
ShowPlayerDialog(playerid, DIALOGID+3, DIALOG_STYLE_LIST, "Paintjobs", "Estilo 1 \nEstilo 2 \nEstilo 3 \nVoltar", "Pintar!", "Cancelar");
}
if(listitem == 3) // Nitro
{
AddVehicleComponent(car66,1010);
}
if(listitem == 4) // Suspensгo
{
AddVehicleComponent(car66,1087);
}
if(listitem == 5) // AutoTuning
{
new idcarro;
idcarro = GetPlayerVehicleID(playerid);
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 562)
{
AddVehicleComponent(idcarro,1046);
AddVehicleComponent(idcarro,1171);
AddVehicleComponent(idcarro,1149);
AddVehicleComponent(idcarro,1035);
AddVehicleComponent(idcarro,1147);
AddVehicleComponent(idcarro,1036);
AddVehicleComponent(idcarro,1040);
ChangeVehiclePaintjob(idcarro, 2);
ChangeVehicleColor(idcarro, 6, 6);
AddVehicleComponent(idcarro,nitro);
AddVehicleComponent(idcarro,rodawire);
AddVehicleComponent(idcarro,suspensao);
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 560)
{
AddVehicleComponent(idcarro,1028);
AddVehicleComponent(idcarro,1169);
AddVehicleComponent(idcarro,1141);
AddVehicleComponent(idcarro,1032);
AddVehicleComponent(idcarro,1138);
AddVehicleComponent(idcarro,1026);
AddVehicleComponent(idcarro,1027);
ChangeVehiclePaintjob(idcarro, 2);
AddVehicleComponent(idcarro,nitro);
AddVehicleComponent(idcarro,rodawire);
AddVehicleComponent(idcarro,suspensao);
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 565)
{
AddVehicleComponent(idcarro,1046);
AddVehicleComponent(idcarro,1153);
AddVehicleComponent(idcarro,1150);
AddVehicleComponent(idcarro,1054);
AddVehicleComponent(idcarro,1049);
AddVehicleComponent(idcarro,1047);
AddVehicleComponent(idcarro,1051);
AddVehicleComponent(idcarro,nitro);
AddVehicleComponent(idcarro,rodawire);
AddVehicleComponent(idcarro,suspensao);
ChangeVehiclePaintjob(idcarro, 2);
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 559)
{
AddVehicleComponent(idcarro,1065);
AddVehicleComponent(idcarro,1160);
AddVehicleComponent(idcarro,1159);
AddVehicleComponent(idcarro,1067);
AddVehicleComponent(idcarro,1162);
AddVehicleComponent(idcarro,1069);
AddVehicleComponent(idcarro,1071);
AddVehicleComponent(idcarro,nitro);
AddVehicleComponent(idcarro,rodawire);
AddVehicleComponent(idcarro,suspensao);
ChangeVehiclePaintjob(idcarro, 1);
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 561)
{
AddVehicleComponent(idcarro,1064);
AddVehicleComponent(idcarro,1155);
AddVehicleComponent(idcarro,1154);
AddVehicleComponent(idcarro,1055);
AddVehicleComponent(idcarro,1158);
AddVehicleComponent(idcarro,1056);
AddVehicleComponent(idcarro,1062);
AddVehicleComponent(idcarro,nitro);
AddVehicleComponent(idcarro,rodawire);
AddVehicleComponent(idcarro,suspensao);
ChangeVehiclePaintjob(idcarro, 2);
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 558)
{
AddVehicleComponent(idcarro,1089);
AddVehicleComponent(idcarro,1166);
AddVehicleComponent(idcarro,1168);
AddVehicleComponent(idcarro,1088);
AddVehicleComponent(idcarro,1164);
AddVehicleComponent(idcarro,1090);
AddVehicleComponent(idcarro,1094);
AddVehicleComponent(idcarro,nitro);
AddVehicleComponent(idcarro,rodawire);
AddVehicleComponent(idcarro,suspensao);
ChangeVehiclePaintjob(idcarro, 2);
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 575)
{
AddVehicleComponent(idcarro,1044);
AddVehicleComponent(idcarro,1174);
AddVehicleComponent(idcarro,1176);
AddVehicleComponent(idcarro,1042);
AddVehicleComponent(idcarro,1099);
AddVehicleComponent(idcarro,nitro);
AddVehicleComponent(idcarro,rodawire);
AddVehicleComponent(idcarro,suspensao);
ChangeVehiclePaintjob(idcarro, 0);
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 534)
{
AddVehicleComponent(idcarro,1126);
AddVehicleComponent(idcarro,1179);
AddVehicleComponent(idcarro,1180);
AddVehicleComponent(idcarro,1122);
AddVehicleComponent(idcarro,1101);
AddVehicleComponent(idcarro,1125);
AddVehicleComponent(idcarro,1123);
AddVehicleComponent(idcarro,1100);
AddVehicleComponent(idcarro,nitro);
AddVehicleComponent(idcarro,rodawire);
AddVehicleComponent(idcarro,suspensao);
ChangeVehiclePaintjob(idcarro, 2);
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 536)
{
AddVehicleComponent(idcarro,1104);
AddVehicleComponent(idcarro,1182);
AddVehicleComponent(idcarro,1184);
AddVehicleComponent(idcarro,1108);
AddVehicleComponent(idcarro,1107);
AddVehicleComponent(idcarro,nitro);
AddVehicleComponent(idcarro,rodawire);
AddVehicleComponent(idcarro,suspensao);
ChangeVehiclePaintjob(idcarro, 1);
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 567)
{
AddVehicleComponent(idcarro,1129);
AddVehicleComponent(idcarro,1189);
AddVehicleComponent(idcarro,1187);
AddVehicleComponent(idcarro,1102);
AddVehicleComponent(idcarro,1133);
AddVehicleComponent(idcarro,nitro);
AddVehicleComponent(idcarro,rodawire);
AddVehicleComponent(idcarro,suspensao);
ChangeVehiclePaintjob(idcarro, 2);
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 420)
{
AddVehicleComponent(idcarro,1010);
AddVehicleComponent(idcarro,1087);
AddVehicleComponent(idcarro,1081);
AddVehicleComponent(idcarro,1139);
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 400)
{
AddVehicleComponent(idcarro,1010);
AddVehicleComponent(idcarro,1087);
AddVehicleComponent(idcarro,1018);
AddVehicleComponent(idcarro,1013);
AddVehicleComponent(idcarro,1081);
AddVehicleComponent(idcarro,1086);
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 401)
{
AddVehicleComponent(idcarro,1086);
AddVehicleComponent(idcarro,1139);
AddVehicleComponent(idcarro,1081);
AddVehicleComponent(idcarro,1010);
AddVehicleComponent(idcarro,1087);
AddVehicleComponent(idcarro,1012);
AddVehicleComponent(idcarro,1013);
AddVehicleComponent(idcarro,1042);
AddVehicleComponent(idcarro,1043);
AddVehicleComponent(idcarro,1018);
AddVehicleComponent(idcarro,1006);
AddVehicleComponent(idcarro,1007);
AddVehicleComponent(idcarro,1017);
}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 576)
{
ChangeVehiclePaintjob(idcarro,2);
AddVehicleComponent(idcarro,1191);
AddVehicleComponent(idcarro,1193);
AddVehicleComponent(idcarro,1010);
AddVehicleComponent(idcarro,1018);
AddVehicleComponent(idcarro,1081);
AddVehicleComponent(idcarro,1087);
AddVehicleComponent(idcarro,1134);
AddVehicleComponent(idcarro,1137);
}
else
{
AddVehicleComponent(idcarro,nitro);
AddVehicleComponent(idcarro,rodawire);
AddVehicleComponent(idcarro,suspensao);
}
}
}
return 1;
}
if(dialogid == DIALOGID+1) // Rodas
{
if(response)
{
if(listitem == 0) // Estilo 1
{
AddVehicleComponent(car66,1084);
}
if(listitem == 1) // Estilo 2
{
AddVehicleComponent(car66,1073);
}
if(listitem == 2) // Estilo 3
{
AddVehicleComponent(car66,1075);
}
if(listitem == 3) // Estilo 4
{
AddVehicleComponent(car66,1077);
}
if(listitem == 4) // Estilo 5
{
AddVehicleComponent(car66,1079);
}
if(listitem == 5) // Estilo 6
{
AddVehicleComponent(car66,1080);
}
if(listitem == 6) // Voltar
{
ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST, "Sistema De Tunning", "Rodas\nCores\nPaintjobs\nNitro\nSuspensгo\nAutoTuning", "Okay", "Cancelar");
}
}
return 1;
}
if(dialogid == DIALOGID+2) // Cores
{
if(response)
{
if(listitem == 0) // Preto
{
ChangeVehicleColor(car66,0,0);
}
if(listitem == 1) // Branco
{
ChangeVehicleColor(car66,1,1);
}
if(listitem == 2) // Azul Escuro
{
ChangeVehicleColor(car66,425,425);
}
if(listitem == 3) // Azul Claro
{
ChangeVehicleColor(car66,2,2);
}
if(listitem == 4) // Verde
{
ChangeVehicleColor(car66,16,16);
}
if(listitem == 5) // Vermelho
{
ChangeVehicleColor(car66,3,3);
}
if(listitem == 6) // Amarelo
{
ChangeVehicleColor(car66,6,6);
}
if(listitem == 7) // Rosa
{
ChangeVehicleColor(car66,146,146);
}
if(listitem == 8) // Voltar
{
ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST, "Sistema de tunning", "Rodas\nCores\nPaintjobs\nNitro\nSuspensгo\nAutoTuning", "Okay", "Cancelar");
}
}
}
if(dialogid == DIALOGID+3) // Paintjobs
{
if(response)
{
if(listitem == 0) // Estilo 1
{
ChangeVehiclePaintjob(car66,0);
}
if(listitem == 1) // Estilo 2
{
ChangeVehiclePaintjob(car66,1);
}
if(listitem == 2) // Estilo 3
{
ChangeVehiclePaintjob(car66,2);
}
if(listitem == 4) // Voltar
{
ShowPlayerDialog(playerid, DIALOGID, DIALOG_STYLE_LIST, "Sistema de tunning", "Rodas\nCores\nPaintjobs\nNitro\nSuspensгo\nAutoTuning", "Okay", "Cancelar");
}
}
return 1;
}
//============ COLOCA NO FINAL DO GAME MODE ==================================//
stock IsPlayerRangeOfPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
if(IsPlayerConnected(playerid))
{
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
tempposx = (oldposx -x);
tempposy = (oldposy -y);
tempposz = (oldposz -z);
if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
return 1;
}
}
return 0;
}