Advertisement
Guest User

Code

a guest
Oct 24th, 2011
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.58 KB | None | 0 0
  1. // This is a comment
  2. // uncomment the line below if you want to write a filterscript
  3. //#define FILTERSCRIPT
  4.  
  5. #include <a_samp>
  6.  
  7. #if defined FILTERSCRIPT
  8. forward camera(playerid);
  9. new daxis1;
  10.  
  11. public OnFilterScriptInit()
  12. {
  13.     print("\n--------------------------------------");
  14.     print(" Blank Filterscript by your name here");
  15.     print("--------------------------------------\n");
  16.     return 1;
  17. }
  18.  
  19. public OnFilterScriptExit()
  20. {
  21.     return 1;
  22. }
  23.  
  24. #else
  25.  
  26. main()
  27. {
  28.     print("\n----------------------------------");
  29.     print(" Blank Gamemode by your name here");
  30.     print("----------------------------------\n");
  31. }
  32.  
  33. #endif
  34.  
  35.  
  36. public OnPlayerCommandText(playerid, cmdtext[])
  37. {
  38.     if (!strcmp(cmdtext, "/driftaxis"))
  39.     {
  40.         if(!IsPlayerInAnyVehicle(playerid)==false)
  41.         {
  42.             SetCameraBehindPlayer(playerid);
  43.             daxis1 = SetTimer("camera", 1, true);
  44.             } else {
  45.             SendClientMessage(playerid, 0xEA0000FF, "Íå ñòå â ïðåâîçíî ñðåäñòâî!");
  46.             return 1;
  47.         }
  48.         return 0;
  49.     }
  50.     if (!strcmp(cmdtext, "/driftaxisoff"))
  51.     {
  52.         if(!IsPlayerInAnyVehicle(playerid)==false)
  53.         {
  54.             KillTimer(daxis1);
  55.             SendClientMessage(playerid, 0x00ECFFFF, "Driftaxis ñåãà å èçêëþ÷åí!");
  56.             } else {
  57.             SendClientMessage(playerid, 0xEA0000FF, "Íå ñòå â ïðåâîçíî ñðåäñòâî!");
  58.             return 1;
  59.         }
  60.         return 0;
  61.     }
  62.     return 0;
  63. }
  64.    
  65. public camera(playerid)
  66. {
  67.     new Float:xyz[3];
  68.     new cambeh = SetCameraBehindPlayer(playerid);
  69.     GetPlayerCameraPos(playerid, xyz[0], xyz[1], xyz[2]);
  70.     SetPlayerCameraLookAt(cambeh, xyz[0], xyz[1], xyz[2]+25);
  71.     return 0;
  72. }
  73.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement