01.09.2011, 12:56
pawn Код:
if(!strcmp(cmd, "/trancar", true))
{
for(new i; i != MAX_VEHICLES; i++)
{
new dist = CheckPlayerDistanceToVehicle(3.0, playerid, i);
if(dist)
{
if(HireCar[playerid] == i && VTrancado[i] == 0)
{
GameTextForPlayer(playerid, "~w~Veiculo Alugado ~n~~r~Fechado", 5000, 6);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
VTrancado[carid] = 1;
LockCar(carid);
}
else if(PlayerInfo[playerid][pPHouseCarkey] == i && VTrancado[i] == 0)
{
GameTextForPlayer(playerid, "~w~Veiculo da Casa ~n~~r~Fechado", 5000, 6);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
VTrancado[carid] = 1;
LockCar(carid);
return 1;
}
else if(HireCar[playerid] == i && VTrancado[i] == 1)
{
GameTextForPlayer(playerid, "~w~Veiculo Alugado ~n~~g~Destrancado", 5000, 6);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
VTrancado[carid] = 0;
UnLockCar(carid);
}
else if(PlayerInfo[playerid][pPHouseCarkey] == i && VTrancado[i] == 0)
{
GameTextForPlayer(playerid, "~w~Veiculo da Casa ~n~~g~Destrancado", 5000, 6);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
VTrancado[carid] = 0;
UnLockCar(carid);
return 1;
}
else return SendClientMessage(playerid, COLOR_GRAD2, "Vocк nгo tem as chaves deste veiculo");
}
else return SendClientMessage(playerid, COLOR_GRAD2, "Vocк nгo esta proximo de nenhum veiculo");
return 1;
}
Fiz agr sem testar qq coisa avisa