25.01.2012, 17:49
tou com problema com o thug 2.6 /veiculos estacionar ele some ai quando dou gmx ele aparece e tbm tem quando eu vendo o veiculo ele fica onde tava estacionado e nao volta na la na loga de carro vip!!
pawn Код:
if(strcmp(tmp, "estacionar", true) == 0)
{
new Float:x,Float:y,Float:z;
new Float:a;
new carid;
new getcarid;
new Veiculo = PlayerInfo[playerid][pVeiculo];
if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pCarKey]) { carid = PlayerInfo[playerid][pCarKey]; }
if(IsPlayerInVehicle(playerid,carid) && CarInfo[Veiculo][cOwned] == 1)
{
getcarid = GetPlayerVehicleID(playerid);
GetPlayerName(playerid, playername, sizeof(playername));
GetVehiclePos(carid, x, y, z);
GetVehicleZAngle(carid, a);
if(PlayerInfo[playerid][pCarKey] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "Tu nгo tens um Veiculo!");
return 1;
}
if(getcarid == carid)
{
CarInfo[Veiculo][cLocationx] = x;
CarInfo[Veiculo][cLocationy] = y;
CarInfo[Veiculo][cLocationz] = z;
CarInfo[Veiculo][cAngle] = a;
format(string, sizeof(string), "~n~ Tu estacionaste o teu Veiculo aqui. ~n~");
GameTextForPlayer(playerid, "Agora o teu Veiculo ira fazer spawn aqui.", 10000, 3);
DestroyVehicle(carid);
CreateVehicle(CarInfo[carid][cModel],CarInfo[carid][cLocationx],CarInfo[carid][cLocationy],CarInfo[carid][cLocationz]+1.0,CarInfo[carid][cAngle],CarInfo[carid][cColorOne],CarInfo[carid][cColorTwo],60000);
TogglePlayerControllable(playerid, 1);
SaveCars();
return 1;
}
return 1;
}
return 1;
}
pawn Код:
if(strcmp(tmp, "vender", true) == 0)
{
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, playername, sizeof(playername));
if(PlayerInfo[playerid][pCarKey] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo tem um Veiculo.");
return 1;
}
if(PlayerInfo[playerid][pCarKey] != 0 && strcmp(playername, CarInfo[PlayerInfo[playerid][pVeiculo]][cOwner], true) == 0)
{
new car = PlayerInfo[playerid][pVeiculo];
CarInfo[car][cOwned] = 0;
GetPlayerName(playerid, sendername, sizeof(sendername));
strmid(CarInfo[car][cOwner], "Dealership", 0, strlen("Dealership"), 999);
GivePlayerMoney(playerid,CarInfo[car][cValue]);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "~w~Voce vendeu seu Veiculo por: ~n~~g~$%d", CarInfo[car][cValue]);
GameTextForPlayer(playerid, string, 10000, 3);
RemovePlayerFromVehicle(playerid);
TogglePlayerControllable(playerid, 1);
PlayerInfo[playerid][pCarKey] = 0;
PlayerInfo[playerid][pVeiculo] = 0;
SaveCars();
return 1;
}
}
return 1;
}