Guest User

Example

a guest
Jun 24th, 2012
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.82 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. new gate[2];
  4.  
  5. main()
  6. {
  7.     print("Example.");
  8. }
  9.  
  10. public OnGameModeInit()
  11. {
  12.     gate[0] = CreateObject(971, -1060.2998046875, -1338.19921875, 132.5, 0, 0, 347.99743652344);
  13.     gate[1] = CreateObject(971, -1046.7998046875, -1334.3994140625, 132.60000610352, 0, 0, 347.99743652344);
  14.     return 1;
  15. }
  16.  
  17. public OnGameModeExit()
  18. {
  19.     return 1;
  20. }
  21.  
  22. public OnPlayerCommandText(playerid, cmdtext[])
  23. {
  24.     if(strcmp("/opengate1", cmdtext, true) == 0)
  25.     {
  26.         MoveObject(gate[0], -1060.2998046875, -1338.19921875, 126.5, 7.5); // just decreased the 132.5 (Z value) by -6 (Change that as you like)
  27.         /*
  28.             Decrease the Z coordinate to make it move down.
  29.         */
  30.         return 1;
  31.     }
  32.     if(strcmp("/o1", cmdtext, true) == 0)
  33.     {
  34.         MoveObject(gate[1], -1046.7998046875, -1334.3994140625, 126.5, 7.5);
  35.         return 1;
  36.     }
  37.     return 1;
  38. }
Advertisement
Add Comment
Please, Sign In to add comment