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_GRAD2, "Voce nгo tem um veiculo."); return 1; } else if(gLastCar[playerid] != 0 && gLastCar[playerid] != PlayerInfo[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 (PlayerInfo[playerid][pPHousekey] == 255) { if(HireCar[playerid] == 0) { SendClientMessage(playerid, COLOR_GRAD2, "Voce nгo tem um veiculo."); return 1; } } carid = PlayerInfo[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 && PlayerInfo[playerid][pPHousekey] == 255) { SendClientMessage(playerid, COLOR_GRAD2, "Voce nгo tem veiculo"); return 1; } if(HireCar[playerid] == carid && !SwitchKey[playerid]) { GameTextForPlayer(playerid, "~w~Veiculo ~r~Fechado", 5000, 6); PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0); gCarLock[carid] = 1; LockCar(carid); } else if(PlayerInfo[playerid][pPHouseCarkey] == carid) { GameTextForPlayer(playerid, "~w~Carro da casa~r~Fechado", 5000, 6); PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0); gCarLock[carid] = 1; LockCar(carid); return 1; } } case 1: { if(HireCar[playerid] == 0 && PlayerInfo[playerid][pPHousekey] == 255) { SendClientMessage(playerid, COLOR_GRAD2, "Voce nгo possui um veiculo"); return 1; } if(HireCar[playerid] == carid && !SwitchKey[playerid]) { GameTextForPlayer(playerid, "~w~Veiculo ~g~Aberto", 5000, 6); PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0); gCarLock[carid] = 0; UnLockCar(carid); } if (PlayerInfo[playerid][pPHouseCarkey] == carid) { GameTextForPlayer(playerid, "~w~Veiculo da casa ~g~aberto", 5000, 6); PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0); gCarLock[carid] = 0; UnLockCar(carid); return 1; } } default: { SendClientMessage(playerid, COLOR_GRAD2, "Erro"); } } if(carid == 256) { SendClientMessage(playerid, COLOR_GRAD2, "Voce nгo tem um veiculo!"); } } return 1; } |
GF o ***** Isso ai E THUG 2.4. O GF Nгo tem bug no /trancar nem em nada do tipo. E eu nгo ajudo thug.
|
Irei rever as public's e vou fazer a recontagem
@ Sergio 2.4 ? pqp , esse GM , й depois que o poderoso saiu do thug , nгo fala besteira tiozгo |
Se nгo me engano no CAR_AMOUNT tu coloca a quantidade de carros, e no CAR_RESPAW tu coloca 1 a menos do AMOUNT, algo assim, se nгo for assim й invertido.
|
//
if(gCarLock[vehicleid] == 1)
{
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid, 0);
TogglePlayerControllable(playerid, 1);
return 1;
}