Anybody know why this wont work? (gate opening)
#10

pawn Код:
#include <a_samp>
#define COLOR_YELLOW 0xFFFF00AA

new O1;
new O2;
forward close();

public OnFilterScriptInit()
{
    print(" Gates");
    O1 = CreateObject(1357,68286133,773.33685303,4,0.00000000,0.00000000,0.00000000);
    O2 = CreateObject(1357,40942383,713.22784424,4,0.00000000,90.00000000,90.00000000);
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/open1", cmdtext, true, 10) == 0)
    {
        MoveObject(O1,68286133,773.33685303,12.44526672, 2.00);
        SetTimer("close", 7000, 0);//gate will be closed for 7 seconds
        SendClientMessage(playerid,COLOR_YELLOW,"enter text here");
        return 1;
    }
    if (strcmp("/open2", cmdtext, true, 10) == 0)
    {
        MoveObject(O2,40942383,713.22784424,12.44526672, 2.00);
        SetTimer("close", 7000, 0);//gate will be closed for 7 seconds
        SendClientMessage(playerid,COLOR_YELLOW,"enter text here");
        return 1;
    }
    return 0;
}

public close()
{
    MoveObject(O1,68286133,773.33685303,4, 3.00);
    MoveObject(O2,1357,40942383,713.22784424,4, 3.00);
    return 1;
}
Jonnyboy's but removed unwanted stuff and re-arranged to make it easier to read.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)