Guest User

Dinamicno pravljenje vozila by Shomy

a guest
Oct 28th, 2017
361
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.99 KB | None | 0 0
  1. //=-=-=-= DINAMICNO PRAVLJENJE VOZILA BY SHOMY =-=-=-=//
  2.  
  3. //=-= INCLUDE =-=//
  4.  
  5. #include < a_samp >
  6.  
  7. #include < zcmd >
  8.  
  9. #include < sscanf2 >
  10.  
  11. //=-= DIALOZI =-=//
  12.  
  13. #define DIALOG_PRAVLJENJE1 1
  14.  
  15. //=-= SKRACENICE =-=//
  16.  
  17. #define SCM SendClientMessage
  18.  
  19. #define SPD ShowPlayerDialog
  20.  
  21. #define DSM DIALOG_STYLE_MSGBOX
  22.  
  23. #define DSL DIALOG_STYLE_LIST
  24.  
  25. #define DSI DIALOG_STYLE_INPUT
  26.  
  27. //=-= BOJE =-=//
  28.  
  29. #define COL_SERVER "{FF8000}"
  30.  
  31. #define BELA "{FFFFFF}"
  32.  
  33. //=-= PUBLIC =-=//
  34.  
  35. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  36. {
  37. if(dialogid == DIALOG_PRAVLJENJE1)
  38. {
  39. if(response)
  40. {
  41. new idvozila, bojavozila1, bojavozila2;
  42. if(sscanf(inputtext, "d d d", idvozila, bojavozila1, bojavozila2))
  43. {
  44. SPD(playerid, DIALOG_PRAVLJENJE1, DSI, ""COL_SERVER"ID Vozila",""BELA"Unesite ID Vozila ( Model ), pa boju vozila 1, boju vozila 2.",""BELA"Dalje",""BELA"Izlaz");
  45. SCM(playerid, -1, ""COL_SERVER"[GRESKA] "BELA"Unesite ID Vozila 400-611 !");
  46. if(idvozila < 400 || idvozila > 611)
  47. {
  48. SPD(playerid, DIALOG_PRAVLJENJE1, DSI, ""COL_SERVER"ID Vozila",""BELA"Unesite ID Vozila ( Model ), pa boju vozila 1, boju vozila 2.",""BELA"Dalje",""BELA"Izlaz");
  49. SCM(playerid, -1, ""COL_SERVER"[GRESKA] "BELA"Unesite ID Vozila 400-611 !");
  50. }
  51. }
  52. else
  53. {
  54. if(idvozila > 399 || idvozila < 612)
  55. {
  56. new Float:X,Float:Y,Float:Z,Float:A;
  57. GetPlayerPos(playerid, X,Y,Z);
  58. GetPlayerFacingAngle(playerid, A);
  59. CreateVehicle(idvozila, X,Y,Z,A, bojavozila1, bojavozila2, -1);
  60. }
  61. }
  62. }
  63. }
  64. return 1;
  65. }
  66.  
  67. //=-= CMD =-=//
  68.  
  69. CMD:kreirajvozilo(playerid, params[])
  70. {
  71. if(IsPlayerAdmin(playerid))
  72. {
  73. SPD(playerid, DIALOG_PRAVLJENJE1, DSI, ""COL_SERVER"ID Vozila",""BELA"Unesite ID Vozila ( Model ), pa boju vozila 1, boju vozila 2.",""BELA"Dalje",""BELA"Izlaz");
  74. }
  75. else return SCM(playerid, -1, ""COL_SERVER"[GRESKA] "BELA"Niste RCON Admin !");
  76. return 1;
  77. }
Advertisement
Add Comment
Please, Sign In to add comment