Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2014
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.57 KB | None | 0 0
  1.  
  2. // http://forum.sa-mp.com/showthread.php?t=270508 <-- Maths include again
  3. command(countcar, playerid, params[])
  4. {
  5. new count, string[16], id;
  6. if(sscanf(params, "i", id)) return SendClientMessage(playerid, Grey, "Usage: /countcar [Car ID]");
  7. {
  8. for(new i = 0; i < MAX_VEHICLES; i ++)
  9. {
  10. count = MPGetVehicleOccupantCnt(i);
  11. format(string, sizeof(string), "%i", count);
  12. SendClientMessage(playerid, -1, string);
  13. }
  14. }
  15. return 1;
  16. }
  17.  
  18. command(tow, playerid, params[])
  19. {
  20. if(IsPlayerInAnyVehicle(playerid))
  21. {
  22. if(GetVehicleModel(GetPlayerVehicleID(playerid))) = 525
  23. {
  24. if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid))
  25. {
  26. AttachTrailerToVehicle(GetPlayerVehicleID(playerid), GetPlayerVehicleID(playerid));
  27. }
  28. else {
  29. SendClientMessage(playerid, Grey, "You are already towing a Vehicle.");
  30. }
  31. }
  32. else {
  33. SendClientMessage(playerid, Grey, "You are not in a Tow Truck");
  34. }
  35. }
  36. else {
  37. SendClientMessage(playerid, Grey, "You need to be in a Tow Truck.");
  38. }
  39. return 1;
  40. }
  41.  
  42. command(detach, playerid, params[])
  43. {
  44. if(IsPlayerInAnyVehicle(playerid))
  45. {
  46. if(GetVehicleModel(GetPlayerVehicleID(playerid))) = 525
  47. {
  48. if(IsTrailerAttachedToVehicle(GetPlayerVehicleID))
  49. {
  50. DetachTrailerFromVehicle(GetPlayerVehicleID(playerid));
  51. }
  52. else {
  53. SendClientMessage(playerid, Grey, "There is no Vehicle to detach.")
  54. }
  55. }
  56. else {
  57. SendClientMessage(playerid, Grey, "You are not in a Tow Truck.")
  58. }
  59. }
  60. else {
  61. SendClientMessage(playerid, Grey, "You need to be in a Tow Truck.")
  62. }
  63. return 1;
  64. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement