Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <streamer>
- new Gate, bool:GateClosed = true;
- new Garage, bool:GarageClosed = true;
- public OnFilterScriptInit()
- {
- CreateObject(5297,2887.89990234,-1963.00000000,10.60000038,0.00000000,0.00000000,0.00000000); //object(laroads_26b_las01) (1)
- CreateObject(5112,3169.60009766,-1962.93994141,11.60000038,0.00000000,0.00000000,0.00000000); //object(laroads_26_las2) (1)
- CreateObject(5112,3015.94335938,-1963.00000000,11.30000019,0.00000000,0.00000000,0.00000000); //object(laroads_26_las2) (2)
- CreateObject(5296,3301.00000000,-1962.90002441,10.89999962,0.00000000,0.00000000,0.00000000); //object(laroads_26a_las01) (2)
- CreateObject(16120,3338.80004883,-1992.09997559,0.00000000,0.00000000,0.00000000,0.00000000); //object(des_rockgp2_07) (1)
- CreateObject(16120,3337.19995117,-1940.19995117,0.00000000,0.00000000,0.00000000,90.00000000); //object(des_rockgp2_07) (2)
- CreateObject(8483,3360.39990234,-1963.80004883,17.00000000,0.00000000,0.00000000,180.00000000); //object(pirateland02_lvs) (1)
- CreateObject(978,3346.80004883,-1956.69995117,6.09999990,0.00000000,0.00000000,150.00000000); //object(sub_roadright) (1)
- CreateObject(979,3346.30004883,-1968.80004883,6.00000000,0.00000000,0.00000000,25.00000000); //object(sub_roadleft) (1)
- CreateObject(5112,3420.00000000,-1962.90002441,1.10000002,0.00000000,0.00000000,0.00000000); //object(laroads_26_las2) (3)
- CreateObject(3997,3560.00000000,-1960.80004883,5.00000000,0.00000000,0.00000000,90.00000000); //object(cityhallblok_lan) (1)
- CreateObject(3493,3544.60009766,-2014.00000000,7.69999981,0.00000000,0.00000000,0.00000000); //object(vgsn_carpark01) (1)
- CreateObject(9507,3601.30004883,-1962.69995117,17.29999924,0.00000000,0.00000000,270.00000000); //object(bigboxtmp03) (1)
- CreateObject(1506,3593.30004883,-1955.09997559,5.19999981,0.00000000,0.00000000,90.00000000); //object(gen_doorext08) (1)
- CreateObject(4874,3548.39990234,-1897.90002441,8.89999962,0.00000000,0.00000000,0.00000000); //object(helipad1_las) (1)
- Gate = CreateObject(976, 3351.8999023438, -1967.0999755859, 5.1999998092651, 0.0, 0.0, 90, 100.0);
- Garage = CreateObject(9823, 3593.5, -1958.7998046875, 7.0999999046326, 0.0, 0.0, 0, 100.0);
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(!strcmp(cmdtext, "/garage", true)){
- if(GateClosed){
- if(IsPlayerInRangeOfPoint(playerid, 15.0, 3593.5, -1958.7998046875, 7.0999999046326)){
- GarageClosed = false;
- MoveObject(Garage, 3591.6999511719, -1959, 9.5, 3.0, 0.0, 90, 0);
- return SendClientMessage(playerid, 0xFF0000FF, "Garage is opening");
- }
- }
- else{
- if(IsPlayerInRangeOfPoint(playerid, 15.0, 3593.5, -1958.7998046875, 7.0999999046326)){
- GarageClosed = true;
- MoveObject(Garage, 3593.5, -1958.7998046875, 7.0999999046326, 3.0, 0.0, 0.0, 0);
- return SendClientMessage(playerid, 0xFF0000FF, "Garage is closing");
- }
- }
- }
- {
- if(!strcmp(cmdtext, "/house", true)){
- if(GateClosed){
- if(IsPlayerInRangeOfPoint(playerid, 15.0, 3351.8999023438, -1967.0999755859, 5.1999998092651)){
- GateClosed = false;
- MoveObject(Gate, 3351.8999023438, -1958.0999755859, 5.1999998092651, 3.0, 0.0, 0.0, 90);
- return SendClientMessage(playerid, 0xFF0000FF, "Gate is opening");
- }
- }
- else{
- if(IsPlayerInRangeOfPoint(playerid, 15.0, 3351.8999023438, -1967.0999755859, 5.1999998092651)){
- GateClosed = true;
- MoveObject(Gate, 3351.8999023438, -1967.0999755859, 5.1999998092651, 3.0, 0.0, 0.0, 90);
- return SendClientMessage(playerid, 0xFF0000FF, "Gate is closing");
- }
- }
- }
- return 0;
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment