[PEDIDO]Portao Auto
#7

Usando de base o cуdigo do WillianLuigi♥

ATUALIZADO - By WillianLuigi

pawn Code:
new p1, p2; // variбveis

public OnGameModeInit()
{
    p1 = CreateObject(980, 998.86, -2312.03, 14.54, 0.00, 0.00, -78.12); // cordenada do portгo 1
    p2 = CreateObject(980, 1001.66, -2327.77, 14.38, 0.00, 0.00, -78.12); // cordenada do portгo 2
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/a-p1", true) == 0) // comando abrir o portгo 1
    {
        MoveObject(p1, 998.86, -2312.03, 20.03, 5);
        SetTimer("loock1", 6000, false);
        return 1;
    }

    if(strcmp(cmdtext, "/a-p2", true) == 0) // comando abrir o portгo 2
    {
        MoveObject(p2, 1001.95, -2327.76, 20.22, 5);
        SetTimer("loock2", 6000, false);
        return 1;
    }
    return 0;
}

public OnPlayerKeyStateChange(playerid, newkeys)
{
    if((newkeys == KEY_FIRE || KEY_WALK))
    {
        OnPlayerCommandText(playerid, "/a-p1"); // ao apertar alt vai abrir o portгo pelo comando /a-p1
        OnPlayerCommandText(playerid, "/a-p2"); // ao apertar alt vai abrir o portгo pelo comando /a-p2
    }
    return 1;
}

forward loock1(playerid);
public loock1(playerid)
{
    MoveObject(p1, 998.86, -2312.03, 14.54, 5);
    SendClientMessage(playerid, -1, "Portгo aberto!");
    return 1;
}

forward loock2(playerid);
public loock2(playerid)
{
    MoveObject(p1, 1001.66, -2327.77, 14.38, 5);
    SendClientMessage(playerid, -1, "Portгo aberto!");
    return 1;
}
Espero ter ajudado..
Reply


Messages In This Thread
[PEDIDO]Portao Auto - by ThziinHTS4EveR - 28.10.2011, 16:10
Re: [PEDIDO]Portao Auto - by Shadoww5 - 28.10.2011, 16:30
Re: [PEDIDO]Portao Auto - by ThziinHTS4EveR - 28.10.2011, 16:42
Re: [PEDIDO]Portao Auto - by vitorpedro - 28.10.2011, 17:22
Re: [PEDIDO]Portao Auto - by WLSF - 28.10.2011, 17:23
Re: [PEDIDO]Portao Auto - by ThziinHTS4EveR - 28.10.2011, 18:26
Re: [PEDIDO]Portao Auto - by Miqueias Barros - 28.10.2011, 19:29
Re: [PEDIDO]Portao Auto - by ThziinHTS4EveR - 28.10.2011, 19:59
Re: [PEDIDO]Portao Auto - by Miqueias Barros - 28.10.2011, 20:02

Forum Jump:


Users browsing this thread: 1 Guest(s)