How to make a gate opens by name -
JackWatson - 17.06.2013
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-
you should write this in the second line
2-
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-
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-
write this on line 12
8-
write this on line 13
9-
Quote:
public OnFilterScriptExit()
|
write this on line 15
10-
on line 16
11-
on line 17
12-
on line 18
13-
Quote:
public OnPlayerUpdate(playerid)
|
on line 20
14-
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-
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-
on line 31 32 33
Re: How to make a gate opens by name -
Realds - 18.06.2013
Nice guide, I'm sure it will come in handy for some people.
Only one thing, instead of writting under a certain line, next time you should do it under the public. or w/e it's called.
Re: How to make a gate opens by name -
Kiweeh - 18.06.2013
You lose 6.5 bytes on this.
When you define your field never build it new gateID [1] and then use gateID [1].
Cells maybe used for example.
new gateID [1]Gate [0] = ...is wrong:new gate [1];Gate [1] = ...
it will throw error.
Re: How to make a gate opens by name -
Kindred - 18.06.2013
Not a tutorial, you are just telling people to copy and paste.
Re: How to make a gate opens by name -
MyNinja - 18.06.2013
Learn to press tab.
Re: How to make a gate opens by name -
JackWatson - 19.06.2013
Thanks all of you for the advice
but i hope it helped
Re: How to make a gate opens by name -
Chrisis - 01.07.2013
instend of telling us what we write in each line , why don't you paste the whole code and then explain everything because the only thing i understand in this thread is line 1 . line 2 . line 3
Re: How to make a gate opens by name -
Ryan_Bowe - 06.07.2013
....
Re: How to make a gate opens by name -
Team_PRO - 06.07.2013
mabye explain it more