[HELP] Hell i still have mistakes
#1

i dont understand why these doors open just for me, but not for others even other is rcon admin.

pawn Code:
//--------- Research gates ---------
public OnFilterScriptInit()
{
    SetTimer("GateCheck", 500, true);
    boxes = CreateDynamicObject(18260,2680.30444336,3969.71020508,7.33100510,0.00000000,0.00000000,311.23046875);

    SetTimer("Gate1Check", 500, true);
    lab1 = CreateDynamicObject(2951,2668.81933594,3961.33203125,5.57493210,0.00000000,0.00000000,312.12707520); //object(a51_labdoor) (3)

    SetTimer("Gate2Check", 500, true);
    lab2 = CreateDynamicObject(2951,2657.72460938,3950.75073242,5.57493210,0.00000000,0.00000000,312.12707520); //object(a51_labdoor) (2)

    SetTimer("Gate3Check", 500, true);
    lab3 = CreateDynamicObject(2951,2667.74267578,3967.53808594,5.57493210,0.00000000,0.00000000,224.78771973); //object(a51_labdoor) (3)

    SetTimer("Gate4Check", 500, true);
    lab4 = CreateDynamicObject(2951,2658.64379883,3976.94995117,5.57493210,0.00000000,0.00000000,224.78576660); //object(a51_labdoor) (4)


    return 1;
}
public GateCheck()
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(IsPlayerInRangeOfPoint(i, 5.0, 2681.29, 3972.49, 6.76))
            {
                MoveDynamicObject(boxes, 2683.57153320,3966.04736328,7.33100510, 5.0);
            }
            else
            {
                MoveDynamicObject(boxes, 2680.30444336,3969.71020508,7.33100510, 5.0);
            }
        }
   }
}

//--------- Research gates nr 1 --------------

public Gate1Check()
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(IsPlayerInRangeOfPoint(i, 5.0, 2668.81933594,3961.33203125,5.57493210))
            {
                MoveDynamicObject(lab1, 2668.81933594,3961.33227539,8.58553982, 5.0);
            }
            else
            {
                MoveDynamicObject(lab1, 2668.81933594,3961.33203125,5.57493210, 5.0);
            }
        }
    }
}

//--------- Research gates nr 2 --------------
public Gate2Check()
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(IsPlayerInRangeOfPoint(i, 5.0, 2657.72460938,3950.75073242,5.57493210))
            {
                MoveDynamicObject(lab2, 2657.72460938,3950.75000000,8.58553982, 5.0);
            }
            else
            {
                MoveDynamicObject(lab2, 2657.72460938,3950.75073242,5.57493210, 5.0);
            }
        }
    }
}

//--------- Research gates nr 3 --------------
public Gate3Check()
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(IsPlayerInRangeOfPoint(i, 5.0, 2667.74267578,3967.53808594,5.57493210))
            {
                MoveDynamicObject(lab3, 2667.74218750,3967.53808594,8.58553982, 5.0);
            }
            else
            {
                MoveDynamicObject(lab3, 2667.74267578,3967.53808594,5.57493210, 5.0);
            }
        }
    }
}

//--------- Research gates nr 4 --------------


public Gate4Check()
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(IsPlayerInRangeOfPoint(i, 5.0, 2658.64379883,3976.94995117,5.57493210))
            {
                MoveDynamicObject(lab4, 2658.64355469,3976.94921875,8.58553982, 5.0);
            }
            else
            {
                MoveDynamicObject(lab4, 2658.64379883,3976.94995117,5.57493210, 5.0);
            }
        }
    }
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)