/trancar e /carrocasa - Ambos Bugados -
Up - 14.03.2015
E ai galera beleza, entгo estou com 2 problemas aqui, o 1є й o /trancar, eu uso esse comando para abrir, e fechar o carro, porйm eu uso o /trancar e ele nгo abre nem fecha, e o outro e o /carrocasa, eu utilizo este comando, e salvo as alteraзхes, o carro nгo muda, ele simplesmente cai outro em cima, vou manda os 2 cуdigos, se puderem me ajudar, eu agradeзo.
Код HTML:
if(strcmp(cmd,"/carrocasa", true) == 0)
{
if(JogadorInfo[playerid][pPHousekey] != 255)
{
if(PlayerToPoint(60.0,playerid,2154.6204,-1169.3992,23.8216) || PlayerToPoint(60.0,playerid,1211.9238,-1727.0878,13.5691) ||PlayerToPoint(60.0,playerid,1933.8267,-2120.9851,17.7587)
|| PlayerToPoint(60.0,playerid,543.7310,-1282.9071,17.2422) || PlayerToPoint(60.0,playerid,1699.4491,-1005.0959,23.9063) || PlayerToPoint(60.0,playerid,1657.4771,-1015.6190,23.8984)
|| PlayerToPoint(60.0,playerid,1612.2705,-1006.4768,23.9063) || PlayerToPoint(60.0,playerid,1582.4283,-1007.4351,23.9063) || PlayerToPoint(60.0,playerid,1579.9569,-1041.4642,23.9063)
|| PlayerToPoint(50.0,playerid,331.8038,-1813.2729,4.3915) || PlayerToPoint(30.0,playerid,174.2976,-1906.7273,-0.6273))
{
SendClientMessage(playerid,COLOR_GRAD1,"Vocк nгo pode usar este comando neste local,estб perto do aluguel de carros!");
return 1;
}
if(mudandodp[playerid] == 1)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк estб mudando de departamento, nгo pode utilizar este comando!");
return 1;
}
ShowPlayerDialog(playerid, 14, DIALOG_STYLE_LIST, "Modificar Carro da Casa", "Modificar Cor Principal(R$300)\nModificar Cor Secundбria(R$300)\nVer Modelos Disponнveis\nModificar Modelo(R$2000)\nSalvar Alteraзхes", "Confirmar", "Cancelar");
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo tem uma casa !");
return 1;
}
return 1;
}
Код HTML:
if(strcmp(cmd, "/trancar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new carid;
if (gTeam[playerid] == 2 || gTeam[playerid] == 1)
{
if(gLastCar[playerid] == 0 && JogadorInfo[playerid][pPHousekey] == 999)
{
SendClientMessage(playerid, COLOR_GRAD2, "Vocк nгo tem um carro de casa/alugado.");
return 1;
}
else if(gLastCar[playerid] != 0 && gLastCar[playerid] != JogadorInfo[playerid][pPHousekey]+totalveiculos)
{
if (HireCar[playerid] != gLastCar[playerid] && HireCar[playerid] > 0)
{
gLastDriver[HireCar[playerid]] = 300;
gCarLock[HireCar[playerid]] = 0;
UnLockCar(HireCar[playerid]);
}
HireCar[playerid] = gLastCar[playerid];
}
}
if (JogadorInfo[playerid][pPHousekey] == 999)
{
if(HireCar[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GRAD2, "Vocк nгo tem um carro.");
return 1;
}
}
carid = JogadorInfo[playerid][pPHousekey]+totalveiculosh;
if(HireCar[playerid] > 0 && !SwitchKey[playerid])
{
carid = HireCar[playerid];
}
//new driver = gLastDriver[carid];
new lockstatus = gCarLock[carid];
new Float:cx,Float:cy,Float:cz;
GetVehiclePos(carid, cx, cy, cz);
switch (lockstatus)
{
case 0:
{
if(HireCar[playerid] == 0 && JogadorInfo[playerid][pPHousekey] == 999)
{
SendClientMessage(playerid, COLOR_GRAD2, "Vocк nгo tem um carro !");
return 1;
}
if(HireCar[playerid] == carid && !SwitchKey[playerid])
{
GameTextForPlayer(playerid, "~r~Veiculo do Aluguel ~r~Fechado", 2500, 3);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
gCarLock[carid] = 1;
LockCar(carid);
}
else if(JogadorInfo[playerid][pPHouseCarkey] == carid)
{
GameTextForPlayer(playerid, "~r~Veiculo da casa ~r~Fechado", 2500, 3);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
gCarLock[carid] = 1;
LockCar(carid);
return 1;
}
}
case 1:
{
if(HireCar[playerid] == 0 && JogadorInfo[playerid][pPHousekey] == 999)
{
SendClientMessage(playerid, COLOR_GRAD2, "Vocк nгo tem um carro !");
return 1;
}
if(HireCar[playerid] == carid && !SwitchKey[playerid])
{
GameTextForPlayer(playerid, "~r~Veiculo do aluguel ~g~Aberto", 2500, 3);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
gCarLock[carid] = 0;
UnLockCar(carid);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
}
if (JogadorInfo[playerid][pPHouseCarkey] == carid)
{
GameTextForPlayer(playerid, "~r~Veiculo da casa ~g~Aberto", 2500, 3);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
gCarLock[carid] = 0;
UnLockCar(carid);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
return 1;
}
}
default:
{
SendClientMessage(playerid, COLOR_GRAD2, "Erro");
}
}
if(carid == 256)
{
SendClientMessage(playerid, COLOR_GRAD2, "Vocк nгo tem um carro!");
}
}
return 1;
}