[Tutorial] Creating an Automatic Gate
#21

Nice tut.

but can i make an Filterscript From it ??
Reply
#22

Quote:
Originally Posted by Justinlampy
View Post
Nice tut.

but can i make an Filterscript From it ??
If you would ****** up "The Definition of Tutorials", You'll most probably get something related with: "An printed or digital manual where an software user using examples of the important parts of that software explains to others."

My point with that is, Tutorials is an theard with explaination for people to learn that is based on scripting.. And Not to release scripts..

Just saying.
Reply
#23

nice tutorial
Reply
#24

Quote:
Originally Posted by Rolyy
View Post
If you would ****** up "The Definition of Tutorials", You'll most probably get something related with: "An printed or digital manual where an software user using examples of the important parts of that software explains to others."

My point with that is, Tutorials is an theard with explaination for people to learn that is based on scripting.. And Not to release scripts..

Just saying.
ROFL, This makes my day.
And indeed nice tutorial.
Reply
#25

ey i get close to the gate but it doesnt open how to fix this? here is the code:
pawn Code:
public CheckGate()
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(IsPlayerInRangeOfPoint(i, 10.0, -1572.1834716797, 658.83563232422, 6.96250295639042))
            {
                MoveObject(AutomaticGate, -1572.1834716797, 658.83563232422, 6.9625029563904, 0, 90);
            }
            else
            {
                MoveObject(AutomaticGate, -1575.4208984375, 660.19921875, 6.1875, 0, 90);
            }
        }
    }
}
and here the warnings:
Code:
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\sf90s.pwn(1393) : warning 202: number of arguments does not match definition
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\sf90s.pwn(1397) : warning 202: number of arguments does not match definition
i used these createobjects:
pawn Code:
CreateObject(968, -1572.1834716797, 658.83563232422, 6.9625029563904, 0, 90.250213623047, 90);
CreateObject(968, -1575.4208984375, 660.19921875, 6.1875, 0, 90.247192382813, 90);
Reply
#26

wtf D:\Users\Tanush\Desktop\SA-MP\gamemodes\Server.pwn(1312) : warning 235: public function lacks forward declaration (symbol "CheckGate")
D:\Users\Tanush\Desktop\SA-MP\gamemodes\Server.pwn(1339) : warning 217: loose indentation
D:\Users\Tanush\Desktop\SA-MP\gamemodes\Server.pwn(1339) : error 029: invalid expression, assumed zero
D:\Users\Tanush\Desktop\SA-MP\gamemodes\Server.pwn(1339) : error 004: function "Streamer_OnPlayerDisconnect" is not implemented
D:\Users\Tanush\Desktop\SA-MP\gamemodes\Server.pwn(1342) : error 017: undefined symbol "playerid"
D:\Users\Tanush\Desktop\SA-MP\gamemodes\Server.pwn(1343) : error 017: undefined symbol "reason"
D:\Users\Tanush\Desktop\SA-MP\gamemodes\Server.pwn(1355) : error 017: undefined symbol "playerid"
D:\Users\Tanush\Desktop\SA-MP\gamemodes\Server.pwn(1356) : error 017: undefined symbol "playerid"
D:\Users\Tanush\Desktop\SA-MP\gamemodes\Server.pwn(1357) : error 017: undefined symbol "playerid"
D:\Users\Tanush\Desktop\SA-MP\gamemodes\Server.pwn(135 : error 017: undefined symbol "playerid"
D:\Users\Tanush\Desktop\SA-MP\gamemodes\Server.pwn(1359) : error 017: undefined symbol "playerid"
D:\Users\Tanush\Desktop\SA-MP\gamemodes\Server.pwn(1360) : error 017: undefined symbol "playerid"
D:\Users\Tanush\Desktop\SA-MP\gamemodes\Server.pwn(1361) : error 017: undefined symbol "playerid"
D:\Users\Tanush\Desktop\SA-MP\gamemodes\Server.pwn(1362) : error 017: undefined symbol "playerid"
D:\Users\Tanush\Desktop\SA-MP\gamemodes\Server.pwn(1366) : error 017: undefined symbol "playerid"
D:\Users\Tanush\Desktop\SA-MP\gamemodes\Server.pwn(136 : error 017: undefined symbol "playerid"
D:\Users\Tanush\Desktop\SA-MP\gamemodes\Server.pwn(1370) : error 017: undefined symbol "playerid"
D:\Users\Tanush\Desktop\SA-MP\gamemodes\Server.pwn(1371) : error 017: undefined symbol "playerid"
D:\Users\Tanush\Desktop\SA-MP\gamemodes\Server.pwn(1372) : error 017: undefined symbol "playerid"
D:\Users\Tanush\Desktop\SA-MP\gamemodes\Server.pwn(1373) : error 017: undefined symbol "playerid"
D:\Users\Tanush\Desktop\SA-MP\gamemodes\Server.pwn(1374) : error 017: undefined symbol "playerid"
D:\Users\Tanush\Desktop\SA-MP\gamemodes\Server.pwn(1375) : error 017: undefined symbol "playerid"
D:\Users\Tanush\Desktop\SA-MP\gamemodes\Server.pwn(1376) : error 017: undefined symbol "playerid"
D:\Users\Tanush\Desktop\SA-MP\gamemodes\Server.pwn(1377) : error 017: undefined symbol "playerid"
D:\Users\Tanush\Desktop\SA-MP\gamemodes\Server.pwn(137 : error 017: undefined symbol "playerid"
D:\Users\Tanush\Desktop\SA-MP\gamemodes\Server.pwn(1379) : error 017: undefined symbol "playerid"
D:\Users\Tanush\Desktop\SA-MP\gamemodes\Server.pwn(1380) : error 017: undefined symbol "playerid"
D:\Users\Tanush\Desktop\SA-MP\gamemodes\Server.pwn(1383) : error 017: undefined symbol "playerid"

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


26 Errors.
Reply
#27

i did this but when iam alone in server it opens when someone connects it opens for him and doesnt open for me

pawn Code:
forward gatecheck();
public gatecheck()
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(IsPlayerInRangeOfPoint(i, 15.0,1545.93554688,-1626.52050781,12.58281231))
            {
                MoveObject(lspleftgate, 1545.93554688,-1617.52050781,12.58281231, 5.0);
                MoveObject(lsprightgate, 1545.93554688,-1635.82055664,12.58281231, 5.0);
            }
            else if(IsPlayerInRangeOfPoint(i, 15.0, 1140.91699219,-1292.01171875,12.68227100))
            {
                MoveObject(lsmgate1, 1148.21447754,-1292.01245117,12.68227100, 5.0);
                MoveObject(lsmgate2, 1133.91699219,-1292.01171875,12.68227100, 5.0);
            }
            else if(IsPlayerInRangeOfPoint(i, 15.0, 1591.87133789,-1638.18017578,13.89877319))
            {
                MoveObject(lspgar, 1591.87133789, -1638.18017578, 6.89877319, 5.0);
            }
            else
            {
                MoveObject(lspleftgate, 1545.93554688,-1626.52050781,12.58281231, 5.0);
                MoveObject(lsprightgate, 1545.93554688,-1626.82055664,12.58281231, 5.0);
                MoveObject(lsmgate1, 1141.21447754,-1292.01245117,12.68227100, 5.0);
                MoveObject(lsmgate2, 1140.91699219,-1292.01171875,12.68227100, 5.0);
            }
        }
    }
    return 1;
}
Reply
#28

