gates Problem
#2

Tip: Always take care about a good indentation.

pawn Код:
#include <a_samp>
#include <streamer>
#define red 0xFF0000AA
#define Message_color 0xFF0000AA
new bus;
new bus2;
new objmoved;
forward Tolls(playerid);
forward Close();


public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print("bus barriier");
    print("--------------------------------------\n");
    bus = CreateDynamicObject(969, 1957.5999755859, -2176.6000976563, 12.699999809265, 0, 0, 0);
    bus2 = CreateDynamicObject(980, 970.29998779297, 757.70001220703, 12.5, 0, 0, 290.25006103516);
    //-------------------------------------Objects--------------------------------------------------//
    CreateDynamicObject(8657, 1981.5999755859, -2177.1000976563, 13.699999809265, 0, 0, 270);
    CreateDynamicObject(8657, 1981.5999755859, -2177.1000976563, 14.800000190735, 0, 0, 269.99450683594);
    CreateDynamicObject(8657, 1941.9000244141, -2177.1000976563, 13.699999809265, 0, 0, 269.99450683594);
    CreateDynamicObject(8657, 1941.9000244141, -2177.1000976563, 15, 0, 0, 269.99450683594);
    /////////////////////////////////////// Tollage sf to lv///////////////////////////////////////////////
    //------------------------------------------------------------------------------------------------//
    objmoved = 0;
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}
public OnPlayerConnect( playerid )
{
    SetTimerEx("Tolls", 1500, true, "d", playerid);
    return 1;
}

public Tolls(playerid)
{
    if(GetPlayerSkin(playerid) == 253 || GetPlayerSkin(playerid) == 255)
    {
        if(IsPlayerInRangeOfPoint(playerid, 10.0, 1957.5999755859, -2176.6000976563, 12.699999809265))
        {
            MoveDynamicObject(bus, 1948.5999755859, -2176.6000976563, 12.699999809265, 2.5);
            objmoved = 1;
            SetTimerEx("Close",7000,false,"i", 0);
        }
        else if(IsPlayerInRangeOfPoint(playerid, 10.0, 970.29998779297, 757.70001220703, 12.5))
        {
            MoveDynamicObject(bus2, 970.29998779297, 757.70001220703, 7.3000001907349, 2.5);
            objmoved = 2;
            SetTimerEx("Close",7000,false,"i", 0);
        }
    }
    return 1;
}

public Close()
{
    if(objmoved == 1)
    {
        MoveDynamicObject(bus, 1957.5999755859, -2176.6000976563, 12.699999809265, 3.5);
        objmoved = 0;
    }
    if(objmoved == 2)
    {
        MoveDynamicObject(bus2, 970.29998779297, 757.70001220703, 12.5, 3.5);
        objmoved = 0;
    }
    return 1;
}
Reply


Messages In This Thread
gates Problem - by [LHT]Bally - 08.04.2012, 17:49
Re: gates Problem - by Jeffry - 08.04.2012, 17:54
Re: gates Problem - by [LHT]Bally - 08.04.2012, 17:56

Forum Jump:


Users browsing this thread: 1 Guest(s)