[AJUDA] Key's
#6

Quote:
Originally Posted by RedBulL_x
Посмотреть сообщение
Deu Certo com o botгo CapsLoock. Mais eu queria que Ligasse e desligasse com o mesmo botгo, Aк eu aperto o Botao e faz os dois comandos de uma vez o de ligar e desligar . Meu Code tб assim

Код:
if((newkeys == 2) && (IsPlayerInAnyVehicle(playerid))) return OnPlayerCommandText(playerid,"/motoroff");
	{
			OnPlayerCommandText(playerid,"/motoron");

	}
Isto deve resolver o seu problema .


Coloque :


pawn Код:
//No OnPlayerKeyStateChange:

if((newkeys == 2) && (IsPlayerInAnyVehicle(playerid)))
    {
        if(!GetPVarInt(playerid, "Motor ON"))
        {
            SetPVarInt(playerid, "Motor ON", true);
            GameTextForPlayer(playerid,"Motor ON !",3000,6);
            OnPlayerCommandText(playerid,"/motoron");
        }
        else
        {
            SetPVarInt(playerid, "Motor ON", false);
            GameTextForPlayer(playerid,"Motor OFF !",3000,6);
            OnPlayerCommandText(playerid,"/motoroff");
        }
        return true;
    }




//E, no OnPlayerExitVehicle:

SetPVarInt(playerid, "Motor ON", false);


Espero ter ajudado .
Reply


Messages In This Thread
[AJUDA] Key's - by RedBulL_x - 11.07.2011, 15:14
Re: [AJUDA] Key's - by Shadoww5 - 11.07.2011, 15:15
AW: [AJUDA] Key's - by RedBulL_x - 11.07.2011, 15:20
Re: [AJUDA] Key's - by Macintosh - 11.07.2011, 15:25
AW: [AJUDA] Key's - by RedBulL_x - 11.07.2011, 15:35
Re: AW: [AJUDA] Key's - by rjjj - 11.07.2011, 15:45
AW: [AJUDA] Key's - by RedBulL_x - 11.07.2011, 15:46

Forum Jump:


Users browsing this thread: 2 Guest(s)