Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <core>
- #include <float>
- new cades;
- new GateOpen =0;
- forward InitiateGamemode();
- public InitiateGamemode()
- {
- SetTimer("GatesOpen",10000,1);//Bo Dem Thoi Gian 1000 = 1 seconds ->> ...
- }
- public OnPlayerConnect(playerid)
- {
- cades = CreateObject(968, 1811.4558, -1894.2816, 12.4562, 0, 0, 0);//(Object ID 968, , X 1811, Y -1894 , Z 12.4562, ,RotX, RotY, RotZ, Unkown)
- return 1;
- }
- forward GatesOpen();
- public GatesOpen()
- {
- for(new i=0; i<MAX_PLAYERS; i++)//Vong Lap Voi Tat Ca Nguoi Choi
- {
- if(IsPlayerInRangeOfPoint(i, 10.0, 1817.0948, -1890.4753, 13.4163) && GateOpen == 0)//Xac Dinh Duoc Player Co O do khong De no open , Gate 0 moi open
- {
- {
- MoveObject(cades, 1811.4591, -1894.3032, 13.2392, 5);//X,Y,Z Gate Di Chuyen, (Len Tren Cao)
- GateOpen =1;//Active Gate (1 = On)
- SetTimer("GatesClose",10000,0);//Bo Dem Thoi Gian Cho Bien Ke Tiep la 10 seconds
- }
- }
- }
- }
- forward GatesClose();
- public GatesClose()
- {
- MoveObject(cades, 1811.4558, -1894.2816, 12.4562, 5);//Sau khi Gate Dong no Se Quay Lai X,Y,Z ma ban da Add Vao
- GateOpen =0;//Active Gate (0 = Off)
- }
- forward OnPlayerSpawn(playerid);
- public OnPlayerSpawn(playerid)
- {
- SetPlayerPos(playerid, 1817.0948, -1890.4753, 13.4163);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement