Automatic Gates
#1

I create this, but i need gates open only if player name is "Creed". Thanks.


pawn Код:
//=======================Automatic Gates By Creed=======================//
#include <a_samp>
new gate1;
public OnFilterScriptInit()
{
    gate1 = CreateObject(19464, -1980.23560, 192.90941, 28.41513,   0.00000, 0.00000, 0.00000);
    return 1;
}
public OnGameModeInit()
{
    SetTimer("CheckGate",1000,true);
}
    forward CheckGate();
    public CheckGate()
{
    new gate1_status;
    for(new i;i<MAX_PLAYERS;i++)
    {
        if(!IsPlayerConnected(i)) continue;
        if(IsPlayerInRangeOfPoint(i,10.0,-1980.23560, 192.90941, 28.41513))gate1_status=1;
    }
    if(gate1_status)MoveObject(gate1, -1980.23462, 198.85905, 28.41513,4);
    else MoveObject(gate1, -1980.23560,192.90941, 28.41513,4);
}
pawn Код:
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase
Reply


Messages In This Thread
Automatic Gates - by CREED115 - 04.01.2016, 19:36
Re: Automatic Gates - by Stones - 04.01.2016, 19:38
Re: Automatic Gates - by lucamsx - 04.01.2016, 19:42

Forum Jump:


Users browsing this thread: 1 Guest(s)