/destrancar ta trancando o carro ! -
Duun - 06.11.2012
pawn Код:
CMD:destrancar(playerid,params[])
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "Vocк nгo estб em um veнculo !");
if(GetPlayerVehicleSeat(playerid)) return SendClientMessage(playerid, -1, "Vocк nгo pode destrancar esse veнculo !");
new Veiculo = GetPlayerVehicleID(playerid);
new Pecas[7];
GetVehicleParamsEx(Veiculo, Pecas[0], Pecas[1], Pecas[2], Pecas[3], Pecas[4], Pecas[5], Pecas[6]);
SetVehicleParamsEx(Veiculo, Pecas[0], Pecas[1], Pecas[2], true, Pecas[4], Pecas[5], Pecas[6]);
GameTextForPlayer(playerid, "~b~ Veiculo Destrancado !", 2500, 3);
return 1;
}
pq isso ?
Re: /destrancar ta trancando o carro ! -
Don_Speed - 06.11.2012
pawn Код:
SetVehicleParamsEx(Veiculo, Pecas[0], Pecas[1], Pecas[2], false, Pecas[4], Pecas[5], Pecas[6]);
Tenta assim.
Re: /destrancar ta trancando o carro ! -
leonardo1434 - 06.11.2012
Variбveis tem como valor pre-definido 0. Don, Vocк tem certeza que leu o titulo ?
https://sampwiki.blast.hk/wiki/SetVehicleParamsEx
Engine = ligar/desligar.
Re: /destrancar ta trancando o carro ! -
Zona_Sky - 06.11.2012
meu
pawn Код:
if (strcmp(cmdtext, "/destrancar", true)==0)
{
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
new State;
new Float:X;
new Float:Y;
new Float:Z;
if(IsPlayerInAnyVehicle(playerid))
{
State=GetPlayerState(playerid);
if(State!=PLAYER_STATE_DRIVER)
{
SendClientMessage(playerid,Vermelho,"(INFO) Vocк sу pode destrancar o carro se estiver dirigindo.");
return 1;
}
new i;
for(i=0;i<MAX_PLAYERS;i++)
{
SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 0);
}
GameTextForPlayer(playerid, "~y~ Veiculo ~n~ ~g~Destrancado", 5000, 6);
GetPlayerPos(playerid,X,Y,Z);
PlayerPlaySound(playerid,1057,X,Y,Z);
return 1;
}else{
SendClientMessage(playerid, Vermelho, "(INFO) Vocк nгo estб em nenhum veнculo!");
return 1;
}
}
Re: /destrancar ta trancando o carro ! -
leonardo1434 - 06.11.2012
Terrivelmente identado ,Totalmente redundante e supremamente lento.
Re: /destrancar ta trancando o carro ! -
Duun - 06.11.2012
Sim galera, como eu posso concertar isso ?
Re: /destrancar ta trancando o carro ! -
Duun - 06.11.2012
eu tenho que por os parвmetros 0 em tudo ?
Re: /destrancar ta trancando o carro ! -
Duun - 06.11.2012
Putz, alguйmm , up ai
Re: /destrancar ta trancando o carro ! -
leonardo1434 - 06.11.2012
Pelo amor de deus nй, sу ler meu post acima. lб contйm o link necessбrio. caso nгo saiba inglкs, existe o ******.
Re: /destrancar ta trancando o carro ! -
Zona_Sky - 06.11.2012
Duun use ''edit' nгo fasse flood..
@Obs: meu code nгo deu?