/destrancar ta trancando o carro !
#1

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 ?
Reply
#2

pawn Код:
SetVehicleParamsEx(Veiculo, Pecas[0], Pecas[1], Pecas[2], false, Pecas[4], Pecas[5], Pecas[6]);
Tenta assim.
Reply
#3

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.
Reply
#4

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;
}
}
Reply
#5

Terrivelmente identado ,Totalmente redundante e supremamente lento.
Reply
#6

Sim galera, como eu posso concertar isso ?
Reply
#7

eu tenho que por os parвmetros 0 em tudo ?
Reply
#8

Putz, alguйmm , up ai
Reply
#9

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 ******.
Reply
#10

Duun use ''edit' nгo fasse flood..

@Obs: meu code nгo deu?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)