21.09.2013, 22:36
Tem como eu colocar o carro para vender nesse determinado local? :
Coordenadas:
X:1638.0626
Y:-1105.0997
Z:23.9063
Obrigado.
Coordenadas:
X:1638.0626
Y:-1105.0997
Z:23.9063
pawn Код:
if(strcmp(tmp, "vender", true) == 0)
{
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, playername, sizeof(playername));
if(PlayerInfo[playerid][pCarKey] == 0 && PlayerInfo[playerid][pCarKey2] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo tem um Carro VIP.");
return true;
}
if(PlayerInfo[playerid][pCarKey] != vehid && PlayerInfo[playerid][pCarKey2] != vehid)
{
SendClientMessage(playerid, COLOR_GREY, "Esse nгo й seu Carro VIP.");
return true;
}
if(PlayerInfo[playerid][pCarKey] != 0 && strcmp(playername, CarInfo[PlayerInfo[playerid][pVeiculo]][cOwner], true) == 0)
{
new car = PlayerInfo[playerid][pVeiculo];
CarInfo[car][cOwned] = 0;
CarInfo[car][cModel] = 560;
CarInfo[car][cColorOne] = 0;
CarInfo[car][cColorTwo] = 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~Carro Vip Vendido Por: ~n~~g~$%d", CarInfo[car][cValue]);
GameTextForPlayer(playerid, string, 10000, 3);
RemovePlayerFromVehicleEx(playerid);
Controle(playerid, 1);
PlayerInfo[playerid][pCarKey] = 0;
PlayerInfo[playerid][pVeiculo] = 0;
SaveCars();
return true;
}
else if(PlayerInfo[playerid][pCarKey2] != 0 && strcmp(playername, CarInfo[PlayerInfo[playerid][pVeiculo2]][cOwner], true) == 0)
{
new car = PlayerInfo[playerid][pVeiculo2];
CarInfo[car][cOwned] = 0;
CarInfo[car][cModel] = 560;
CarInfo[car][cColorOne] = 0;
CarInfo[car][cColorTwo] = 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~Carro Vip Vendido Por: ~n~~g~$%d", CarInfo[car][cValue]);
GameTextForPlayer(playerid, string, 10000, 3);
RemovePlayerFromVehicleEx(playerid);
Controle(playerid, 1);
PlayerInfo[playerid][pCarKey2] = 0;
PlayerInfo[playerid][pVeiculo2] = 0;
SaveCars();
return true;
}
}
return true;
}