17.06.2013, 17:05
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-
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-
write those on line 9 and 10
7-
write this on line 12
8-
write this on line 13
9-
write this on line 15
10-
on line 16
11-
on line 17
12-
on line 18
13-
on line 20
14-
on line 21
15-
on line 22,23,24
16-
on line 25
17-
on line 26 and 27
18-
on line 28
19-
on line 29 30
20-
on line 31 32 33
1-open pawno and make a new blankscript.
2-
Quote:
include <a_samp> |
2-
Quote:
new GateID[1]; |
4-
Quote:
public OnFilterScriptInit() |
5-
Quote:
{ |
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); |
7-
Quote:
return 1; |
8-
Quote:
} |
9-
Quote:
public OnFilterScriptExit() |
10-
Quote:
{ |
11-
Quote:
return 1; |
12-
Quote:
} |
13-
Quote:
public OnPlayerUpdate(playerid) |
14-
Quote:
{ |
15-
Quote:
new pname[24],YourName[128]; format(YourName,128,"namehere"); // Put Your Name Here GetPlayerName(playerid,pname,24); |
16-
Quote:
if(!strcmp(YourName,pname,true) && IsPlayerInRangeOfPoint(playerid, 3.0, 1535.00000000,-1451.30004883,12.39999962)) { |
17-
Quote:
MoveObject(GateID[1], 1539.69995117,-1451.30004883,12.39999962,10); MoveObject(GateID[2], 1529.80004883,-1451.30004883,12.39999962,10); |
18-
Quote:
}else { |
19-
Quote:
MoveObject(GateID[1], 1535.00000000,-1451.30004883,12.39999962,10); MoveObject(GateID[2], 1534.80004883,-1451.30004883,12.39999962,10); |
20-
Quote:
} return 1; } |