Advertisement
mobiliz

Cken

Sep 23rd, 2012
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.95 KB | None | 0 0
  1. #include <a_samp>
  2. #include <zcmd>
  3.  
  4. new cowit[MAX_PLAYERS];
  5. new cow;
  6. new chickit[MAX_PLAYERS];
  7. new chick;
  8. new NRG[MAX_PLAYERS];
  9.  
  10. //Do NOT remove the credits
  11.  
  12. #define COLOR_RED 0xFF0000AA
  13.  
  14. public OnFilterScriptInit()
  15. {
  16. //credits
  17. print("\n--------------------------------------");
  18. print("Cken Bike by mobiliz");
  19. print("--------------------------------------\n");
  20. return 1;
  21. }
  22. public OnFilterScriptExit()
  23. {
  24. DestroyObject(chick);
  25. DestroyObject(cow);
  26. return 1;
  27. }
  28. public OnPlayerConnect(playerid)
  29. {
  30. chickit[playerid] = 0;
  31. cowit[playerid] = 0;
  32. //credits
  33. SendClientMessage(playerid,COLOR_RED,"Cken by mobiliz");
  34. return 1;
  35. }
  36.  
  37. public OnPlayerExitVehicle(playerid, vehicleid)
  38. {
  39. if (chickit[playerid] == 1)
  40. {
  41. DestroyObject(chick);
  42. chickit[playerid] = 0;
  43. }
  44. else if(cowit[playerid] == 1)
  45. {
  46. DestroyObject(cow);
  47. cowit[playerid] = 0;
  48. }
  49. return 1;
  50. }
  51.  
  52. CMD:nrg(playerid, params[])
  53. {
  54. new Float:x, Float:y, Float:z, Float:angle;
  55. GetPlayerPos(playerid, x, y, z);
  56. GetPlayerFacingAngle(playerid, angle);
  57. if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "Error: You already have a vehicle!");
  58. NRG[playerid] = AddStaticVehicle(522, x, y, z, angle, -1, -1);
  59. PutPlayerInVehicle(playerid, NRG[playerid], 0);
  60. return 1;
  61. }
  62.  
  63. //cow
  64. CMD:cow(playerid, params[])
  65. {
  66. cow = CreateObject(16442,0,0,0,0,0,0,100);
  67. new Float:x, Float:y, Float:z;
  68. cowit[playerid] = 1;
  69. AttachObjectToVehicle(cow, GetPlayerVehicleID(playerid), x,y +0.5,z +0.5,0.0,0.0, 90.0);
  70. return 1;
  71. }
  72.  
  73. //chicken
  74. CMD:chicken(playerid, params[])
  75. {
  76. chick = CreateObject(16776,0,0,0,0,0,0,100);
  77. new Float:x, Float:y, Float:z;
  78. chickit[playerid] = 1;
  79. AttachObjectToVehicle(chick, GetPlayerVehicleID(playerid), x +1,y,z,0.0,0.0,180.0);
  80. return 1;
  81. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement