[Tutorial] How to make a gate opens by name
#1

Hello sa-mp . This Tutorial is how you can make a gate that opens by a name.
1-open pawno and make a new blankscript.
2-
Quote:

include <a_samp>

you should write this in the second line
2-
Quote:

new GateID[1];

you should write this inj the 4th line
4-
Quote:

public OnFilterScriptInit()

if you want it as a FS. write this in the 6th line
5-
Quote:

{

write this in the 7th line so u dont get an error
6-
Quote:

GateID[1] = CreateObject(object id, pos=x, pos=y, pos=z, rotate=x, rotate=y, rotate=z, 100.0);
GateID[2] = CreateObject(object id, pos=x, pos=y, pos=z, rotate=x, rotate=y, rotate=z, 100.0);

write those on line 9 and 10
7-
Quote:

return 1;

write this on line 12
8-
Quote:

}

write this on line 13
9-
Quote:

public OnFilterScriptExit()

write this on line 15
10-
Quote:

{

on line 16
11-
Quote:

return 1;

on line 17
12-
Quote:

}

on line 18
13-
Quote:

public OnPlayerUpdate(playerid)

on line 20
14-
Quote:

{

on line 21
15-
Quote:

new pname[24],YourName[128];
format(YourName,128,"namehere"); // Put Your Name Here
GetPlayerName(playerid,pname,24);

on line 22,23,24
16-
Quote:

if(!strcmp(YourName,pname,true) && IsPlayerInRangeOfPoint(playerid, 3.0, 1535.00000000,-1451.30004883,12.39999962)) {

on line 25
17-
Quote:

MoveObject(GateID[1], 1539.69995117,-1451.30004883,12.39999962,10);
MoveObject(GateID[2], 1529.80004883,-1451.30004883,12.39999962,10);

on line 26 and 27
18-
Quote:

}else {

on line 28
19-
Quote:

MoveObject(GateID[1], 1535.00000000,-1451.30004883,12.39999962,10);
MoveObject(GateID[2], 1534.80004883,-1451.30004883,12.39999962,10);

on line 29 30
20-
Quote:

}
return 1;
}

on line 31 32 33
Reply


Messages In This Thread
How to make a gate opens by name - by JackWatson - 17.06.2013, 17:05
Re: How to make a gate opens by name - by Realds - 18.06.2013, 06:24
Re: How to make a gate opens by name - by Kiweeh - 18.06.2013, 18:03
Re: How to make a gate opens by name - by Kindred - 18.06.2013, 18:32
Re: How to make a gate opens by name - by MyNinja - 18.06.2013, 18:37
Re: How to make a gate opens by name - by JackWatson - 19.06.2013, 15:11
Re: How to make a gate opens by name - by Chrisis - 01.07.2013, 07:37
Re: How to make a gate opens by name - by Ryan_Bowe - 06.07.2013, 04:59
Re: How to make a gate opens by name - by Team_PRO - 06.07.2013, 05:22

Forum Jump:


Users browsing this thread: 1 Guest(s)