Advertisement
Stuneris

mValdymas

Jul 25th, 2011
985
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 3.46 KB | None | 0 0
  1. /************************
  2.  *          *
  3.  *  2 - variklis    *
  4.  *  4 - bagažinė    *
  5.  *  6 - kapotas *
  6.  *  8 - šviesos     *
  7.  *          *
  8.  ************************/
  9.  
  10. #include <a_samp>
  11.  
  12. //                          Kūrė Stuneris
  13. /*             Nūtrynęs kreditus scripto autoriumi netapsi!                   */
  14.  
  15. new engine, lights, alarm, doors, bonnet, boot, objective;
  16.  
  17. public OnFilterScriptInit()
  18. {
  19.     ManualVehicleEngineAndLights();
  20.     print("\n\n\n");
  21.     print("  _______________________________________________________________");
  22.     print("  mValdymas by Stuneis sėkmingai užkrautas. Malonaus naudojimo ;)");
  23.     print("  ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯");
  24.     print("\n\n\n");
  25.     return 1;
  26. }
  27.  
  28. public OnPlayerStateChange(playerid, newstate, oldstate)
  29. {
  30.     if(newstate == PLAYER_STATE_DRIVER)
  31.     {
  32.             SendClientMessage(playerid, 0x00FF00FF, "_____|{FF0000}mValdymas by Stuneris naudojimas{00FF00}|_____");
  33.         SendClientMessage(playerid, 0x00FF00FF, "Spausk {FF0000}8 {00FF00}norėdamas {FF0000}įjungti/išjungti {00FF00}šviesas.");
  34.         SendClientMessage(playerid, 0x00FF00FF, "Spausk {FF0000}2 {00FF00}norėdamas {FF0000}įjungti/išjungti {00FF00}variklį.");
  35.         SendClientMessage(playerid, 0x00FF00FF, "Spausk {FF0000}6 {00FF00}norėdamas {FF0000}atidaryti/uždaryti {00FF00}kapotą.");
  36.         SendClientMessage(playerid, 0x00FF00FF, "Spausk {FF0000}4 {00FF00}norėdamas {FF0000}atidaryti/uždaryti {00FF00}bagažinę.");
  37.     }
  38.     return 1;
  39. }
  40.  
  41. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  42. {
  43.     new vid = GetPlayerVehicleID(playerid);
  44.     GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
  45.     if(newkeys == KEY_ANALOG_UP)
  46.     {
  47.             if(lights == 1)
  48.             {
  49.                     SetVehicleParamsEx(vid,engine,0,alarm,doors,bonnet,boot,objective);
  50.                     SendClientMessage(playerid, 0xFF9900FF, "Šviesos {FF0000}išjungtos.");
  51.         }
  52.         else if(lights == -1||lights == 0)
  53.         {
  54.                 SetVehicleParamsEx(vid,engine,1,alarm,doors,bonnet,boot,objective);
  55.                 SendClientMessage(playerid, 0xFF9900FF, "Šviesos {FF0000}įjungtos.");
  56.         }
  57.     }
  58.    
  59.     if(newkeys == KEY_ANALOG_DOWN)
  60.     {
  61.         if(engine == 1)
  62.             {
  63.                     SetVehicleParamsEx(vid,0,lights,alarm,doors,bonnet,boot,objective);
  64.                     SendClientMessage(playerid, 0xFF9900FF, "Variklis {FF0000}užgesintas.");
  65.         }
  66.         else if(engine == -1||engine == 0)
  67.         {
  68.                 SetVehicleParamsEx(vid,1,lights,alarm,doors,bonnet,boot,objective);
  69.                 SendClientMessage(playerid, 0xFF9900FF, "Variklis {FF0000}užvestas.");
  70.         }
  71.     }
  72.    
  73.     if(newkeys == KEY_ANALOG_LEFT)
  74.     {
  75.         if(boot == 1)
  76.             {
  77.                     SetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,0,objective);
  78.                     SendClientMessage(playerid, 0xFF9900FF, "Bagažinė {FF0000}uždaryta.");
  79.         }
  80.         else if(boot == -1||boot == 0)
  81.         {
  82.                 SetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,1,objective);
  83.             SendClientMessage(playerid, 0xFF9900FF, "Bagažinė {FF0000}atidaryta.");
  84.         }
  85.     }
  86.    
  87.     if(newkeys == KEY_ANALOG_RIGHT)
  88.     {
  89.         if(bonnet == 1)
  90.             {
  91.                     SetVehicleParamsEx(vid,engine,lights,alarm,doors,0,boot,objective);
  92.                     SendClientMessage(playerid, 0xFF9900FF, "Kapotas {FF0000}uždarytas.");
  93.         }
  94.         else if(bonnet == -1||bonnet == 0)
  95.         {
  96.                 SetVehicleParamsEx(vid,engine,lights,alarm,doors,1,boot,objective);
  97.                 SendClientMessage(playerid, 0xFF9900FF, "Kapotas {FF0000}atidarytas.");
  98.         }
  99.     }
  100.     return 1;
  101. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement