Advertisement
Guest User

Here you go

a guest
Dec 28th, 2015
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.46 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. #define SCM SendClientMessage
  4.  
  5. new gate1,gate2,garage1,bool:mainigais,bool:maingarage;
  6.  
  7. main()
  8. {
  9.     print("\n----------------------------------");
  10.     print(" Blank Gamemode by your name here");
  11.     print("----------------------------------\n");
  12. }
  13.  
  14. public OnGameModeInit()
  15. {
  16.     gate1 = CreateObject(18755, -2095.82520, 692.07037, 80.99214,   0.00000, 0.00000, -90.00000);
  17.     gate2 = CreateObject(19758, -2095.99780, 691.04919, 86.47723,   0.00000, 180.00000, -90.00000);
  18.     garage1 = CreateObject(19325, -2078.51416, 712.22144, 69.31409,   0.00000, 0.00000, 0.00000);
  19.     CreateObject(19376, -2099.52466, 699.34290, 78.97420,   0.00000, 90.00000, 90.00000);
  20.     CreateObject(19376, -2109.12720, 698.56927, 78.97420,   0.00000, 90.00000, 90.00000);
  21.     CreateObject(19376, -2118.73145, 698.58691, 78.97420,   0.00000, 90.00000, 90.00000);
  22.     CreateObject(19376, -2124.42944, 698.26086, 78.95189,   0.00000, 90.00000, 90.00000);
  23.     // Don't use these lines if it's a filterscript
  24.     SetGameModeText("Blank Script");
  25.     AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  26.     return 1;
  27. }
  28. stock checkName(playerid)
  29. {
  30.     new name[MAX_PLAYER_NAME];
  31.     GetPlayerName(playerid,name,MAX_PLAYER_NAME);
  32.     return (!strcmp(name,"CREED",true));
  33. }
  34. public OnPlayerCommandText(playerid, cmdtext[])
  35. {
  36.     if(!strcmp("/lift", cmdtext, true))
  37.     {
  38.         if(!checkName(playerid)) return SCM(playerid,-1,"You're not allowed, to use this command!");
  39.         switch(mainigais)
  40.         {
  41.             case false:
  42.             {
  43.                 SCM(playerid, 0x0084F5FF,"Lift down!");
  44.                 MoveObject(gate1, -2095.84399, 692.09149, 67.79585, 4);
  45.                 MoveObject(gate2, -2095.99780, 691.04919, 73.26807, 4);
  46.             }
  47.             case true:
  48.             {
  49.                 SCM(playerid, 0xFF0032FF,"Lift up!");
  50.                 MoveObject(gate1, -2095.82520, 692.07037, 80.99214, 4);
  51.                 MoveObject (gate2, -2095.99780, 691.04919, 86.47723, 4);
  52.             }
  53.         }
  54.         mainigais = !mainigais;
  55.         return 1;
  56.     }
  57.    
  58.     if(!strcmp("/garage1", cmdtext, true))
  59.     {
  60.         if(!checkName(playerid)) return SCM(playerid,-1,"You're not allowed, to use this command!");
  61.         switch(maingarage)
  62.         {
  63.             case false:
  64.             {
  65.                 SCM(playerid, 0x0084F5FF,"Garage open!");
  66.                 MoveObject (garage1, -2080.18750, 712.22345, 72.29829, 2);
  67.             }
  68.             case true:
  69.             {
  70.                 SCM(playerid, 0xFF0032FF,"Garage close!");
  71.                 MoveObject (garage1, -2078.51416, 712.22144, 69.31409, 4);
  72.             }
  73.         }
  74.         maingarage = !maingarage;
  75.         return 1;
  76.     }
  77.     return 0;
  78. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement