Guest User

Drift axis

a guest
Oct 23rd, 2011
366
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.69 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 daxis(playerid);
  9.  
  10. public OnFilterScriptInit()
  11. {
  12.     print("\n--------------------------------------");
  13.     print(" Blank Filterscript by your name here");
  14.     print("--------------------------------------\n");
  15.     return 1;
  16. }
  17.  
  18. public OnFilterScriptExit()
  19. {
  20.     return 1;
  21. }
  22.  
  23. #else
  24.  
  25. main()
  26. {
  27.     print("\n----------------------------------");
  28.     print(" Blank Gamemode by your name here");
  29.     print("----------------------------------\n");
  30. }
  31.  
  32. #endif
  33.  
  34.  
  35. public OnPlayerCommandText(playerid, cmdtext[])
  36. {
  37.     new vehicleid = GetPlayerVehicleID(playerid);
  38.     new Float:xyz[3];
  39.     new Float:facangle;
  40.     if (strcmp("/driftaxis", cmdtext, true, 10) == 0)
  41.     {
  42.         if(IsPlayerInVehicle(playerid, vehicleid) == 1)
  43.         {
  44.         SetTimer("daxis", 99999999, true);
  45.         GetPlayerFacingAngle(playerid, facangle);
  46.         GetPlayerPos(playerid, xyz[0], xyz[1], xyz[2]);
  47.         SetPlayerCameraLookAt(playerid, xyz[0]+10, xyz[1]-45, xyz[2]+20);
  48.         SetCameraBehindPlayer(playerid);
  49.         SendClientMessage(playerid, 0xFF0000FF, "Вие си заключихте завъртането на колата, за да го отключите излезте от нея!");
  50.         }
  51.         return 1;
  52.     }
  53.     return 0;
  54. }
  55.  
  56. public daxis(playerid)
  57. {
  58.     return 1;
  59. }
  60.  
  61. public OnPlayerExitVehicle(playerid, vehicleid)
  62. {
  63.     if(SetTimer("daxis", 99999999, true))
  64.     {
  65.     SetTimer("daxis", 1000, false);
  66.     SendClientMessage(playerid, 0xFF0000FF, "Завъртането камерата на колата се рестартира!");
  67.     }
  68.     return 0;
  69. return 1;
  70. }
  71.  
Advertisement
Add Comment
Please, Sign In to add comment