Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- new pddoor1, pddoor2, pddoor3;
- forward doorclose1(playerid);
- forward doorclose2(playerid);
- forward doorclose3(playerid);
- public OnGameModeInit()
- {
- pddoor1 = CreateObject (19859, 587.841918, -3233.680908, 110.116477, 0.000000, 0.000000, 90.000000, 300.00);
- pddoor2 = CreateObject (19859, 579.981933, -3237.977783, 113.629692, 0.000000, 0.000000, 180.000000, 300.00);
- pddoor3 = CreateObject (19859, 579.9819, -3237.9858, 113.6297, 0.000000, 0.000000, 0.000000, 300.00);
- return 1;
- }
- public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
- {
- if(newkeys & 16)
- {
- if(IsPlayerInRangeOfPoint(playerid, 4.0, 588.5473,-3234.3591,110.1165))
- {
- if (IsPlayerAdmin (playerid))
- {
- MoveObject(pddoor1, 587.841918, -3233.680908, 110.116477,1.5);
- SetTimerEx("doorclose1", 5000, false, "i", playerid);
- }
- }
- if(IsPlayerInRangeOfPoint(playerid, 4.0, 580.5657, -3237.5479, 113.6297))
- {
- if (IsPlayerAdmin (playerid))
- {
- MoveObject(pddoor2, 579.981933, -3237.977783, 113.629692,1.5);
- SetTimerEx("doorclose2", 5000, false, "i", playerid);
- }
- }
- if(IsPlayerInRangeOfPoint(playerid, 4.0, 600.8785, -3239.9939, 110.0865))
- {
- if (IsPlayerAdmin (playerid))
- {
- MoveObject(pddoor3, 579.9819, -3237.9858, 113.6297,1.5);
- SetTimerEx("doorclose3", 5000, false, "i", playerid);
- }
- }
- }
- return 1;
- }
- public doorclose1(playerid)
- {
- MoveObject(pddoor1, 599.9600, -3239.4077, 110.0865,1.5);
- return 1;
- }
- public doorclose2(playerid)
- {
- MoveObject(pddoor2, 587.8419, -3235.1840, 110.1165,1.5);
- return 1;
- }
- public doorclose3(playerid)
- {
- MoveObject(pddoor3, 581.4840, -3237.9858, 113.6297,1.5);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement