Advertisement
Guest User

Private_Cars

a guest
Jun 7th, 2010
2,419
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.86 KB | None | 0 0
  1. //Private Car script by Sinbad
  2. //Please dont remove the credits
  3.  
  4.  
  5.  
  6. #include <a_samp>
  7. //cars
  8. new sinbadcar;
  9. //icons
  10. new sinbad;
  11. //colors
  12. #define red 0xFF0000AA
  13. #define green 0x33FF33AA
  14. #define yellow 0xFFFF00AA
  15.  
  16.  
  17. public OnFilterScriptInit()
  18. {
  19. print("************************************");
  20. print("* *");
  21. print("* ----------------------- *");
  22. print("* | Private Cars V 1.0 | *");
  23. print("* ----------------------- *");
  24. print("* By Sinbad *");
  25. print("* *");
  26. print("************************************");
  27.  
  28. //add cars here
  29. sinbadcar = AddStaticVehicle(490,2172.4749,1028.9368,10.9490,89.8353,0,0); // [ECA]Sinbad's Car
  30. return 1;
  31. }
  32.  
  33. public OnPlayerStateChange(playerid,newstate, oldstate)
  34. {
  35. new vehicleid = GetPlayerVehicleID(playerid);
  36. new pname[MAX_PLAYER_NAME];
  37.  
  38. GetPlayerName(playerid,pname,sizeof pname);
  39.  
  40. if (newstate == PLAYER_STATE_DRIVER)
  41. {
  42. if (vehicleid == sinbadcar)
  43. {
  44. if(strcmp(pname,"[ECA]Sinbad",true) ==0)
  45. {
  46. {
  47. SendClientMessage(playerid,green,"Welcome back to your private vehicle Admin Sinbad");
  48. }
  49.  
  50. return 1;
  51. }
  52. else
  53. {
  54. RemovePlayerFromVehicle(playerid);
  55. SendClientMessage(playerid,red,"This PRIVATE Vehicle belongs to [ECA]Sinbad, you cannot drive this vehicle");
  56. }
  57. }
  58. }
  59. return 1;
  60. }
  61. //End of [ECA]Sinbad's private vehicle
  62. //Start New private vehicle here
  63.  
  64.  
  65. //info icons
  66. public OnGameModeInit()
  67. {
  68. sinbad = CreatePickup(1239, 1, 2167.8835, 1028.9905, 10.9766, -1);
  69. return 1;
  70. }
  71. //End of icons
  72. //what the icons say
  73. public OnPlayerPickUpPickup(playerid, pickupid)
  74. {
  75. if(pickupid == sinbad) SendClientMessage(playerid,yellow,"This PRIVATE vehicle belongs to player '[ECA]Sinbad'");
  76. return 1;
  77. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement