Guest User

Untitled

a guest
Apr 19th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. if (strcmp("/open", cmdtext, true, 10) == 0)
  2. {
  3. if(IsPlayerLuxAdminLevel(playerid,4))
  4. {
  5. if(IsPlayerInRangeOfPoint(playerid, 10.0, 519.0, -171.7866,17.99)) // Will detect whether they are near the gate or not
  6. { // It is recommended you set the RangeOfPoint to the coordinates of your 'closed' gate
  7. MoveObject(gate, 520.0, -170.0, 19.0, 5.0); // Example: MoveObject(gate, X,Y, Z, speed);
  8. SendClientMessage(playerid, 0xEF994300, "The gate is opening and will close in 10 seconds.");
  9. timer[playerid] = SetTimerEx("gateclose",10000,false,"i",playerid); // The timer will function after 10 seconds
  10. // If you want to change timer: 1 Second = 1000, 5 seconds = 5000, 40 seconds = 40000, 1 minute = 60000 etc.
  11. }
  12. }
  13. else SendClientMessage(playerid, -1, "SERVER: Nu esti un administrator!");
  14. return 1;
  15. }
Add Comment
Please, Sign In to add comment