[AJUDA]Concessionaria
#1

Olб pessoal, tudo blz?
Bom estou com uma duvida, tenho um Gm com sistema de concessionaria, mas quando se compra o carro tem o carmenu que no caso tem opcao de estacionar o carro e teria que ficar fixo, mas assim que dou /rc (Algum Admin) ele reseta o carro pra onde escolhe o carro.

Abaixo os dois comandos.

Quote:

if(dialogid == 7799)
{
new vehicleid = GetOwnedVehicleID(playerid);
new typeid = GetVehicleType(vehicleid);
if(response)
{
if(listitem == 0)
{
new vehicleid2 = GetOwnedVehicleID(playerid);
new Float:vida;
GetVehicleHealth(vehicleid2, vida);
if (GetVehicleModel(GetPlayerVehicleID(playerid) == vehicleid2))
{//
new v = GetOwnedVehicleID(playerid);
new Float:angulo;
VehicleInfo[vehicleid][vPark] = 1;
GetVehiclePos(vehicleid, VehicleInfo[vehicleid][vPX], VehicleInfo[vehicleid][vPY], VehicleInfo[vehicleid][vPZ]);
GetVehicleZAngle(vehicleid, angulo);
VehicleInfo[vehicleid][vPA] = angulo;
format(string, sizeof string, "|CARRO| Seu veнculo foi estacionado neste local.");
SendClientMessage(playerid, COLOR_GRAD5, string);
for(new m = 0; m < MAX_MODS; m++)
{
if (VehicleInfo[vehicleid][vMod][m] > 0)
{
AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][vMod][m]);
}
}
if (VehicleInfo[v][vPaintjob] > -1)
{
ChangeVehiclePaintjob(vehicleid,VehicleInfo[vehicleid][vPaintjob]);
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo esta dentro de seu veнculo da concessionaria.");
return 1;
}//
}//

E Comando de resetar os carros

Quote:

if(strcmp(cmd, "/respawncarros", true) == 0 || strcmp(cmd, "/rc", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] < 3)
{
SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo estб autorizado a usar este comando !");
return 1;
}
if(admadministrando[playerid] < 1)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/administrar)");
return 1;
}
GetPlayerName(playerid, playername, sizeof(playername));
//format(string, sizeof(string), "[BNG-BOT] O Admin %s recolocou todos os veiculos para seus locais de origem.", playername);
SendClientMessageToAll(COLOR_WHITE,string);
SendClientMessage(playerid,COLOR_GRAD1,"Respwan Dado Bom Jogo!");
new bool:unwanted[CAR_AMOUNT];
for(new player=0; player<MAX_PLAYERS; player++)
{
if(IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
}
for(new car = 1; car <= CAR_RESPAW; car++)
{
if(!unwanted[car]) SetVehicleToRespawn(car);
}
}
return 1;
}

Obrigado.
Reply


Messages In This Thread
[AJUDA]Concessionaria - by Red_Summers - 27.05.2011, 23:40
Re: [AJUDA]Concessionaria - by Ricop522 - 28.05.2011, 03:03
AW: [AJUDA]Concessionaria - by wallacematheus - 28.05.2011, 03:42
Re: AW: [AJUDA]Concessionaria - by TheGarfield - 28.05.2011, 03:53
Re: [AJUDA]Concessionaria - by Ricop522 - 28.05.2011, 03:56
Re: [AJUDA]Concessionaria - by Red_Summers - 28.05.2011, 04:19

Forum Jump:


Users browsing this thread: 3 Guest(s)