Automatic gate problem
#1

My script:
Код:
new Gate;
new GateOpen =0;
Код:
forward GatesOpen();
forward GatesClose();
Код:
SetTimer("GatesOpen",1000,1);
 	Gate = CreateObject(3578, 1810.63013, 813.19897, 10.39397,   0.00000, 0.00000, 359.99155);
Код:
public GatesOpen()
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
     	  if(PlayerToPoint(10.0, i, 1810.8959,806.5244,10.9965,3.8343) && GateOpen == 0) 
        {
            {
                MoveObject(Gate, 3578, 1810.63013, 813.19897, 9.07167, 5);
                GateOpen =1;
                SetTimer("GatesClose",7000,0);
        }
        }
    }
}

public GatesClose()
{
     MoveObject(Gate,3578, 1810.63013, 813.19897, 10.39397, 5); 
     GateOpen =0;
}
PlayerToPoint(Float:radius, playerid, Float:X, Float:Y, Float:Z)
{
    new Float:oldpos[3], Float:temppos[3];
    GetPlayerPos(playerid, oldpos[0], oldpos[1], oldpos[2]);
    temppos[0] = (oldpos[0] -X);
    temppos[1] = (oldpos[1] -Y);
    temppos[2] = (oldpos[2] -Z);
    if(((temppos[0] < radius) && (temppos[0] > -radius)) && ((temppos[1] < radius) && (temppos[1] > -radius)) && ((temppos[2] < radius) && (temppos[2] > -radius)))
    {
        return true;
    }
    return false;
}
The error:
Код:
D:\WORLD ATTACK\gamemodes\Test.pwn(762) : warning 217: loose indentation
D:\WORLD ATTACK\gamemodes\Test.pwn(783) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Warnings.
Reply


Messages In This Thread
Automatic gate problem - by Tuntun - 08.06.2013, 08:21
Re: Automatic gate problem - by S0n1COwnsYou - 08.06.2013, 08:29
Re: Automatic gate problem - by Tuntun - 08.06.2013, 08:30
Re: Automatic gate problem - by S0n1COwnsYou - 08.06.2013, 08:32
Re: Automatic gate problem - by Tuntun - 08.06.2013, 09:08
Re: Automatic gate problem - by S0n1COwnsYou - 08.06.2013, 09:19
Re: Automatic gate problem - by Tuntun - 08.06.2013, 09:25
Re: Automatic gate problem - by IceBilizard - 08.06.2013, 09:32
Re: Automatic gate problem - by Pottus - 08.06.2013, 09:45
Re: Automatic gate problem - by Tuntun - 08.06.2013, 09:50

Forum Jump:


Users browsing this thread: 1 Guest(s)