02.03.2013, 20:01
Oi Pessoal. Tenho um FilterScript de casas retirei os erros dele mas quero colocar o icone das casas no radar sera que alguem sabe o codigo que devo colocar no sistema.
Quote:
#include <a_samp> #include <dudb> #include <dini> #define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1 #define PASTA_CONTAS "/Contas/%s.ini" #define Vermelho 0xFF0000AA #define Branco 0xAAFFFFAA #define cor 0xAAFFFFAA #define MAX_HOUSES 500 #define MAX_BUY_CARS 85 new HOUSE_STATS = 0; new Menu:Tuning; new Menu:Rodas; new Menu:Cores; new Menu:Paint; new Menu:Aerof; new Menu:Saias; new Menuescarga; enum CarInfo {CarModel,CarName[240],CarCost}; new Buyable_Cars[MAX_BUY_CARS][CarInfo] = { {400,"Landstalker",0}, {401,"Bravura",0}, {402,"Buffalo",0}, {404,"Perenail",0}, {405,"Sentinel",0}, {410,"Manana",0}, {411,"Infernus",0}, {412,"Voodoo",0}, {415,"Cheetah",0}, {418,"Moonbeam",0}, {419,"Esperanto",0}, {421,"Washington",0}, {422,"Bobcat",0}, {426,"Premier",0}, {429,"Banshee",0}, {434,"Hotknife",0}, {439,"Stallion",0}, {445,"Admiral",0}, {451,"Turismo",0}, {458,"Solair",0}, {461,"PCJ-600",0}, {463,"Freeway",0}, {467,"Oceanic",0}, {468,"Sanchez",0}, {474,"Hermes",0}, {475,"Sabre",0}, {477,"ZR-350",0}, {478,"Walton",0}, {479,"Regina",0}, {480,"Comet",0}, {481,"BMX",0}, {482,"Burrito",0}, {483,"Camper",0}, {489,"Rancher",0}, {491,"Virgo",0}, {492,"Greenwood",0}, {494,"Hotring",0}, {496,"Blista Compact",0}, {504,"Bloodring Banger",0}, {506,"Super GT",0}, {507,"Elegant",0}, {516,"Nebula",0}, {517,"Majestic",0}, {518,"Buccaneer",0}, {521,"FCR-900",0}, {522,"NRG-500",0}, {526,"Fortune",0}, {527,"Cadrona",0}, {529,"Williard",0}, {533,"Feltzer",0}, {534,"Remington",0}, {536,"Blade",0}, {540,"Vincent",0}, {541,"Bullet",0}, {542,"Clover",0}, {543,"Sadler",0}, {545,"Hustler",0}, {546,"Intruder",0}, {547,"Primo",0}, {549,"Tampa",0}, {550,"Sunrise",0}, {515,"Merit",0}, {554,"Yosemite",0}, {555,"Windsor",0}, {556,"Monster A",0}, {567,"Monster B",0}, {558,"Uranus",0}, {559,"Jester",0}, {560,"Sultan",0}, {561,"Stratum",0}, {562,"Elegy",0}, {565,"Flash",0}, {566,"Tahoma",0}, {567,"Savanna",0}, {575,"Broadway",0}, {576,"Tornado",0}, {579,"Huntley",0}, {580,"Stafford",0}, {581,"BF-400",0}, {585,"Emperor",0}, {587,"Euros",0}, {589,"Club",0}, {600,"Picador",0}, {602,"Alpha",0}, {603,"Phoenix",0} }; #define Cost_Admiral 50000 new HousePickup[MAX_HOUSES]; new playerinterior[MAX_PLAYERS]=-1; new inhousepickup[MAX_PLAYERS]; new playericonhouse[MAX_PLAYERS]; new Float:housex, Float:housey, Float:housez; new housemapicon[MAX_HOUSES]; new playerworld[MAX_PLAYERS]; new bool:KillVeh[MAX_VEHICLES] = false; forward vcasa(); forward newcar(); forward rv(); forward tunar(); forward des1(); forward des2(); forward tunar2(); forward tunar3(); forward tunar4(); forward tunar5(); forward tunar6(); forward tunar7(); forward tunar8(); forward tunar9(); forward tunar10(); forward saias1(); forward saias2(); forward aero1(); forward aero2(); forward cor1(); forward cor2(); forward cor3(); forward cor4(); forward cor5(); forward cor6(); forward cor7(); forward cor8(); forward respawncar(); forward KillVehicle(carid); enum HouseInfo { Name[24], Renter[24], Des[80], Login[80], Rentable, Rentcost, TemDono, Cost, Sell, Casaid, Interior, Virtualworld, Houseid, Agua, Luz, Locked, Carrof, Float:InteriorX, Float:InteriorY, Float:InteriorZ, Float:iconx, Float:icony, Float:iconz, Rentfee } new hInfo[MAX_HOUSES][HouseInfo]; enum HouseCarInfo { HouseCar, GotCar, Houseid, CarModel, Float:CarX, Float:CarY, Float:CarZ, Float:AnglE, Vc, CarColor1, CarColor2, Respawn_Delay, Tunar, Tunar2, Tunar3, Tunar4, Tunar5, Tunar6, Tunar7, Tunar8, Tunar9, Tunar10, Saias1, Saias2, Aero1, Aero2, Cor1, Cor2, Cor3, Cor4, Cor5, Cor6, Cor7, Cor8, NewCar, Des1, Des2, Rv, Vcasa, RespawnCar } new cInfo[MAX_HOUSES][HouseCarInfo]; #define FILTERSCRIPT #if defined FILTERSCRIPT new dentrocasa[MAX_PLAYERS]; public OnFilterScriptInit() { AddHouse(0,5789.2813,-1094.5621,-0.8585,5789.2813,-1094.5621,-0.8585, 0, 0, 2, 0); AddHouse(1,1497.000000,-688.150085,95.548637,2324.5916,-1149.2257,1050.7101, 50000, 90000, 12, 0); AddHouse(2,980.526184,-677.239868,121.976257,2324.5916,-1149.2257,1050.7101, 50000, 90000, 12, 0); AddHouse(3,1094.904541,-647.283569,113.648437,226.3627,1114.4697,1080.9933 , 80000, 80000, 5, 0); AddHouse(4,497.438110,-1094.561157,82.359191,226.3627,1114.4697,1080.9933 , 80000, 80000, 5, 0); AddHouse(5,559.168151,-1076.159057,72.921989,2324.5916,-1149.2257,1050.7101, 50000, 50000, 12, 0); AddHouse(6,836.504150,-894.000122,68.768898,447.0822,1397.7443,1084.3047, 86000, 86000, 2, 0); AddHouse(7,1093.761718,-806.300781,107.419555,447.0822,1397.7443,1084.3047 , 86000, 86000, 2, 0); AddHouse(8,1442.342773,-629.529113,95.718566,2324.5916,-1149.2257,1050.7101, 50000, 50000, 12, 0); AddHouse(9,1527.317993,-772.988830,80.578125,22.7845,1403.5441,1084.4297, 32000, 32000, 5, 0); AddHouse(10,1439.244140,-926.332702,39.647666,22.7845,1403.5441,1084.4297, 32000, 32000, 5, 0); AddHouse(11,1331.835571,-632.885009,109.134902,2218.2581,-1076.2394,1050.4844, 13000, 13000, 1, 0); AddHouse(12,1111.691650,-742.259460,100.132926,234.2906,1064.2913,1084.2114 , 168000, 168000, 6, 0); AddHouse(13,2104.792968,-1057.063720,27.133430,422.4743,2536.4602,10.0000, 8000, 8000, 10, 0); AddHouseCar(0, 522,5789.2813,-1094.5621,-0.8585,5789.2813,1,1, 0); AddHouseCar(1, 522,1517.0826,-694.5869,94.4771,91.2823,1,1, 0); AddHouseCar(2, 522,1011.7614,-660.2132,120.8676,34.2239,1,1,0); AddHouseCar(3, 522,1088.3958,-640.9830,112.8882,270.1778,0,0,0); AddHouseCar(4, 522,479.5295,-1091.5692,82.1238,355.6898,6,6,0); AddHouseCar(5, 522,565.9045,-1069.4355,72.8577,30.7381,3,3,0); AddHouseCar(6, 522,833.1517,-888.6434,68.5014,325.6466,400,0,0); AddHouseCar(7, 522,1101.3904,-820.1945,86.6724,94.6037,900,300,0); AddHouseCar(8, 522,1460.4650,-632.4240,95.4936,179.7559,6,1,0); AddHouseCar(9, 522,1514.9288,-766.4861,79.9538,137.5066,3,1,0); AddHouseCar(10, 522,1451.8934,-923.4059,37.3142,175.0609,1,0,0); AddHouseCar(11, 522,1354.7030,-630.8596,108.8599,16.8350,1,1,0); AddHouseCar(12, 522,1109.5281,-732.0916,100.1196,90.7427,0,0,0); AddHouseCar(13, 522,2116.0098,-1059.1198,25.4925,136.4145,1,0,0); AddHouseCar(14, 522,2106.1104,-1250.9248,25.2125,180.1920,1,0,0); SetTimer("vcasa", 1000,1); SetTimer("newcar", 1000,1); SetTimer("rv", 1000,1); SetTimer("des1", 1000,1); SetTimer("des1", 1000,1); SetTimer("tunar", 1000,1); SetTimer("tunar2", 1000,1); SetTimer("tunar3", 1000,1); SetTimer("tunar4", 1000,1); SetTimer("tunar5", 1000,1); SetTimer("tunar6", 1000,1); SetTimer("tunar7", 1000,1); SetTimer("tunar8", 1000,1); SetTimer("tunar9", 1000,1); SetTimer("tunar10", 1000,1); SetTimer("aero1", 1000,1); SetTimer("aero2", 1000,1); SetTimer("cor1", 1000,1); SetTimer("cor2", 1000,1); SetTimer("cor3", 1000,1); SetTimer("cor4", 1000,1); SetTimer("cor5", 1000,1); SetTimer("cor6", 1000,1); SetTimer("cor7", 1000,1); SetTimer("cor8", 1000,1); SetTimer("saias1", 1000,1); SetTimer("saias2", 1000,1); Tuning = CreateMenu("Tunar",1,20,120,150,40); AddMenuItem(Tuning,0,"Rodas"); AddMenuItem(Tuning,0,"Cores"); AddMenuItem(Tuning,0,"Paintjobs"); AddMenuItem(Tuning,0,"Nitro"); AddMenuItem(Tuning,0,"Hydraulic"); AddMenuItem(Tuning,0,"Aerofolio"); AddMenuItem(Tuning,0,"Saias"); AddMenuItem(Tuning,0,"Descarga"); AddMenuItem(Tuning,0,"- Sair"); Rodas = CreateMenu("Rodas",1,20,120,150,40); AddMenuItem(Rodas,0,"Cutter"); AddMenuItem(Rodas,0,"Switch"); AddMenuItem(Rodas,0,"Wires"); AddMenuItem(Rodas,0,"Mega"); AddMenuItem(Rodas,0,"Import"); AddMenuItem(Rodas,0,"- Sair"); Cores = CreateMenu("Cores",1,20,120,150,40); AddMenuItem(Cores,0,"Vermelho"); AddMenuItem(Cores,0,"Amarelo"); AddMenuItem(Cores,0,"Roxo"); AddMenuItem(Cores,0,"Rosa"); AddMenuItem(Cores,0,"Verde"); AddMenuItem(Cores,0,"Branco"); AddMenuItem(Cores,0,"Preto"); AddMenuItem(Cores,0,"Azul"); AddMenuItem(Cores,0,"- Sair"); Paint = CreateMenu("Paintjobs",1,20,120,150,40); AddMenuItem(Paint,0,"Estilo 1"); AddMenuItem(Paint,0,"Estilo 2"); AddMenuItem(Paint,0,"Estilo 3"); AddMenuItem(Paint,0,"- Sair"); Aerof = CreateMenu("Aerofolios",1,20,120,150,40); AddMenuItem(Aerof,0,"Estilo 1"); AddMenuItem(Aerof,0,"Estilo 2"); AddMenuItem(Aerof,0,"- Sair"); Saias = CreateMenu("Saias",1,20,120,150,40); AddMenuItem(Saias,0,"Estilo 1"); AddMenuItem(Saias,0,"Estilo 2"); AddMenuItem(Saias,0,"- Sair"); Descarga = CreateMenu("Descarga",1,20,120,150,40); AddMenuItem(Descarga,0,"Estilo 1"); AddMenuItem(Descarga,0,"Estilo 2"); AddMenuItem(Descarga,0,"- Sair"); return 1; } #else #endif public OnPlayerCommandText(playerid, cmdtext[]) { dcmd(comprarcasa,11,cmdtext); dcmd(vendercasa,10,cmdtext); dcmd(fecharcasa,10,cmdtext); dcmd(abrircasa,9,cmdtext); dcmd(setaluguel,10,cmdtext); dcmd(alugarcasa,10,cmdtext); dcmd(desalugarcasa,13,cmdtext); dcmd(comandoscasa,12,cmdtext); dcmd(infocasa,8,cmdtext); dcmd(veiculocasa,11,cmdtext); dcmd(respawnveiculo,14,cmdtext); dcmd(comandosveiculocasa,19,cmdtext); dcmd(tunarveiculocasa,16,cmdtext); dcmd(liberarcasa,11,cmdtext); dcmd(entrarcasa,10,cmdtext); dcmd(saircasa,8,cmdtext); dcmd(removermorador,14,cmdtext); dcmd(impostos,8,cmdtext); //////////////////////////////////////////////////// new cmd[256]; new idx; cmd = strtok(cmdtext, idx); if(strcmp(cmd, "/mensagemcasa", true) == 0){ new timestamp = GetTickCount(); if(timestamp - inhousepickup[playerid] > 5000) { return 1; } new str1[256],pname[24]; GetPlayerName(playerid, pname, sizeof(pname)); format(str1, sizeof(str1), "Casas/Casaid%d", playericonhouse[playerid]); if (strcmp(hInfo[playericonhouse[playerid]][Name],pname,false)) return SendClientMessage(playerid, Vermelho, "(ERRO) Vocк nгo й dono dessa casa."); new tmp[256]; strmid(tmp, cmdtext, 13, strlen(cmdtext)); if(!strlen(tmp)) { SendClientMessage(playerid, 0xFF0000AA, "Uso: /mensagemcasa [texto]"); return 1; } new string[128]; format(string,sizeof(string),"(INFO) Vocк mudou a mensagem da sua casa para: %s", tmp); SendClientMessage(playerid,0xFFFFFFAA,string); dini_Set(str1, "Des", tmp); format(hInfo[playericonhouse[playerid]][Des],255, tmp); return 1; } return 0; } AddHouse(houseid, Float:iconX, Float:iconY, Float:iconZ, Float:interiorX, Float:interiorY, Float:interiorZ, Costa, Sella, Interiora, virtualworld) { new house[256]; format(house, sizeof(house), "Casas/Casaid%d",houseid); if(!dini_Exists(house)) { dini_Create(house); format(hInfo[houseid][Name], 24, "Ninguem"); dini_Set(house, "Name", "Ninguem"); format(hInfo[houseid][Renter], 24, "Ninguem"); dini_Set(house, "Renter", "Ninguem"); format(hInfo[houseid][Des], 80, "Nada"); dini_Set(house, "Des", "Nada"); format(hInfo[houseid][Login], 80, "00/00/0000"); dini_Set(house, "Login", "00/00/0000"); hInfo[houseid][Rentable] = 0; dini_IntSet(house, "Rentable", 0); hInfo[houseid][Rentcost] = 0; dini_IntSet(house, "TemDono", 0); dini_IntSet(house, "Rentcost", 0); hInfo[houseid][Cost] = Costa; dini_IntSet(house, "Cost", Costa); hInfo[houseid][Sell] = Sella; dini_IntSet(house, "Sell", Sella); dini_IntSet(house, "Casaid", houseid); hInfo[houseid][Casaid] = houseid; hInfo[houseid][Interior] = Interiora; dini_IntSet(house, "Interior", Interiora); dini_IntSet(house, "Virtualworld", virtualworld); hInfo[houseid][Virtualworld] = virtualworld; hInfo[houseid][Locked] = 0; dini_IntSet(house, "Locked", 0); hInfo[houseid][Carrof] = 0; dini_IntSet(house, "Carrof", 0); hInfo[houseid][InteriorX] = interiorX; hInfo[houseid][InteriorY] = interiorY; hInfo[houseid][InteriorZ] = interiorZ; dini_FloatSet(house, "X", interiorX); dini_FloatSet(house, "Y", interiorY); dini_FloatSet(house, "Z", interiorZ); dini_IntSet(house, "RentPay", 0); dini_IntSet(house, "RentGet", 0); cInfo[houseid][HouseCar] = 429; dini_IntSet(house, "HouseCar", 0); cInfo[houseid][CarModel] = 429; dini_IntSet(house, "CarModel", 0); cInfo[houseid][CarX] = 0; cInfo[houseid][CarY] = 0; cInfo[houseid][CarZ] = 0; cInfo[houseid][AnglE] = 0; dini_FloatSet(house, "CarX", 0); dini_FloatSet(house, "CarY", 0); dini_FloatSet(house, "CarZ", 0); dini_FloatSet(house, "Angle", 0); cInfo[houseid][CarColor1] = 0; cInfo[houseid][CarColor2] = 0; dini_IntSet(house, "CarColor1", 0); dini_IntSet(house, "CarColor2", 0); cInfo[houseid][Vc] = 0; dini_IntSet(house, "Vc", 0); cInfo[houseid][GotCar] = 0; } else { format(hInfo[houseid][Name], 24, dini_Get(house, "Name")); format(hInfo[houseid][Renter], 24, dini_Get(house, "Renter")); format(hInfo[houseid][Des], 80, dini_Get(house, "Des")); format(hInfo[houseid][Login], 80, dini_Get(house, "Login")); hInfo[houseid][Rentable] = dini_Int(house, "Rentable"); hInfo[houseid][TemDono] = dini_Int(house, "TemDono"); hInfo[houseid][Rentcost] = dini_Int(house, "Rentcost"); hInfo[houseid][Cost] = dini_Int(house, "Cost"); hInfo[houseid][Sell] = dini_Int(house, "Sell"); hInfo[houseid][Casaid] = dini_Int(house, "Casaid"); hInfo[houseid][Interior] = dini_Int(house, "Interior"); hInfo[houseid][Locked] = dini_Int(house, "Locked"); hInfo[houseid][Carrof] = dini_Int(house, "Carrof"); hInfo[houseid][InteriorX] = dini_Float(house, "X"); hInfo[houseid][InteriorY] = dini_Float(house, "Y"); hInfo[houseid][InteriorZ] = dini_Float(house, "Z"); hInfo[houseid][Virtualworld] = dini_Int(house, "Virtualworld"); } hInfo[houseid][iconx]=iconX; hInfo[houseid][icony]=iconY; hInfo[houseid][iconz]=iconZ; new string[222]; format(house, sizeof(house), "Casas/Casaid%d",houseid); if(dini_Int(house, "TemDono") == 0){ HousePickup[houseid] = CreatePickup(1273, 23, iconX, iconY, iconZ); format(string, sizeof(string), "Casa N° %d", dini_Int(house, "Casaid")); Create3DTextLabel(string,0xFFFFFFAA,iconX, iconY, iconZ+0.75,20.0,0,1); for(new i=0;i<MAX_PLAYERS;i++){ RemovePlayerMapIcon(i, housemapicon[i]); housemapicon[i] = SetPlayerMapIcon(i,32,hInfo[playericonhouse[i]][iconx], hInfo[playericonhouse[i]][icony], hInfo[playericonhouse[i]][iconz],32,Vermelho); } } else if(dini_Int(house, "TemDono") == 1){ HousePickup[houseid] = CreatePickup(1272, 23, iconX, iconY, iconZ); format(string, sizeof(string), "Casa N° %d", dini_Int(house, "Casaid")); Create3DTextLabel(string,0xFFFFFFAA,iconX, iconY, iconZ+0.75,20.0,0,1); for(new i=0;i<MAX_PLAYERS;i++){ RemovePlayerMapIcon(i, housemapicon[i]); housemapicon[i] = SetPlayerMapIcon(i,32,hInfo[playericonhouse[i]][iconx], hInfo[playericonhouse[i]][icony], hInfo[playericonhouse[i]][iconz],32,Vermelho); } } } AddHouseCar(houseid, modelid, Float:Carx, Float:Cary, Float:Carz, Float:Angle , color1, color2, respawn_delay) { new house[256]; format(house, sizeof(house), "Casas/Casaid%d",houseid); if(dini_Exists(house)) { cInfo[houseid][GotCar] = 1; if(dini_Int(house, "CarModel")==0) { dini_IntSet(house, "CarModel", modelid); cInfo[houseid][CarModel] = modelid; cInfo[houseid][CarX] = Carx; cInfo[houseid][CarY] = Cary; cInfo[houseid][CarZ] = Carz; cInfo[houseid][AnglE] = Angle; dini_FloatSet(house, "CarX", Carx); dini_FloatSet(house, "CarY", Cary); dini_FloatSet(house, "CarZ", Carz); dini_FloatSet(house, "Angle", Angle); cInfo[houseid][CarColor1] = color1; cInfo[houseid][CarColor2] = color2; dini_IntSet(house, "CarColor1", color1); dini_IntSet(house, "CarColor2", color2); dini_IntSet(house, "Respawn_Delay", respawn_delay); cInfo[houseid][Respawn_Delay] = respawn_delay; cInfo[houseid][HouseCar] = CreateVehicle(cInfo[houseid][CarModel], Carx, Cary, Carz, Angle, color1, color2, respawn_delay); } else { cInfo[houseid][CarModel] = dini_Int(house, "CarModel"); } cInfo[houseid][CarX] = dini_Int(house, "CarX"); cInfo[houseid][CarY] = dini_Int(house, "CarY"); cInfo[houseid][CarZ] = dini_Int(house, "CarZ"); cInfo[houseid][CarColor1] = dini_Int(house, "CarColor1"); cInfo[houseid][Vc] = dini_Int(house, "Vc"); cInfo[houseid][CarColor2] = dini_Int(house, "CarColor2"); cInfo[houseid][HouseCar] = CreateVehicle(cInfo[houseid][CarModel], Carx, Cary, Carz, Angle, color1, color2, respawn_delay); cInfo[houseid][AnglE] = dini_Int(house, "Angle"); } } public OnPlayerSpawn(playerid) { dentrocasa[playerid] = 0; } GetHouseStats(playerid, pickupid) { for(new i=0;i<MAX_HOUSES;i++) { if(pickupid==HousePickup[i]) { if(HOUSE_STATS==0) { new str2[256]; format(str2, sizeof(str2), "(INFO) Para entrar na casa: /entrarcasa ou pressione a tecla <ENTER>"); SendClientMessage(playerid, 0xFFFFFFAA, str2); inhousepickup[playerid] = GetTickCount(); playericonhouse[playerid] = i; } } } } dcmd_vendercasa(playerid,params[]) { #pragma unused params new timestamp = GetTickCount(); if(timestamp - inhousepickup[playerid] > 5000) { return 1; } new str1[256],pname[24]; GetPlayerName(playerid, pname, 24); new file[128], str2[256]; GetPlayerName(playerid, pname, sizeof(pname)); format(file, sizeof(file), PASTA_CONTAS, pname); format(str1, sizeof(str1), "Casas/Casaid%d", playericonhouse[playerid]); format(str2, sizeof(str2), "Casas/Usuarios/%s", hInfo[playericonhouse[playerid]][Name]); if (strcmp(hInfo[playericonhouse[playerid]][Name],pname,false)) return SendClientMessage(playerid, Vermelho, "(ERRO) Vocк nгo й dono dessa casa."); dini_Remove(str2); new string[128]; format(string,sizeof(string),"(CASA) Vocк vendeu a casa nъmero '%d'.", hInfo[playericonhouse[playerid]][Casaid]); SendClientMessage(playerid,0x1E90FFAA,string); dini_IntSet(file, "TemCasa", 0); dini_IntSet(file, "SaldoBancario", dini_Int(file, "SaldoBancario")+hInfo[playericonhouse[playerid]][Sell]); dini_Set(str1, "Name", "Ninguem"); dini_Set(str1, "Renter", "Ninguem"); dini_Set(str1, "Des", "Nada"); dini_Set(str1, "Login", "(00/00/0000)"); dini_IntSet(str1, "TemDono", 0); hInfo[playericonhouse[playerid]][Locked] = 0; format(hInfo[playericonhouse[playerid]][Name],255,"Ninguem"); format(hInfo[playericonhouse[playerid]][Renter],255,"Ninguem"); format(hInfo[playericonhouse[playerid]][Des],255,"Nada"); format(hInfo[playericonhouse[playerid]][Login],255,"(0/0/0000)"); new nome[MAX_PLAYER_NAME]; GetPlayerName(playerid, nome, sizeof(nome)); format(str1, sizeof(str1), "Casas/Usuarios/%s", nome); if (!dini_Exists(str1)) dini_Create(str1); dini_IntSet(str1, "Houseid", -255); DestroyPickup(HousePickup[playericonhouse[playerid]]); HousePickup[playericonhouse[playerid]] = CreatePickup(1273, 23, hInfo[playericonhouse[playerid]][iconx], hInfo[playericonhouse[playerid]][icony], hInfo[playericonhouse[playerid]][iconz]); format(str1, sizeof(str1), "(CASA) O jogador %s, vendeu a sua casa nъmero '%d'.",pname ,hInfo[playericonhouse[playerid]][Casaid]); cInfo[playericonhouse[playerid]][Vcasa] = 1; SendClientMessageToAll(0xFFFFFFAA,str1); for(new i=0;i<MAX_PLAYERS;i++){ RemovePlayerMapIcon(i, housemapicon[i]); housemapicon[playerid] = SetPlayerMapIcon(i,32,hInfo[playericonhouse[i]][iconx], hInfo[playericonhouse[i]][icony], hInfo[playericonhouse[i]][iconz],31,Vermelho); } return 1; } dcmd_removermorador(playerid,params[]) { #pragma unused params new timestamp = GetTickCount(); if(timestamp - inhousepickup[playerid] > 5000) { return 1; } new str1[256],pname[24], morador[256]; GetPlayerName(playerid, pname, 24); format(str1, sizeof(str1), "Casas/Casaid%d", playericonhouse[playerid]); if (strcmp(hInfo[playericonhouse[playerid]][Name],pname,false)) return SendClientMessage(playerid, Vermelho, "(ERRO) Vocк nгo й dono dessa casa."); morador = dini_Get(str1, "Renter"); dini_Set(str1, "Renter", "Ninguem"); format(hInfo[playericonhouse[playerid]][Renter],255,"Ninguem"); new string[128]; format(string,sizeof(string),"(CASA) Vocк removou o jogador %s de morador de sua casa nъmero %d", morador, hInfo[playericonhouse[playerid]][Casaid]); SendClientMessage(playerid,0x1E90FFAA,string); return 1; } dcmd_liberarcasa(playerid,params[]) { #pragma unused params new timestamp = GetTickCount(); if(timestamp - inhousepickup[playerid] > 5000) { return 1; } new str1[256],pname[24], dono[256]; GetPlayerName(playerid, pname, 24); new file[128], str2[256]; GetPlayerName(playerid, pname, sizeof(pname)); format(file, sizeof(file), PASTA_CONTAS, pname); format(str1, sizeof(str1), "Casas/Casaid%d", playericonhouse[playerid]); for(new i=0; i<MAX_PLAYERS; i++) if(IsPlayerConnected(i)){ if(IsPlayerAdmin(i)){ dono = dini_Get(str1, "Name"); format(str2, sizeof(str2), "Casas/Usuarios/%s", dono); new string[128]; format(string,sizeof(string),"(INFO) Vocк liberou a casa nъmero %d que pertencia ao jogador %s",hInfo[playericonhouse[playerid]][Casaid], dono); SendClientMessage(playerid,0x1E90FFAA,string); dini_Remove(str2); dini_Set(str1, "Name", "Ninguem"); dini_IntSet(str1, "TemDono", 0); format(hInfo[playericonhouse[playerid]][Name],255,"Ninguem"); format(hInfo[playericonhouse[playerid]][Renter],255,"Ninguem"); format(hInfo[playericonhouse[playerid]][Des],255,"Nada"); format(hInfo[playericonhouse[playerid]][Login],255,"(0/0/0000)"); hInfo[playericonhouse[playerid]][Locked] = 0; format(hInfo[playericonhouse[playerid]][Name],255,"Ninguem"); DestroyPickup(HousePickup[playericonhouse[playerid]]); HousePickup[playericonhouse[playerid]] = CreatePickup(1273, 23, hInfo[playericonhouse[playerid]][iconx], hInfo[playericonhouse[playerid]][icony], hInfo[playericonhouse[playerid]][iconz]); RemovePlayerMapIcon(playerid, housemapicon[playerid]); format(str1, sizeof(str1), "(CASA) O administrador %s, liberou a casa nъmero '%d'.",pname,hInfo[playericonhouse[playerid]][Casaid]); cInfo[playericonhouse[playerid]][Vcasa] = 1; SendClientMessageToAll(0xFFFFFFAA,str1); } } else { } return 1; } dcmd_comprarcasa(playerid,params[]) { #pragma unused params new timestamp = GetTickCount(); if(timestamp - inhousepickup[playerid] > 5000) { SendClientMessage(playerid, Vermelho, "(ERRO) Vocк nгo estб em uma casa."); return 1; } new str[255],str1[255],pname[24]; GetPlayerName(playerid, pname, 24); format(str1, sizeof(str1), "Casas/Usuarios/%s", udb_encode(pname)); new file[128]; GetPlayerName(playerid, pname, sizeof(pname)); format(file, sizeof(file), PASTA_CONTAS, pname); new grana; grana = dini_Int(file, "SaldoBancario"); dini_IntSet(file, "TemCasa", 0); if(dini_Exists(str1)) { if (dini_Int(str1, "Houseid")!=-255) return SendClientMessage(playerid, Vermelho, "(ERRO) Vocк jб tem uma casa."); } format(str1, sizeof(str1), "Casas/Casaid%d", playericonhouse[playerid]); if (strcmp(hInfo[playericonhouse[playerid]][Name],"Ninguem",true)) return SendClientMessage(playerid, Vermelho, "(ERRO) Esta casa jб tem dono."); if(grana > hInfo[playericonhouse[playerid]][Cost]){ format(str,sizeof(str),"(CASA) Vocк comprou a casa nъmero '%d'.", hInfo[playericonhouse[playerid]][Casaid]); SendClientMessage(playerid,0x1E90FFAA,str); print(str); dini_IntSet(str1, "TemDono", 1); new ano,mes,dia; new string[266]; getdate(ano, mes, dia); format(string, sizeof(string), " (%d/%d/%d)", dia,mes,ano); dini_Set(str1, "Login", string); format(hInfo[playericonhouse[playerid]][Login],255, string); dini_IntSet(file, "SaldoBancario", dini_Int(file, "SaldoBancario")-hInfo[playericonhouse[playerid]][Cost]); dini_Set(str1, "Name", pname); hInfo[playericonhouse[playerid]][Name]=pname; hInfo[playericonhouse[playerid]][Locked] = 0; new nome[MAX_PLAYER_NAME]; GetPlayerName(playerid, nome, sizeof(nome)); format(str1, sizeof(str1), "Casas/Usuarios/%s", nome); if (!dini_Exists(str1)) dini_Create(str1); new Floaty, Floatx, Floatz; dini_IntSet(str1, "Houseid", playericonhouse[playerid]); if(!dini_Isset(str1,"Rentid")) { dini_IntSet(str1, "Rentid", -255); } GetPlayerPos(playerid, sx,sy,sz); dini_FloatSet(str1, "SpawnX", sx); dini_FloatSet(str1, "SpawnY", sy); dini_FloatSet(str1, "SpawnZ", sz); dini_IntSet(str1, "SpawnInt", GetPlayerInterior(playerid)); dini_IntSet(str1, "Luz", 0); dini_IntSet(str1, "Agua", 0); DestroyPickup(HousePickup[playericonhouse[playerid]]); HousePickup[playericonhouse[playerid]] = CreatePickup(1272, 23, hInfo[playericonhouse[playerid]][iconx], hInfo[playericonhouse[playerid]][icony], hInfo[playericonhouse[playerid]][iconz]); format(str1, sizeof(str1), "(CASA) O jogador %s, comprou a casa nъmero '%d'.",pname,hInfo[playericonhouse[playerid]][Casaid]); SendClientMessageToAll(0xFFFFFFAA,str1); for(new i=0;i<MAX_PLAYERS;i++){ RemovePlayerMapIcon(i, housemapicon[playerid]); housemapicon[playerid] = SetPlayerMapIcon(i,32,hInfo[playericonhouse[playerid]][iconx], hInfo[playericonhouse[playerid]][icony], hInfo[playericonhouse[playerid]][iconz],32,Vermelho); } } else { SendClientMessage(playerid, Vermelho,"(ERRO) Vocк nгo tem esse dinheiro em seu banco."); } return 1; } dcmd_fecharcasa(playerid,params[]) { #pragma unused params new timestamp = GetTickCount(); if(timestamp - inhousepickup[playerid] > 5000) { SendClientMessage(playerid, Vermelho, "(ERRO) Vocк nгo estб em uma casa."); return 1; } new str1[256],pname[24]; GetPlayerName(playerid, pname, 24); format(str1, sizeof(str1), "Casas/Casaid%d", playericonhouse[playerid]); if(strcmp(hInfo[playericonhouse[playerid]][Name],pname,true)==0) { SendClientMessage(playerid, 0x00B7B7AA, "(INFO) Vocк trancou sua casa com sucesso!"); dini_IntSet(str1,"Locked",1); hInfo[playericonhouse[playerid]][Locked] = 1; new ano,mes,dia; new string[266]; getdate(ano, mes, dia); format(string, sizeof(string), " (%d/%d/%d)", dia,mes,ano); dini_Set(str1, "Login", string); format(hInfo[playericonhouse[playerid]][Login],255, string); } else if(strcmp(hInfo[playericonhouse[playerid]][Renter],pname,true)==0) { SendClientMessage(playerid, 0x00B7B7AA, "(INFO) Casa trancada com sucesso!"); dini_IntSet(str1,"Locked",1); hInfo[playericonhouse[playerid]][Locked] = 1; } else { SendClientMessage(playerid, Vermelho, "(ERRO) Vocк nгo й dono dessa casa."); } return 1; } dcmd_impostos(playerid,params[]) { #pragma unused params new timestamp = GetTickCount(); if(timestamp - inhousepickup[playerid] > 5000) { SendClientMessage(playerid, Vermelho, "(ERRO) Vocк nгo estб em uma casa."); return 1; } new str1[256],pname[24]; GetPlayerName(playerid, pname, 24); format(str1, sizeof(str1), "Casas/Casaid%d", playericonhouse[playerid]); if(strcmp(hInfo[playericonhouse[playerid]][Name],pname,true)==0) { SendClientMessage(playerid, 0xB9B900AA, "~~~~~~~~~~~~~~ Impostos ~~~~~~~~~~~~~~"); format(str1, sizeof(str1), "(INFO) Luz: %d,00 R$", dini_Int(str1, "Luz")); SendClientMessage(playerid, 0xFFFFFFAA, str1); format(str1, sizeof(str1), "(INFO) Бgua: %d,00 R$", dini_Int(str1, "Agua")); SendClientMessage(playerid, 0xFFFFFFAA, str1); SendClientMessage(playerid, 0xB9B900AA, "(INFO) IPTU: 13,00 R$"); SendClientMessage(playerid, 0xB9B900AA, "~~~~~~~~~~~~~~ Impostos ~~~~~~~~~~~~~~"); } return 1; } dcmd_abrircasa(playerid,params[]) { #pragma unused params new timestamp = GetTickCount(); if(timestamp - inhousepickup[playerid] > 5000) { SendClientMessage(playerid, Vermelho, "(ERRO) Vocк nгo й dono dessa casa."); return 1; } new str1[256],pname[24]; GetPlayerName(playerid, pname, 24); format(str1, sizeof(str1), "Casas/Casaid%d", playericonhouse[playerid]); if(strcmp(hInfo[playericonhouse[playerid]][Name],pname,true)==0) { SendClientMessage(playerid, 0x00B7B7AA, "(INFO) Vocк destrancou sua casa com sucesso!"); dini_IntSet(str1,"Locked",0); hInfo[playericonhouse[playerid]][Locked] = 0; new ano,mes,dia; new string[266]; getdate(ano, mes, dia); format(string, sizeof(string), " (%d/%d/%d)", dia,mes,ano); dini_Set(str1, "Login", string); format(hInfo[playericonhouse[playerid]][Login],255, string); } else if(strcmp(hInfo[playericonhouse[playerid]][Renter],pname,true)==0) { SendClientMessage(playerid, 0x00B7B7AA, "(INFO) Casa destrancada com sucesso!"); dini_IntSet(str1,"Locked",0); hInfo[playericonhouse[playerid]][Locked] = 0; } else { SendClientMessage(playerid, Vermelho, "(ERRO) Vocк nгo й dono dessa casa."); } return 1; } dcmd_setaluguel(playerid,params[]) { new timestamp = GetTickCount(); if(timestamp - inhousepickup[playerid] > 5000) { SendClientMessage(playerid, Vermelho, "(ERRO) Vocк nгo й dono dessa casa."); return 1; } new str[256],str1[256],pname[24]; GetPlayerName(playerid, pname, 24); format(str1, sizeof(str1), "Casas/Casaid%d", playericonhouse[playerid]); str = dini_Get(str1,"Name"); if (strcmp(str,pname,true)) return SendClientMessage(playerid, Vermelho, "(ERRO) Vocк nгo й dono dessa casa."); new rentcost, rentable; if (sscanf(params, "d", rentable)) return SendClientMessage(playerid, Vermelho, "Uso: /setaluguel (0/1)"); else if(rentable==1) { SendClientMessage(playerid, 0x548B54AA, "(INFO) Sua casa agora estб disponнvel para alugar."); hInfo[playericonhouse[playerid]][Rentable] = 1; dini_IntSet(str1, "Rentable", 1); dini_IntSet(str1, "Carrof", 1); hInfo[playericonhouse[playerid]][Rentcost] = rentcost; dini_IntSet(str1, "Rentcost", rentcost); return 1; } else if(rentable==0) { SendClientMessage(playerid, 0x548B54AA, "(INFO) Sua casa nгo estб mais disponнvel para aluguel."); hInfo[playericonhouse[playerid]][Rentable] = 0; dini_IntSet(str1, "Rentable", 0); hInfo[playericonhouse[playerid]][Rentcost] = rentcost; dini_IntSet(str1, "Rentcost", rentcost); return 1; } return 1; } dcmd_alugarcasa(playerid,params[]) { #pragma unused params new timestamp = GetTickCount(); if(timestamp - inhousepickup[playerid] > 5000) { SendClientMessage(playerid, Vermelho, "(ERRO) Vocк nгo estб em uma casa."); return 1; } new str[255],str1[256],str5[255],pname[24]; GetPlayerName(playerid, pname, 24); format(str1, sizeof(str1), "Casas/Casaid%d", playericonhouse[playerid]); format(str5, sizeof(str5), "Casas/Usuarios/%s", udb_encode(pname)); if(dini_Isset(str5, "Rentid")) { if (dini_Int(str5, "Rentid")!=-255) return SendClientMessage(playerid, Vermelho, "(ERRO) Vocк sу pode alugar uma casa."); } format(str, sizeof(str), dini_Get(str1,"Name")); if (strcmp(str,"Ninguem",true)==0) return SendClientMessage(playerid, Vermelho, "(ERRO) Essa casa nгo tem dono."); if(hInfo[playericonhouse[playerid]][Rentable]==0) return SendClientMessage(playerid, Vermelho, "(ERRO) Essa casa nгo estб disponнvel para aluguel."); if(GetPlayerMoney(playerid)<hInfo[playericonhouse[playerid]][Rentcost]) return SendClientMessage(playerid, Vermelho, "(ERRO) Vocк nгo tem dinheiro suficiente para alugar essa casa."); dini_Set(str1, "Renter", udb_encode(pname)); format(hInfo[playericonhouse[playerid]][Renter], 24, udb_encode(pname)); dini_IntSet(str5, "Rentid", playericonhouse[playerid]); format(str1, sizeof(str1), "Casas/Usuarios/%s", udb_encode(pname)); if (!dini_Exists(str1)) dini_Create(str1); new Floaty, Floatx, Floatz; dini_IntSet(str1, "Houseid", playericonhouse[playerid]); if(!dini_Isset(str1,"Rentid")) { dini_IntSet(str1, "Rentid", -255); } new alugou[128]; GetPlayerPos(playerid, sx,sy,sz); dini_FloatSet(str1, "SpawnX", sx); dini_FloatSet(str1, "SpawnY", sy); dini_FloatSet(str1, "SpawnZ", sz); dini_IntSet(str1, "SpawnInt", GetPlayerInterior(playerid)); format(alugou, sizeof(alugou), "(INFO) Vocк alugou a casa nъmero %d, do jogador %s", hInfo[playericonhouse[playerid]], hInfo[playericonhouse[playerid]][Name]); SendClientMessage(playerid, 0x00B7B7AA, alugou); return 1; } dcmd_desalugarcasa(playerid,params[]) { #pragma unused params new timestamp = GetTickCount(); if(timestamp - inhousepickup[playerid] > 5000) { SendClientMessage(playerid, Vermelho, "(ERRO) Vocк nгo estб em um нcone de casa."); return 1; } new str1[256],pname[24]; GetPlayerName(playerid, pname, 24); format(str1, sizeof(str1), "Casas/Casaid%d", playericonhouse[playerid]); if(strcmp(hInfo[playericonhouse[playerid]][Renter], pname, true)) return SendClientMessage(playerid, Vermelho, "(ERRO) Vocк nгo estб alugando esta casa!"); new desalugou[128]; dini_Set(str1, "Renter", "Ninguem"); format(hInfo[playericonhouse[playerid]][Renter], 24, "Ninguem"); format(str1, sizeof(str1), "Casas/Usuarios/%s", udb_encode(pname)); dini_IntSet(str1, "Rentid", -255); SendClientMessage(playerid, 0x00B7B7AA, "(INFO) Vocк desalugou esta casa."); if (!dini_Exists(str1)) dini_Create(str1); dini_IntSet(str1, "Houseid", -255); format(desalugou, sizeof(desalugou), "(INFO) Vocк desalugou a casa nъmero %d, do jogador %s", hInfo[playericonhouse[playerid]], hInfo[playericonhouse[playerid]][Name]); SendClientMessage(playerid, 0x548B54AA, desalugou); return 1; } dcmd_comandoscasa(playerid,params[]) { #pragma unused params SendClientMessage(playerid, 0x8B7500AA, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"); SendClientMessage(playerid, 0xFFFFFFAA, "[»] /infocasa || /setaluguel"); SendClientMessage(playerid, 0xFFFFFFAA, "[»] /comprarcasa || /vendercasa"); SendClientMessage(playerid, 0xFFFFFFAA, "[»] /fecharcasa || /abrircasa"); SendClientMessage(playerid, 0xFFFFFFAA, "[»] /desalugarcasa || /alugarcasa"); SendClientMessage(playerid, 0x8B7500AA, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"); return 1; } dcmd_comandosveiculocasa(playerid,params[]) { #pragma unused params SendClientMessage(playerid, 0x8B7500AA, "~~~~~~~~~~~~~~~~~~~~~~"); SendClientMessage(playerid, 0xFFFFFFAA, "[»] /respawnveiculo"); SendClientMessage(playerid, 0xFFFFFFAA, "[»] /veiculocasa"); SendClientMessage(playerid, 0xFFFFFFAA, "[»] /tunarveiculocasa"); SendClientMessage(playerid, 0x8B7500AA, "~~~~~~~~~~~~~~~~~~~~~~"); return 1; } dcmd_infocasa(playerid,params[]) { #pragma unused params new timestamp = GetTickCount(); if(timestamp - inhousepickup[playerid] > 5000) { SendClientMessage(playerid, Vermelho, "(ERRO) Vocк nгo estб em uma casa."); return 1; } new str[256], nome[MAX_PLAYER_NAME]; format(str, sizeof(str), "~~~~~~~~~~~~~~~ Nъmero: %d ~~~~~~~~~~~~~~~", hInfo[playericonhouse[playerid]][Casaid]); SendClientMessage(playerid, 0x836FFFAA, str); format(str, sizeof(str), "(INFO) Propriйtario: %s", hInfo[playericonhouse[playerid]][Name]); SendClientMessage(playerid, 0xFFFFFFAA, str); format(str, sizeof(str), "(INFO) Valor: R$%d", hInfo[playericonhouse[playerid]][Cost]); SendClientMessage(playerid, 0xFFFFFFAA, str); format(str, sizeof(str), "(INFO) Morador: %s", hInfo[playericonhouse[playerid]][Renter]); SendClientMessage(playerid, 0xFFFFFFAA, str); format(str, sizeof(str), "(INFO) Mensagem: %s", hInfo[playericonhouse[playerid]][Des]); SendClientMessage(playerid, 0xFFFFFFAA, str); format(str, sizeof(str), "(INFO) Ъltimo login do dono: %s", hInfo[playericonhouse[playerid]][Login]); SendClientMessage(playerid, 0xFFFFFFAA, str); format(str, sizeof(str), "~~~~~~~~~~~~~~~ Nъmero: %d ~~~~~~~~~~~~~~~", hInfo[playericonhouse[playerid]][Casaid]); SendClientMessage(playerid, 0x836FFFAA, str); GetPlayerName(playerid, nome, sizeof(nome)); return 1; } dcmd_veiculocasa(playerid,params[]) { #pragma unused params new timestamp = GetTickCount(); if(timestamp - inhousepickup[playerid] > 5000) { SendClientMessage(playerid, Vermelho, "(ERRO) Vocк nгo estб em uma casa."); return 1; } new pname[24]; GetPlayerName(playerid, pname, 24); if(cInfo[playericonhouse[playerid]][GotCar]==0) return SendClientMessage(playerid, Vermelho, "(ERRO) Estб casa nгo tem veнculo."); if(strcmp(hInfo[playericonhouse[playerid]][Name],pname,true)==0) { new carname[40]; if (sscanf(params, "s", carname)) { SendClientMessage(playerid, 0x6495EDAA, "Uso: /veiculocasa [nome do veнculo]"); } else { new str[256], abc; for(new i=0;i<MAX_BUY_CARS;i++) { if(strcmp(carname,Buyable_Cars[i][CarName],true)==0) { if(GetPlayerMoney(playerid)<Buyable_Cars[i][CarCost]) return SendClientMessage(playerid, Vermelho, "(ERRO) Vocк nгo tem esse dinheiro."); GivePlayerMoney(playerid, -Buyable_Cars[i][CarCost]); cInfo[playericonhouse[playerid]][CarModel] = Buyable_Cars[i][CarModel]; format(str, sizeof(str), "Casas/Casaid%d", playericonhouse[playerid]); dini_IntSet(str, "CarModel", Buyable_Cars[i][CarModel]); format(str, sizeof(str), "(INFO) Vocк colocou o veнculo %s como veнculo de sua casa.", carname); SendClientMessage(playerid, 0x8FBC8FAA, str); new ano,mes,dia; new string[266]; getdate(ano, mes, dia); format(string, sizeof(string), " (%d/%d/%d)", dia,mes,ano); dini_Set(str, "Login", string); format(hInfo[playericonhouse[playerid]][Login],255, string); cInfo[playericonhouse[playerid]][NewCar] = 1; abc = 1; } } if(abc==0) { SendClientMessage(playerid, Vermelho, "(ERRO) Este veнculo nгo estб disponнvel para veнculo casa."); abc=0; } } } else { SendClientMessage(playerid, Vermelho, "(ERRO) Vocк nгo й dono dessa casa."); } return 1; } dcmd_respawnveiculo(playerid,params[]) { #pragma unused params new timestamp = GetTickCount(); if(timestamp - inhousepickup[playerid] > 5000) { SendClientMessage(playerid, Vermelho, "(ERRO) Vocк nгo estб em uma casa."); return 1; } new str1[256],pname[24]; GetPlayerName(playerid, pname, 24); format(str1, sizeof(str1), "Casas/Casaid%d", playericonhouse[playerid]); if (strcmp(hInfo[playericonhouse[playerid]][Name],pname,false)) return SendClientMessage(playerid, Vermelho, "(ERRO) Vocк nгo й dono dessa casa."); SendClientMessage(playerid, 0x00B7B7AA, "(INFO) O veнculo de sua casa foi respawnado com sucesso!"); cInfo[playericonhouse[playerid]][Rv] = 1; return 1; } dcmd_tunarveiculocasa(playerid,params[]) { #pragma unused params new timestamp = GetTickCount(); if(timestamp - inhousepickup[playerid] > 5000) { SendClientMessage(playerid, Vermelho, "(ERRO) Vocк nгo estб em uma casa."); return 1; } new str1[256],pname[24]; GetPlayerName(playerid, pname, 24); format(str1, sizeof(str1), "Casas/Casaid%d", playericonhouse[playerid]); if (strcmp(hInfo[playericonhouse[playerid]][Name],pname,false)) return SendClientMessage(playerid, Vermelho, "(ERRO) Vocк nгo й dono dessa casa."); new ano,mes,dia; new string[266]; getdate(ano, mes, dia); format(string, sizeof(string), " (%d/%d/%d)", dia,mes,ano); dini_Set(str1, "Login", string); format(hInfo[playericonhouse[playerid]][Login],255, string); ShowMenuForPlayer(Tuning, playerid); TogglePlayerControllable(playerid,0); return 1; } dcmd_entrarcasa(playerid,params[]) { #pragma unused params new timestamp = GetTickCount(); if(timestamp - inhousepickup[playerid] > 3000) { SendClientMessage(playerid, Vermelho, "(ERRO) Vocк nгo estб em uma casa."); return 1; } new str1[255],pname[24]; new str[255]; GetPlayerPos(playerid, housex, housey, housez); format(str1, sizeof(str1), "Casas/Casaid%d", playericonhouse[playerid]); GetPlayerName(playerid, pname, 24); if(strcmp(hInfo[playericonhouse[playerid]][Name],pname,true)==0){ playerworld[playerid] = GetPlayerVirtualWorld(playerid); SetPlayerVirtualWorld(playerid, hInfo[playericonhouse[playerid]][Virtualworld]); SetPlayerInterior(playerid, hInfo[playericonhouse[playerid]][Interior]); SetPlayerPos(playerid, hInfo[playericonhouse[playerid]][InteriorX], hInfo[playericonhouse[playerid]][InteriorY], hInfo[playericonhouse[playerid]][InteriorZ]); playerinterior[playerid] = hInfo[playericonhouse[playerid]][Interior]; dentrocasa[playerid] = 1; new casa[266]; format(casa, sizeof(casa), "Casas/Usuarios/%s", udb_encode(pname)); dini_IntSet(casa, "Luz", dini_Int(casa, "Luz")+11); format(casa, sizeof(casa), "Casas/Usuarios/%s", udb_encode(pname)); dini_IntSet(casa, "Agua", dini_Int(casa, "Agua")+3); format(str, sizeof(str), "(INFO) Bem vindo(a) б casa nъmero '%d'.", hInfo[playericonhouse[playerid]][Casaid]); SendClientMessage(playerid, 0xFFFFFFAA, str); return 1; } if(hInfo[playericonhouse[playerid]][Locked]==1){ SendClientMessage(playerid, Vermelho, "(ERRO) Esta casa estб trancada, apenas o dono pode entrar."); return 1; } playerworld[playerid] = GetPlayerVirtualWorld(playerid); SetPlayerVirtualWorld(playerid, hInfo[playericonhouse[playerid]][Virtualworld]); SetPlayerInterior(playerid, hInfo[playericonhouse[playerid]][Interior]); SetPlayerPos(playerid, hInfo[playericonhouse[playerid]][InteriorX], hInfo[playericonhouse[playerid]][InteriorY], hInfo[playericonhouse[playerid]][InteriorZ]); playerinterior[playerid] = hInfo[playericonhouse[playerid]][Interior]; dentrocasa[playerid] = 1; format(str, sizeof(str), "(INFO) Bem vindo(a) б casa nъmero '%d'.", hInfo[playericonhouse[playerid]][Casaid]); SendClientMessage(playerid, 0xFFFFFFAA, str); return 1; } dcmd_saircasa(playerid,params[]) { #pragma unused params if(dentrocasa[playerid] == 1){ if(GetPlayerInterior(playerid)==playerinterior[playerid]) { SetPlayerPos(playerid, housex, housey, housez); SetPlayerInterior(playerid, playerworld[playerid]); dentrocasa[playerid] = 0; new str[255]; format(str, sizeof(str), "(INFO) Vocк saiu da casa nъmero '%d'.", hInfo[playericonhouse[playerid]][Casaid]); SendClientMessage(playerid, 0xFFFFFFAA, str); } else { } } return 1; } public vcasa() { for(new carid=0;carid<MAX_HOUSES;carid++) { if(cInfo[carid][Vcasa]==1) { cInfo[carid][Vcasa]=0; DestroyVehicle(cInfo[carid][HouseCar]); } } } public newcar() { for(new carid=0;carid<MAX_HOUSES;carid++) { if(cInfo[carid][NewCar]==1) { cInfo[carid][NewCar]=0; KillVehicle(cInfo[carid][HouseCar]); DestroyVehicle(cInfo[carid][HouseCar]); cInfo[carid][HouseCar] = CreateVehicle(cInfo[carid][CarModel], cInfo[carid][CarX], cInfo[carid][CarY], cInfo[carid][CarZ], cInfo[carid][AnglE], cInfo[carid][CarColor1], cInfo[carid][CarColor2], cInfo[carid][Respawn_Delay]); } } } public rv() { for(new carid=0;carid<MAX_HOUSES;carid++) { if(cInfo[carid][Rv]==1) { cInfo[carid][Rv]=0; SetVehicleToRespawn(cInfo[carid][HouseCar]); } } } public tunar() { for(new car=0;car<MAX_HOUSES;car++) { if(cInfo[car][Tunar]==1) { cInfo[car][Tunar]=0; AddVehicleComponent(cInfo[car][HouseCar],1079); } } } public tunar2() { for(new car=0;car<MAX_HOUSES;car++) { if(cInfo[car][Tunar2]==1) { cInfo[car][Tunar2]=0; AddVehicleComponent(cInfo[car][HouseCar],1080); } } } public tunar3() { for(new car=0;car<MAX_HOUSES;car++) { if(cInfo[car][Tunar3]==1) { cInfo[car][Tunar3]=0; AddVehicleComponent(cInfo[car][HouseCar],1076); } } } public tunar4() { for(new car=0;car<MAX_HOUSES;car++) { if(cInfo[car][Tunar4]==1) { cInfo[car][Tunar4]=0; AddVehicleComponent(cInfo[car][HouseCar],1074); } } } public tunar5() { for(new car=0;car<MAX_HOUSES;car++) { if(cInfo[car][Tunar5]==1) { cInfo[car][Tunar5]=0; AddVehicleComponent(cInfo[car][HouseCar],1082); } } } public cor1() { for(new ca=0;ca<MAX_HOUSES;ca++) { if(cInfo[ca][Cor1]==1) { cInfo[ca][Cor1]=0; ChangeVehicleColor(cInfo[ca][HouseCar],3,3); } } } public cor2() { for(new cari=0;cari<MAX_HOUSES;cari++) { if(cInfo[cari][Cor2]==1) { cInfo[cari][Cor2]=0; ChangeVehicleColor(cInfo[cari][HouseCar],6,6); } } } public cor3() { for(new car=0;car<MAX_HOUSES;car++) { if(cInfo[car][Cor3]==1) { cInfo[car][Cor3]=0; ChangeVehicleColor(cInfo[car][HouseCar],157,157); } } } public cor4() { for(new car=0;car<MAX_HOUSES;car++) { if(cInfo[car][Cor4]==1) { cInfo[car][Cor4]=0; ChangeVehicleColor(cInfo[car][HouseCar],126,126); } } } public cor5() { for(new car=0;car<MAX_HOUSES;car++) { if(cInfo[car][Cor5]==1) { cInfo[car][Cor5]=0; ChangeVehicleColor(cInfo[car][HouseCar],300,300); } } } public cor6() { for(new car=0;car<MAX_HOUSES;car++) { if(cInfo[car][Cor6]==1) { cInfo[car][Cor6]=0; ChangeVehicleColor(cInfo[car][HouseCar],1,1); } } } public cor7() { for(new car=0;car<MAX_HOUSES;car++) { if(cInfo[car][Cor7]==1) { cInfo[car][Cor7]=0; ChangeVehicleColor(cInfo[car][HouseCar],0,0); } } } public cor8() { for(new car=0;car<MAX_HOUSES;car++) { if(cInfo[car][Cor8]==1) { cInfo[car][Cor8]=0; ChangeVehicleColor(cInfo[car][HouseCar],7,7); } } } public tunar6() { for(new car=0;car<MAX_HOUSES;car++) { if(cInfo[car][Tunar6]==1) { cInfo[car][Tunar6]=0; ChangeVehiclePaintjob(cInfo[car][HouseCar],0); } } } public tunar7() { for(new car=0;car<MAX_HOUSES;car++) { if(cInfo[car][Tunar7]==1) { cInfo[car][Tunar7]=0; ChangeVehiclePaintjob(cInfo[car][HouseCar],1); } } } public tunar8() { for(new car=0;car<MAX_HOUSES;car++) { if(cInfo[car][Tunar8]==1) { cInfo[car][Tunar8]=0; ChangeVehiclePaintjob(cInfo[car][HouseCar],2); } } } public tunar9() { for(new car=0;car<MAX_HOUSES;car++) { if(cInfo[car][Tunar9]==1) { cInfo[car][Tunar9]=0; AddVehicleComponent(cInfo[car][HouseCar],1010); } } } public tunar10() { for(new car=0;car<MAX_HOUSES;car++) { if(cInfo[car][Tunar10]==1) { cInfo[car][Tunar10]=0; AddVehicleComponent(cInfo[car][HouseCar],1087); } } } public aero1() { for(new car=0;car<MAX_HOUSES;car++) { if(cInfo[car][Aero1]==1) { cInfo[car][Aero1]=0; AddVehicleComponent(cInfo[car][HouseCar],1147); AddVehicleComponent(cInfo[car][HouseCar],1049); AddVehicleComponent(cInfo[car][HouseCar],1162); AddVehicleComponent(cInfo[car][HouseCar],115; AddVehicleComponent(cInfo[car][HouseCar],113; AddVehicleComponent(cInfo[car][HouseCar],1164); } } } public aero2() { for(new car=0;car<MAX_HOUSES;car++) { if(cInfo[car][Aero2]==1) { cInfo[car][Aero2]=0; AddVehicleComponent(cInfo[car][HouseCar],1146); AddVehicleComponent(cInfo[car][HouseCar],1150); AddVehicleComponent(cInfo[car][HouseCar],115; AddVehicleComponent(cInfo[car][HouseCar],1060); AddVehicleComponent(cInfo[car][HouseCar],1139); AddVehicleComponent(cInfo[car][HouseCar],1163); } } } public saias1() { for(new car=0;car<MAX_HOUSES;car++) { if(cInfo[car][Saias1]==1) { cInfo[car][Saias1]=0; AddVehicleComponent(cInfo[car][HouseCar],1171); AddVehicleComponent(cInfo[car][HouseCar],1153); AddVehicleComponent(cInfo[car][HouseCar],1160); AddVehicleComponent(cInfo[car][HouseCar],1155); AddVehicleComponent(cInfo[car][HouseCar],1169); AddVehicleComponent(cInfo[car][HouseCar],1166); AddVehicleComponent(cInfo[car][HouseCar],1149); AddVehicleComponent(cInfo[car][HouseCar],1150); AddVehicleComponent(cInfo[car][HouseCar],1159); AddVehicleComponent(cInfo[car][HouseCar],1154); AddVehicleComponent(cInfo[car][HouseCar],1141); AddVehicleComponent(cInfo[car][HouseCar],116; AddVehicleComponent(cInfo[car][HouseCar],1036); AddVehicleComponent(cInfo[car][HouseCar],1040); AddVehicleComponent(cInfo[car][HouseCar],1047); AddVehicleComponent(cInfo[car][HouseCar],1051); AddVehicleComponent(cInfo[car][HouseCar],1069); AddVehicleComponent(cInfo[car][HouseCar],1071); AddVehicleComponent(cInfo[car][HouseCar],1056); AddVehicleComponent(cInfo[car][HouseCar],1062); AddVehicleComponent(cInfo[car][HouseCar],1026); AddVehicleComponent(cInfo[car][HouseCar],1027); AddVehicleComponent(cInfo[car][HouseCar],1090); AddVehicleComponent(cInfo[car][HouseCar],1094); } } } public saias2() { for(new car=0;car<MAX_HOUSES;car++) { if(cInfo[car][Saias2]==1) { cInfo[car][Saias2]=0; AddVehicleComponent(cInfo[car][HouseCar],1172); AddVehicleComponent(cInfo[car][HouseCar],1152); AddVehicleComponent(cInfo[car][HouseCar],1173); AddVehicleComponent(cInfo[car][HouseCar],1157); AddVehicleComponent(cInfo[car][HouseCar],1170); AddVehicleComponent(cInfo[car][HouseCar],1165); AddVehicleComponent(cInfo[car][HouseCar],114; AddVehicleComponent(cInfo[car][HouseCar],1151); AddVehicleComponent(cInfo[car][HouseCar],1161); AddVehicleComponent(cInfo[car][HouseCar],1156); AddVehicleComponent(cInfo[car][HouseCar],1140); AddVehicleComponent(cInfo[car][HouseCar],1167); AddVehicleComponent(cInfo[car][HouseCar],1039); AddVehicleComponent(cInfo[car][HouseCar],1041); AddVehicleComponent(cInfo[car][HouseCar],104; AddVehicleComponent(cInfo[car][HouseCar],1052); AddVehicleComponent(cInfo[car][HouseCar],1070); AddVehicleComponent(cInfo[car][HouseCar],1072); AddVehicleComponent(cInfo[car][HouseCar],1057); AddVehicleComponent(cInfo[car][HouseCar],1063); AddVehicleComponent(cInfo[car][HouseCar],1031); AddVehicleComponent(cInfo[car][HouseCar],1030); AddVehicleComponent(cInfo[car][HouseCar],1093); AddVehicleComponent(cInfo[car][HouseCar],1095); } } } public des1() { for(new car=0;car<MAX_HOUSES;car++) { if(cInfo[car][Des1]==1) { cInfo[car][Des1]=0; AddVehicleComponent(cInfo[car][HouseCar],1034); AddVehicleComponent(cInfo[car][HouseCar],1046); AddVehicleComponent(cInfo[car][HouseCar],1065); AddVehicleComponent(cInfo[car][HouseCar],1064); AddVehicleComponent(cInfo[car][HouseCar],102; AddVehicleComponent(cInfo[car][HouseCar],1089); AddVehicleComponent(cInfo[car][HouseCar],1044); AddVehicleComponent(cInfo[car][HouseCar],1126); AddVehicleComponent(cInfo[car][HouseCar],1129); AddVehicleComponent(cInfo[car][HouseCar],1104); AddVehicleComponent(cInfo[car][HouseCar],1113); AddVehicleComponent(cInfo[car][HouseCar],1136); } } } public des2() { for(new car=0;car<MAX_HOUSES;car++) { if(cInfo[car][Des2]==1) { cInfo[car][Des2]=0; AddVehicleComponent(cInfo[car][HouseCar],1037); AddVehicleComponent(cInfo[car][HouseCar],1045); AddVehicleComponent(cInfo[car][HouseCar],1066); AddVehicleComponent(cInfo[car][HouseCar],1059); AddVehicleComponent(cInfo[car][HouseCar],1029); AddVehicleComponent(cInfo[car][HouseCar],1092); AddVehicleComponent(cInfo[car][HouseCar],1043); AddVehicleComponent(cInfo[car][HouseCar],1127); AddVehicleComponent(cInfo[car][HouseCar],1132); AddVehicleComponent(cInfo[car][HouseCar],1105); AddVehicleComponent(cInfo[car][HouseCar],1114); AddVehicleComponent(cInfo[car][HouseCar],1135); } } } public KillVehicle(carid) { for (new i=0;i<MAX_PLAYERS;i++) { if(IsPlayerInVehicle(i, carid)) { RemovePlayerFromVehicle(i); KillVeh[carid] = true; SetVehicleToRespawn(carid); } else { KillVeh[carid] = true; SetVehicleToRespawn(carid); } } } public OnPlayerPickUpPickup(playerid, pickupid) { GetHouseStats(playerid, pickupid); return 0; } stock sscanf(string[], format[], {Float,_}:...) { new formatPos = 0, stringPos = 0, paramPos = 2, paramCount = numargs(); while (paramPos < paramCount && string[stringPos]) { switch (format[formatPos++]) { case '\0': { return 0; } case 'i', 'd': { new neg = 1, num = 0, ch = string[stringPos]; if (ch == '-') { neg = -1; ch = string[++stringPos]; } do { stringPos++; if (ch >= '0' && ch <= '9') { num = (num * 10) + (ch - '0'); } else { return 1; } } while ((ch = string[stringPos]) && ch != ' '); setarg(paramPos, 0, num * neg); } case 'h', 'x': { new ch, num = 0; while ((ch = string[stringPos++])) { switch (ch) { case 'x', 'X': { num = 0; continue; } case '0' .. '9': { num = (num << 4) | (ch - '0'); } case 'a' .. 'f': { num = (num << 4) | (ch - ('a' - 10)); } case 'A' .. 'F': { num = (num << 4) | (ch - ('A' - 10)); } case ' ': { break; } default: { return 1; } } } setarg(paramPos, 0, num); } case 'c': { setarg(paramPos, 0, string[stringPos++]); } case 'f': { new tmp[25]; strmid(tmp, string, stringPos, stringPos+sizeof(tmp)-2); setarg(paramPos, 0, _:floatstr(tmp)); } case 's', 'z': { new i = 0, ch; if (format[formatPos]) { while ((ch = string[stringPos++]) && ch != ' ') { setarg(paramPos, i++, ch); } if (!i) return 1; } else { while ((ch = string[stringPos++])) { setarg(paramPos, i++, ch); } } stringPos--; setarg(paramPos, i, '\0'); } default: { continue; } } while (string[stringPos] && string[stringPos] != ' ') { stringPos++; } while (string[stringPos] == ' ') { stringPos++; } paramPos++; } while (format[formatPos] == 'z') formatPos++; return format[formatPos]; } public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if(newkeys == KEY_SECONDARY_ATTACK) { if(dentrocasa[playerid] == 0){ new timestamp = GetTickCount(); if(timestamp - inhousepickup[playerid] > 3000) { return 1; } new str1[255],pname[24], str[255], casa[266]; GetPlayerPos(playerid, housex, housey, housez); format(str1, sizeof(str1), "Casas/Casaid%d", playericonhouse[playerid]); GetPlayerName(playerid, pname, 24); if(strcmp(hInfo[playericonhouse[playerid]][Name],pname,true)==0){ playerworld[playerid] = GetPlayerVirtualWorld(playerid); SetPlayerVirtualWorld(playerid, hInfo[playericonhouse[playerid]][Virtualworld]); SetPlayerInterior(playerid, hInfo[playericonhouse[playerid]][Interior]); SetPlayerPos(playerid, hInfo[playericonhouse[playerid]][InteriorX], hInfo[playericonhouse[playerid]][InteriorY], hInfo[playericonhouse[playerid]][InteriorZ]); playerinterior[playerid] = hInfo[playericonhouse[playerid]][Interior]; dentrocasa[playerid] = 1; format(casa, sizeof(casa), "Casas/Usuarios/%s", udb_encode(pname)); dini_IntSet(casa, "Luz", dini_Int(casa, "Luz")+11); format(casa, sizeof(casa), "Casas/Usuarios/%s", udb_encode(pname)); dini_IntSet(casa, "Agua", dini_Int(casa, "Agua")+3); format(str, sizeof(str), "(INFO) Bem vindo(a) б casa nъmero '%d'.", hInfo[playericonhouse[playerid]][Casaid]); SendClientMessage(playerid, 0xFFFFFFAA, str); return 1; } if(hInfo[playericonhouse[playerid]][Locked]==1) return SendClientMessage(playerid, Vermelho, "(ERRO) Esta casa estб trancada, apenas o dono pode entrar."); playerworld[playerid] = GetPlayerVirtualWorld(playerid); SetPlayerVirtualWorld(playerid, hInfo[playericonhouse[playerid]][Virtualworld]); SetPlayerInterior(playerid, hInfo[playericonhouse[playerid]][Interior]); SetPlayerPos(playerid, hInfo[playericonhouse[playerid]][InteriorX], hInfo[playericonhouse[playerid]][InteriorY], hInfo[playericonhouse[playerid]][InteriorZ]); playerinterior[playerid] = hInfo[playericonhouse[playerid]][Interior]; dentrocasa[playerid] = 1; format(str, sizeof(str), "(INFO) Bem vindo(a) б casa nъmero '%d'.", hInfo[playericonhouse[playerid]][Casaid]); SendClientMessage(playerid, 0xFFFFFFAA, str); } if(dentrocasa[playerid] == 1){ if(GetPlayerInterior(playerid)==playerinterior[playerid]) { SetPlayerPos(playerid, housex, housey, housez); SetPlayerInterior(playerid, playerworld[playerid]); dentrocasa[playerid] = 0; new str[255]; format(str, sizeof(str), "(INFO) Vocк saiu da casa nъmero '%d'.", hInfo[playericonhouse[playerid]][Casaid]); SendClientMessage(playerid, 0xFFFFFFAA, str); } else { } } } return 1; } public OnPlayerExitedMenu(playerid) { TogglePlayerControllable(playerid, 1); return 1; } public OnPlayerSelectedMenuRow(playerid, row) { new Menu:Current = GetPlayerMenu(playerid); if(Current == Tuning) { switch(row){ case 0: if(IsPlayerConnected(playerid)) { ShowMenuForPlayer(Rodas, playerid); } case 1: if(IsPlayerConnected(playerid)) { ShowMenuForPlayer(Cores, playerid); } case 2: if(IsPlayerConnected(playerid)) { ShowMenuForPlayer(Paint, playerid); } case 3: if(IsPlayerConnected(playerid)) { cInfo[playericonhouse[playerid]][Tunar9] = 1; TogglePlayerControllable(playerid, 1); PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0); } case 4: if(IsPlayerConnected(playerid)) { cInfo[playericonhouse[playerid]][Tunar10] = 1; TogglePlayerControllable(playerid, 1); PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0); } case 5: if(IsPlayerConnected(playerid)) { ShowMenuForPlayer(Aerof, playerid); } case 6: if(IsPlayerConnected(playerid)) { ShowMenuForPlayer(Saias, playerid); } case 7: if(IsPlayerConnected(playerid)) { ShowMenuForPlayer(Descarga, playerid); } case 8: if(IsPlayerConnected(playerid)) { TogglePlayerControllable(playerid, 1); } } } if(Current == Rodas) { switch(row){ case 0: if(IsPlayerConnected(playerid)) { cInfo[playericonhouse[playerid]][Tunar] = 1; TogglePlayerControllable(playerid, 1); PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0); } case 1: if(IsPlayerConnected(playerid)) { cInfo[playericonhouse[playerid]][Tunar2] = 1; TogglePlayerControllable(playerid, 1); PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0); } case 2: if(IsPlayerConnected(playerid)) { cInfo[playericonhouse[playerid]][Tunar3] = 1; TogglePlayerControllable(playerid, 1); PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0); } case 3: if(IsPlayerConnected(playerid)) { cInfo[playericonhouse[playerid]][Tunar4] = 1; TogglePlayerControllable(playerid, 1); PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0); } case 4: if(IsPlayerConnected(playerid)) { cInfo[playericonhouse[playerid]][Tunar5] = 1; TogglePlayerControllable(playerid, 1); PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0); } case 5: if(IsPlayerConnected(playerid)) { TogglePlayerControllable(playerid, 1); } } } if(Current == Cores) { switch(row){ case 0: if(IsPlayerConnected(playerid)) { cInfo[playericonhouse[playerid]][Cor1] = 1; TogglePlayerControllable(playerid, 1); PlayerPlaySound(playerid, 1134, 0.0, 0.0, 0.0); } case 1: if(IsPlayerConnected(playerid)) { cInfo[playericonhouse[playerid]][Cor2] = 1; TogglePlayerControllable(playerid, 1); PlayerPlaySound(playerid, 1134, 0.0, 0.0, 0.0); } case 2: if(IsPlayerConnected(playerid)) { cInfo[playericonhouse[playerid]][Cor3] = 1; TogglePlayerControllable(playerid, 1); PlayerPlaySound(playerid, 1134, 0.0, 0.0, 0.0); } case 3: if(IsPlayerConnected(playerid)) { cInfo[playericonhouse[playerid]][Cor4] = 1; TogglePlayerControllable(playerid, 1); PlayerPlaySound(playerid, 1134, 0.0, 0.0, 0.0); } case 4: if(IsPlayerConnected(playerid)) { cInfo[playericonhouse[playerid]][Cor5] = 1; TogglePlayerControllable(playerid, 1); PlayerPlaySound(playerid, 1134, 0.0, 0.0, 0.0); } case 5: if(IsPlayerConnected(playerid)) { cInfo[playericonhouse[playerid]][Cor6] = 1; TogglePlayerControllable(playerid, 1); PlayerPlaySound(playerid, 1134, 0.0, 0.0, 0.0); } case 6: if(IsPlayerConnected(playerid)) { cInfo[playericonhouse[playerid]][Cor7] = 1; TogglePlayerControllable(playerid, 1); PlayerPlaySound(playerid, 1134, 0.0, 0.0, 0.0); } case 7: if(IsPlayerConnected(playerid)) { cInfo[playericonhouse[playerid]][Cor8] = 1; TogglePlayerControllable(playerid, 1); PlayerPlaySound(playerid, 1134, 0.0, 0.0, 0.0); } case 8: if(IsPlayerConnected(playerid)) { TogglePlayerControllable(playerid, 1); } } } if(Current == Paint) { switch(row){ case 0: if(IsPlayerConnected(playerid)) { cInfo[playericonhouse[playerid]][Tunar6] = 1; TogglePlayerControllable(playerid, 1); PlayerPlaySound(playerid, 1134, 0.0, 0.0, 0.0); } case 1: if(IsPlayerConnected(playerid)) { cInfo[playericonhouse[playerid]][Tunar7] = 1; TogglePlayerControllable(playerid, 1); PlayerPlaySound(playerid, 1134, 0.0, 0.0, 0.0); } case 2: if(IsPlayerConnected(playerid)) { cInfo[playericonhouse[playerid]][Tunar8] = 1; TogglePlayerControllable(playerid, 1); PlayerPlaySound(playerid, 1134, 0.0, 0.0, 0.0); } case 3: if(IsPlayerConnected(playerid)) { TogglePlayerControllable(playerid, 1); } } } if(Current == Aerof) { switch(row){ case 0: if(IsPlayerConnected(playerid)) { cInfo[playericonhouse[playerid]][Aero1] = 1; TogglePlayerControllable(playerid, 1); PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0); } case 1: if(IsPlayerConnected(playerid)) { cInfo[playericonhouse[playerid]][Aero2] = 1; TogglePlayerControllable(playerid, 1); PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0); } case 2: if(IsPlayerConnected(playerid)) { TogglePlayerControllable(playerid, 1); } } } if(Current == Saias) { switch(row){ case 0: if(IsPlayerConnected(playerid)) { cInfo[playericonhouse[playerid]][Saias1] = 1; TogglePlayerControllable(playerid, 1); PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0); } case 1: if(IsPlayerConnected(playerid)) { cInfo[playericonhouse[playerid]][Saias2] = 1; TogglePlayerControllable(playerid, 1); PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0); } case 2: if(IsPlayerConnected(playerid)) { TogglePlayerControllable(playerid, 1); } } } if(Current == Descarga) { switch(row){ case 0: if(IsPlayerConnected(playerid)) { cInfo[playericonhouse[playerid]][Des1] = 1; TogglePlayerControllable(playerid, 1); PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0); } case 1: if(IsPlayerConnected(playerid)) { cInfo[playericonhouse[playerid]][Des2] = 1; TogglePlayerControllable(playerid, 1); PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0); } case 2: if(IsPlayerConnected(playerid)) { TogglePlayerControllable(playerid, 1); } } } return 0; } |