[Ajuda] trancar veнculo.
#1

Olб a todos,bom eu estou tendo problemas em trancar um carro.
Eu peguei um comando no forum pra trancar e destrancar,mas nгo funciona e eu tentei tambйm fazer e nгo deu certo.

Poderiam me ajudar porfavor ?como trancar um determinado veнculo ?(trancar o veнculo que o player estiver dentro)

pawn Код:
CMD:trancar(playerid)
{
if(IsPlayerInAnyVehicle(playerid))
{
new State=GetPlayerState(playerid);
if(State!=PLAYER_STATE_DRIVER)
{
SendClientMessage(playerid,0xFF004040,"Vocк nгo pode trancar esse veiculo.");
return 1;
}
new i;
for(i=0;i<MAX_PLAYERS;i++)
{
if(i != playerid)
{
SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 1);
}
}
SendClientMessage(playerid, 0x33AA33AA, "Veiculo Trancado");
new Float:pX, Float:pY, Float:pZ;
GetPlayerPos(playerid,pX,pY,pZ);
PlayerPlaySound(playerid,1056,pX,pY,pZ);
}
}
CMD:destrancar(playerid)
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, vermelho, "Voce nгo estб em um veнculo!");
        if(GetPlayerState(playerid)!=PLAYER_STATE_DRIVER) return SendClientMessage(playerid,vermelho,"Voce nгo pode destrancar esse veнculo!");
        for(new i=0;i<MAX_PLAYERS;i++)
        SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 0);
        SendClientMessage(playerid, verde, "VEICULO DESTRANCADO.");
        return true;
        }
CMD:testetrancar(playerid)
{
new carro;
new engine,lights,alarm,doors,bonnet,boot,objective;
GetVehicleParamsEx(carro,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(carro,engine,lights,alarm,1,bonnet,boot,objective);
}
CMD:testedestrancar(playerid)
{
if(chaves[playerid] == true)
{
new carro;
new engine,lights,alarm,doors,bonnet,boot,objective;
GetVehicleParamsEx(carro,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(carro,engine,lights,alarm,0,bonnet,boot,objective);
}
}
Nenhum desses acima pegou.
Reply


Messages In This Thread
trancar veнculo. - by Saidmrn - 11.12.2012, 23:07
Re: trancar veнculo. - by TugaBR - 11.12.2012, 23:31
Re: trancar veнculo. - by HardWar - 11.12.2012, 23:37
Re: trancar veнculo. - by tonisantolia - 12.12.2012, 00:37
Re: trancar veнculo. - by Saidmrn - 12.12.2012, 02:59
Re: trancar veнculo. - by zSuYaNw - 12.12.2012, 03:11
Re: trancar veнculo. - by Saidmrn - 12.12.2012, 03:57
Re: trancar veнculo. - by zSuYaNw - 12.12.2012, 03:58
Re: trancar veнculo. - by Saidmrn - 12.12.2012, 04:03
Re: trancar veнculo. - by Nill.Oliveira - 12.12.2012, 04:07

Forum Jump:


Users browsing this thread: 3 Guest(s)