[Ajuda] My system car not funcioned !
#6

Quote:
Originally Posted by TiTaNic
Посмотреть сообщение
Sera qe n teria que criar uma funcao para obter o id do carro para o destroyvehicle? Eu acho que sim... pode tambem por os carros a darem respawn no addstaticvehicle e ai ja n precisa disto aqui
Possivelmente ele declarou a variбvel "Carro" como global, nгo vai ter problemas se isso acontecer atй que o segundo jogador saia de um veнculo.

Para resolver tem que declarar a variбvel "Carro" como sendo uma para cada player, utilizando:

pawn Код:
new Carro [ MAX_PLAYERS ];

public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(oldstate == PLAYER_STATE_DRIVER && newstate == PLAYER_STATE_ONFOOT)
    {
        SendClientMessage(playerid, 0xFFFFFFAA, "Vocк tem 5 Segundos para entrar no seu veнculo Novamente");
        SetTimerEx("Destroy", 5000, false, "i", playerid);
    }
    return 1;
}

forward Destroy(playerid);
public Destroy(playerid)
{
    if(!IsPlayerInVehicle(playerid))
    {
        SendClientMessage(playerid, 0xFFFFFFAA, "Seu Veнculo foi destruido Automбticamente");
        DestroyVehicle(Carro[playerid]);
        return 1;
    }
    return 1;
}
Reply


Messages In This Thread
My system car not funcioned ! - by Duun - 23.03.2013, 16:27
Re: My system car not funcioned ! - by iReflesh - 23.03.2013, 16:34
Re: My system car not funcioned ! - by Duun - 23.03.2013, 16:37
Re: My system car not funcioned ! - by Lуs - 23.03.2013, 17:22
Re: My system car not funcioned ! - by LeMoi - 23.03.2013, 17:42
Re: My system car not funcioned ! - by Lуs - 23.03.2013, 17:48
Re: My system car not funcioned ! - by LeMoi - 23.03.2013, 17:56
Re: My system car not funcioned ! - by Duun - 23.03.2013, 20:41

Forum Jump:


Users browsing this thread: 1 Guest(s)