Nice tutorial
Reply
#29

Is there a way i can make it to were the gate will open only for 1 person?
Reply
#30

Good tutorial
Reply
#31

500s ? No way!
Reply
#32

Quote:
Originally Posted by BaubaS
View Post
500s ? No way!
Not seconds, milliseconds.

500ms = 1/2 a second.. not 500 seconds..
Reply
#33

hey lol
i get many erros but im putting in a filterscript ?
is that i get that many errors ?

Code:
C:\Users\Dennis\Downloads\server\filterscripts\AdminHouse2.pwn(551) : error 029: invalid expression, assumed zero
C:\Users\Dennis\Downloads\server\filterscripts\AdminHouse2.pwn(551) : error 004: function "CheckGate" is not implemented
C:\Users\Dennis\Downloads\server\filterscripts\AdminHouse2.pwn(552) : warning 217: loose indentation
C:\Users\Dennis\Downloads\server\filterscripts\AdminHouse2.pwn(557) : warning 202: number of arguments does not match definition
C:\Users\Dennis\Downloads\server\filterscripts\AdminHouse2.pwn(579) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
im having already forward CheckGate();


how to fix errors please ?


im having this ..
Code:
public CheckGate()
    {
	    for(new i=0; i<MAX_PLAYERS; i++)
 	    	{
  		  if(IsPlayerConnected(i))
	                        {
         		            if(IsPlayerInRangeOfPoint(i, 10.0, -1184.54418945, -996.06542969, 130.38134766, 5.00))
           		                         {
				      MoveObject(AutomaticGate, -1184.2901611328, -996.14276123047, 123.37306976318 , 5.00);
					  }
	  					else
					  {
					  MoveObject(AutomaticGate, -1184.54418945, -996.06542969, 130.38134766, 5.0);
   				}
	  		}
		}
	}
Reply
#34

nice tut
Reply
#35

Fixed, awesome tutorial, but SA-MP's wiki guide is better.
Reply
#36

I think that for Automatic Gates is more simple to use like this :
pawn Code:
public OnPlayerUpdate(playerid)
{
    if(IsPlayerInRangeOfPoint(playerid,13.00,X,Y,Z)) // X,Y,Z Cordinates of closest gate
    {
        MoveDynamicObject(gate,X,Y,Z,2.00); // Cordinates of opened gate
        SetTimer("close",7000,false);
        return 1;
    }
   

    return 1;
}
forward close();
public close()
{
    MoveDynamicObject(gate,X,Y,Z,2.00); // Cordinates of closed gate
    return 1;
}
i was test it and it work for me..
Reply
#37

AWESOME
Reply
#38

Код:
C:\Users\Heni\Desktop\Express Gaming RP fixed\gamemodes\EGRP.pwn(19133) : error 029: invalid expression, assumed zero
C:\Users\Heni\Desktop\Express Gaming RP fixed\gamemodes\EGRP.pwn(19133) : error 004: function "CheckGate" is not implemented
C:\Users\Heni\Desktop\Express Gaming RP fixed\gamemodes\EGRP.pwn(19148) : warning 225: unreachable code
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply
#39

Quote:
Originally Posted by Heni
Посмотреть сообщение
Код:
C:\Users\Heni\Desktop\Express Gaming RP fixed\gamemodes\EGRP.pwn(19133) : error 029: invalid expression, assumed zero
C:\Users\Heni\Desktop\Express Gaming RP fixed\gamemodes\EGRP.pwn(19133) : error 004: function "CheckGate" is not implemented
C:\Users\Heni\Desktop\Express Gaming RP fixed\gamemodes\EGRP.pwn(19148) : warning 225: unreachable code
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Post your code
Reply
#40

Fixed , Anyways Thanks...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)