[HELP] Move gates
#1

Код:
D:\Server 3c\pawno\include\streamer.inc(435) : warning 202: number of arguments does not match definition
D:\Server 3c\pawno\include\streamer.inc(449) : warning 202: number of arguments does not match definition
D:\SERVER~3\FILTER~1\miestas.pwn(31) : warning 217: loose indentation
D:\SERVER~3\FILTER~1\miestas.pwn(703) : warning 217: loose indentation
D:\SERVER~3\FILTER~1\miestas.pwn(757) : warning 213: tag mismatch
D:\SERVER~3\FILTER~1\miestas.pwn(775) : error 021: symbol already defined: "Streamer_OnFilterScriptInit"
D:\SERVER~3\FILTER~1\miestas.pwn(781) : error 021: symbol already defined: "GateCheck"
D:\SERVER~3\FILTER~1\miestas.pwn(801) : error 021: symbol already defined: "Streamer_OnFilterScriptInit"
D:\SERVER~3\FILTER~1\miestas.pwn(807) : error 021: symbol already defined: "GateCheck"
D:\SERVER~3\FILTER~1\miestas.pwn(827) : error 021: symbol already defined: "Streamer_OnFilterScriptInit"
D:\SERVER~3\FILTER~1\miestas.pwn(833) : error 021: symbol already defined: "GateCheck"
D:\SERVER~3\FILTER~1\miestas.pwn(853) : error 021: symbol already defined: "Streamer_OnFilterScriptInit"
D:\SERVER~3\FILTER~1\miestas.pwn(859) : error 021: symbol already defined: "GateCheck"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


8 Errors.
Reply
#2

please show us your preferable codes. BTW you defined GateCheck twice or thrice
Reply
#3

oh i solved this problem by myself
Reply
#4

hell, oh no there r some 4 missing errors
Код:
D:\Server 3c\pawno\include\streamer.inc(435) : warning 202: number of arguments does not match definition
D:\Server 3c\pawno\include\streamer.inc(449) : warning 202: number of arguments does not match definition
D:\SERVER~3\FILTER~1\miestas.pwn(35) : warning 217: loose indentation
D:\SERVER~3\FILTER~1\miestas.pwn(707) : warning 217: loose indentation
D:\SERVER~3\FILTER~1\miestas.pwn(761) : warning 213: tag mismatch
D:\SERVER~3\FILTER~1\miestas.pwn(779) : error 021: symbol already defined: "Streamer_OnFilterScriptInit"
D:\SERVER~3\FILTER~1\miestas.pwn(805) : error 021: symbol already defined: "Streamer_OnFilterScriptInit"
D:\SERVER~3\FILTER~1\miestas.pwn(831) : error 021: symbol already defined: "Streamer_OnFilterScriptInit"
D:\SERVER~3\FILTER~1\miestas.pwn(857) : error 021: symbol already defined: "Streamer_OnFilterScriptInit"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply
#5

Post your code!
Reply
#6

pawn Код:
//--------- Research outro ---------

public OnFilterScriptInit()
{
    SetTimer("GateCheck", 500, true);
    boxes = CreateDynamicObject(18260,2680.30444336,3969.71020508,7.33100510,0.00000000,0.00000000,311.23046875);
    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 OnFilterScriptInit()
{
    SetTimer("Gate1Check", 500, true);
    lab1 = CreateDynamicObject(2951,2668.81933594,3961.33203125,5.57493210,0.00000000,0.00000000,312.12707520); //object(a51_labdoor) (3)
    return 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 OnFilterScriptInit()
{
    SetTimer("Gate2Check", 500, true);
    lab2 = CreateDynamicObject(2951,2657.72460938,3950.75073242,5.57493210,0.00000000,0.00000000,312.12707520); //object(a51_labdoor) (2)
    return 1;
}
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 OnFilterScriptInit()
{
    SetTimer("Gate3Check", 500, true);
    lab3 = CreateDynamicObject(2951,2667.74267578,3967.53808594,5.57493210,0.00000000,0.00000000,224.78771973); //object(a51_labdoor) (3)
    return 1;
}
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 OnFilterScriptInit()
{
    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 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
#7

pawn Код:
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);
            }
        }
    }
}
Some errors fixeds... you never can have more then 1 public OnFilerScriptInit() It shoud work now i think... and btw, read this please!

https://sampforum.blast.hk/showthread.php?tid=199560
Reply
#8

thanks for help! it works!
Reply
#9

mayb u know how to fix tht because it fails.
1.when im want to open this door i no need to put password ijust press cancel, ok or enter and doors open without password.

2. If i want open door next time doors wont to open.

pawn Код:
//--------- Research gates with password ---

#define doorPw "MyCatIsDumb"
new bool:DoorStatus;

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys & KEY_SECONDARY_ATTACK && IsPlayerInRangeOfPoint(playerid, 1.5, 2678.04663086,3966.71850586,7.23182821))
    {
        ShowPlayerDialog(playerid, 1, 1, "Doors", "Please type in the password to continue:", "Go", "Cancel");
    }
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 1)
    {
        if(!strcmp(inputtext, doorPw, false))
        {
            if(!DoorStatus)
            {
                MoveDynamicObject(labdoor, 2674.99414062,3967.00097656,8.58553982, 2.0);
                SetTimer("labdoor", 4500, false);
                SetTimer("CloseDoors", 4500, false);
                DoorStatus = 1;
            }
            return 1;
        }
        else return ShowPlayerDialog(playerid, 2, 0, "Error", "That's not the right password!", "Ok", "");
    }
    return 0;
}
forward CloseDoors();
public CloseDoors()
{
    MoveDynamicObject(labdoor, 2674.99438477,3967.00122070,5.57493162, 2.0); // close the doors here
    return 1;
}
Reply
#10

HUm, this si too smart for me sorry!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)