Gate Command Issues
#2

What about this? xD

pawn Код:
#define COLOR_YELLOW 0x33AA33AA

new AirportGate;
new FireGate;

forward Resetbase();
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    //AirportGate
    if (strcmp("/ap", cmdtext, true) == 0)
    {
        if(PlayerTeam[playerid] == Team_Fire || PlayerTeam[playerid] == Team_LVPD || PlayerTeam[playerid] == Team_EMS)
        {
            MoveObject(AirportGate, 2114.857421875,2841.505859375,12.5,10); //Coordinates when it should be open
            SetTimer("Resetbase",5000,0); //you can change the time, it closes after 5 seconds now.
            return 1;
        }
    }
    //FireGate
    if (strcmp("/fd", cmdtext, true) == 0)
    {
        if(PlayerTeam[playerid] == Team_Fire)
        {
            SendClientMessage(playerid,COLOR_YELLOW,"[INFO]: Fire Dept Gate Opening!");
            MoveObject(FireGate,2526.25,683.5712890625,11.495002746582,10) //Coordinates when it should be open
            SetTimer("Resetbase",5000,0); //you can change the time, it closes after 5 seconds now.
            return 1;
        }
    }
    return 0;
}
pawn Код:
public Resetbase()
{
    MoveObject(AirportGate, 958.1621,2103.1962,1011.2694, 2.00); //Coordinates when it should be locked
    MoveObject(FireGate, 960.1875,2090.7861,9.7842, 2.00); //Coordinates when it should be locked
    }
Reply


Messages In This Thread
Gate Command Issues - by [UG]Scripter - 20.11.2010, 02:11
Re: Gate Command Issues - by Larsey123IsMe - 20.11.2010, 02:31
Re: Gate Command Issues - by [UG]Scripter - 20.11.2010, 02:55
Re: Gate Command Issues - by Steven82 - 20.11.2010, 03:52
Re: Gate Command Issues - by [UG]Scripter - 20.11.2010, 03:58
Re: Gate Command Issues - by Steven82 - 20.11.2010, 04:14

Forum Jump:


Users browsing this thread: 1 Guest(s)