[AJUDA]Veiculos Trancados -
[Dk]TuReTOo - 19.06.2011
Boas eu criei estes veiculos e tipo entro no veiculo ando com ele depois ao sair ele feixa automaticamente :S depois tennho de fazer /trancar para ele destrancar e voltar a entrar depois saiio do veiculo e ele fica trancado novamente :S alguem me ajuda ? vejam os veiculos que meti que ficam trancados quando saio
PHP код:
AddStaticVehicleEx(599,1240.75292969,464.20745850,19.82694435,331.25000000,44, 86, -1); //Police Ranger 44
AddStaticVehicleEx(596,1262.60827637,463.66604614,19.24835205,152.24853516,44, 86, -1); //Police Car (LSPD) 45
AddStaticVehicleEx(596,1259.61853027,465.31002808,19.24835205,152.24310303,44, 86, -1); //Police Car (LSPD) 46
AddStaticVehicleEx(599,1256.72607422,466.91308594,19.82694435,152.48773193,44, 86, -1); //Police Ranger 47
AddStaticVehicleEx(525,1253.69970703,468.49230957,19.29634857,151.98779297,44, 86, -1); //Police Car (LVPD) 48
AddStaticVehicleEx(525,1250.70092773,469.98507690,19.29634857,151.73779297,44, 86, -1); //Police Car (LVPD) 49
AddStaticVehicleEx(561,1234.99572754,477.83352661,19.82694435,59.24865723,44, 86, -1); //Stratum 50
AddStaticVehicleEx(579,1235.31835938,464.19494629,19.85291672,331.24877930,44, 86, -1); //Huntley 51
Re: [AJUDA]Veiculos Trancados -
DreeH - 19.06.2011
Mande seu Comando /trancar.
Re: [AJUDA]Veiculos Trancados -
[Dk]TuReTOo - 19.06.2011
PHP код:
if(strcmp(cmd, "/trancar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new carid;
if (gTeam[playerid] == 2 || gTeam[playerid] == 1)
{
if(gLastCar[playerid] == 0 && PlayerInfo[playerid][pPhousekey] == 255)
{
SendClientMessage(playerid, COLOR_RED, " Vocк nгo tem um veнculo.");
return 1;
}
else if(gLastCar[playerid] != 0 && gLastCar[playerid] != PlayerInfo[playerid][pPhousekey]+1)
{
if (HireCar[playerid] != gLastCar[playerid] && HireCar[playerid] != 299)
{
gLastDriver[HireCar[playerid]] = 300;
gCarLock[HireCar[playerid]] = 0;
UnLockCar(HireCar[playerid]);
}
HireCar[playerid] = gLastCar[playerid];
}
}
if (PlayerInfo[playerid][pPhousekey] == 255)
{
if(HireCar[playerid] == 299)
{
SendClientMessage(playerid, COLOR_RED, " Vocк nгo tem um veнculo.");
return 1;
}
}
carid = PlayerInfo[playerid][pPhousekey]+1;
if(HireCar[playerid] != 299 && !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] == 299 && PlayerInfo[playerid][pPhousekey] == 255)
{
SendClientMessage(playerid, COLOR_RED, " Vocк nгo tem um veнculo.");
return 1;
}
if(HireCar[playerid] == carid && !SwitchKey[playerid])
{
GameTextForPlayer(playerid, "~w~Veнculo ~r~Trancado", 5000, 6);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
gCarLock[carid] = 1;
LockCar(carid);
}
else if (PlayerInfo[playerid][pPhousekey] == carid-1)
{
GameTextForPlayer(playerid, "~w~Veнculos ~r~Trancados", 5000, 6);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
gCarLock[carid] = 1;
LockCar(carid);
return 1;
}
}
case 1:
{
if(HireCar[playerid] == 299 && PlayerInfo[playerid][pPhousekey] == 255)
{
SendClientMessage(playerid, COLOR_RED, "Vocк nгo tem um veнculo.");
return 1;
}
if(HireCar[playerid] == carid && !SwitchKey[playerid])
{
GameTextForPlayer(playerid, "~w~Veнculo ~g~Destrancado", 5000, 6);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
gCarLock[carid] = 0;
UnLockCar(carid);
}
if (PlayerInfo[playerid][pPhousekey] == carid-1)
{
GameTextForPlayer(playerid, "~w~Veнculos ~g~Destrancados", 5000, 6);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
gCarLock[carid] = 0;
UnLockCar(carid);
return 1;
}
}
default:
{
SendClientMessage(playerid, COLOR_RED, " Erro");
}
}
if(carid == 256)
{
SendClientMessage(playerid, COLOR_RED, " Vocк nгo tem um veнculo.");
}
}
return 1;
}