[Help] Automatic Gate
#10

Quote:
Originally Posted by jonnyboy
View Post
this will help
pawn Code:
/*==============================================================================
*                             MADE BY JONNYBOY                                 =
*THIS SCRIPT IS FOR THOSE THAT NEED HELP WITH AUTO GATES!  DON'T REMOVE CREDITS!=
*=============================================================================*/

/*
TIP: YOU NEED TO CHANGE SOME STUFF! like where it should go! "0,0,0"
*/

#define FILTERSCRIPT
#define COLOR_YELLOW 0xFFFF00AA

#include <a_samp>
new portarogate1;
new barrackgate;
#if defined FILTERSCRIPT

forward close();

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" AutoGates");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#else

main()
{
    print("\n----------------------------------");
    print(" ITS A FILTERSCRIPT");
    print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
     barrackgate = CreateObject(976,-225.27685546875,2614.13671875,61.708999633789,0,0,0, 500);
     portarogate1 = CreateObject(976,997.58355712891,1687.7630615234,5.921875,0,0, 270);
     return 1;
}

public close()
{
    MoveObject(barrackgate,-225.27685546875,2614.13671875,61.708999633789, 3.00);
    MoveObject(portarogate1,997.58355712891,1687.7630615234,5.921875, 3.00);
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/PG1", cmdtext, true, 10) == 0)
    {
    MoveObject(portarogate1,0,0,0, 2.00);
    SetTimer("close", 7000, 0);//Changeme
    SendClientMessage(playerid,COLOR_YELLOW,"Changeme");
    return 1;
    }
   
    if (strcmp("/BG", cmdtext, true, 10) == 0)
    {
    MoveObject(barrackgate,0,0,0, 2.00);
    SetTimer("close", 7000, 0);//Changeme
    SendClientMessage(playerid,COLOR_YELLOW,"Changeme");
    return 1;
    }

    return 0;
}
WARNING
DON'T CHANGE THE CREDITS!
change stuff that you want it.
Somehow... Adding objects @ OnGameModeInit doesn't seem like it should work?
But I don't know, I havn't been working with FS's alot...

Just to make sure you don't give the guy bad information..
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)