[Help] Automatic Gate
#2

Quote:
Originally Posted by Sodierlow
View Post
hello guys,
I have a problem with my automatic gate system.

I'm supposed to open the gate to a particular player, but is open exclusively to me ..
pawn Code:
new barrackgate;
new portarogate1;
//new portarogate2;
public OnGameModeInit()
{
    SetTimer("BaracchiGate",1000,true); //setto il timer per il cancello di barrack
    SetTimer("PortaroGate",1000,true); //setto il timer per il cancello di portaro
    barrackgate = CreateObject(976, -225.27685546875, 2614.13671875, 61.708999633789, 0, 0, 0, 500);
     //CreateObject(976, -225.27685546875, 2614.13671875, 57.709098815918, 0, 0, 0, 500);
    portarogate1 = CreateObject(976, 997.58355712891, 1687.7630615234, 5.921875, 0, 0, 270);
    //CreateObject(976, 997.58355712891, 1687.7630615234, 10.199999809265, 0, 0, 270);
}

forward BaracchiGate(playerid);
public BaracchiGate(playerid)
{
    new barrackgate_status;
    new pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
    for(new Mauro_Baracchi; Mauro_Baracchi<MAX_PLAYER_NAME; Mauro_Baracchi++)
    {
        if(!IsPlayerConnected(Mauro_Baracchi)) continue;
        if(IsPlayerInRangeOfPoint(playerid, 10.0, -225.27685546875, 2614.13671875, 61.708999633789))barrackgate_status=1;
    }
    if(barrackgate_status)MoveObject(barrackgate,-225.27685546875, 2614.13671875, 57.709098815918, 2);
    else MoveObject(barrackgate, -225.27685546875, 2614.13671875, 61.708999633789, 2);

}

forward PortaroGate(playerid);
public PortaroGate(playerid)
{
    new portarogate_status;
    new pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
    for(new Andrea_Portaro; Andrea_Portaro<MAX_PLAYER_NAME; Andrea_Portaro++)
    {
        if(!IsPlayerConnected(Andrea_Portaro)) continue;
        if(IsPlayerInRangeOfPoint(playerid, 10.0, 997.58355712891, 1687.7630615234, 10.199999809265))portarogate_status=1;
    }
    if(portarogate_status)MoveObject(portarogate1, 997.58355712891, 1687.7630615234, 5.921875, 2);
    else MoveObject(portarogate1, 997.58355712891, 1687.7630615234, 10.199999809265, 2);
}
Mauro_Baracchi & Andrea_Portaro are the players who should open their gates


P.S. Sorry for my bad english


Help Me..Please
i know how to make auto gates ^^ and u did everything wrong

can make an re-code for this
Reply


Messages In This Thread
[Help] Automatic Gate - by Sodierlow - 24.11.2010, 20:27
Re: [Help] Automatic Gate - by jonnyboy - 24.11.2010, 20:39
Re: [Help] Automatic Gate - by jonnyboy - 24.11.2010, 20:48
Re: [Help] Automatic Gate - by Nushi - 24.11.2010, 23:59
Re: [Help] Automatic Gate - by Sodierlow - 25.11.2010, 08:18
Re: [Help] Automatic Gate - by Sodierlow - 26.11.2010, 06:03
Re: [Help] Automatic Gate - by Sodierlow - 26.11.2010, 20:24
Re: [Help] Automatic Gate - by Darien - 31.01.2011, 18:59
Re: [Help] Automatic Gate - by ricardo178 - 31.01.2011, 19:50
Re: [Help] Automatic Gate - by Lorrden - 31.01.2011, 22:34

Forum Jump:


Users browsing this thread: 1 Guest(s)