Guest User

gate example

a guest
Jun 24th, 2012
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.77 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.         if(IsPlayerAdmin(playerid))
  27.         {
  28.             MoveObject(gate[0], -1060.2998046875, -1338.19921875, 126.5, 7.5);
  29.         }
  30.         return 1;
  31.     }
  32.     if(strcmp("/o1", cmdtext, true) == 0)
  33.     {
  34.         if(IsPlayerAdmin(playerid))
  35.         {
  36.             MoveObject(gate[1], -1046.7998046875, -1334.3994140625, 126.5, 7.5);
  37.         }
  38.         return 1;
  39.     }
  40.     return 1;
  41. }
Advertisement
Add Comment
Please, Sign In to add comment