Advertisement
Guest User

DINAMICNO KREIRANJE 3DTEXTA/LABELA by ArMa

a guest
Nov 26th, 2017
296
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.59 KB | None | 0 0
  1. //============================================================================//
  2. /*
  3. ================================================================================
  4. ((==Dinamicni sistem kreiranja 3D Textova==))
  5. ((==Napravio Skriptu: ArMa[Ja]==))
  6. ((==Credits: Ja & Kembor[za boje]==)) "Bilo mi mrsko definisati svoje a ne zelim kopirati iz druge skripte :D"
  7. ((==INFO: Boje su uzete iz skripte od Kambora !!! | NISU PREVEDENE==))
  8. //============================================================================//
  9. */
  10. //============================================================================//
  11. #include <a_samp>
  12. #include <core>
  13. #include <zcmd>
  14. //============================================================================//
  15. #define BOJA % %
  16. //============================================================================//
  17. #define BOJA_CRVENA 0xFF0000AA
  18. #define BOJA_GREY 0xAFAFAFAA
  19. #define BOJA_GREEN 0x33AA33AA
  20. #define BOJA_BRIGHTRED 0xFF0000AA
  21. #define BOJA_YELLOW 0xFFFF00AA
  22. #define BOJA_PINK 0xFF66FFAA
  23. #define BOJA_BLUE 0x3A47DEFF
  24. #define BOJA_TAN 0xBDB76BAA
  25. #define BOJA_PURPLE 0x800080AA
  26. #define BOJA_WHITE 0xFFFFFFAA
  27. #define BOJA_LIGHTBLUE 0x33CCFFAA
  28. #define BOJA_ORANGE 0xFF9900AA
  29. #define BOJA_INDIGO 0x4B00B0AA
  30. #define BOJA_BLACK 0x00000000
  31. #define BOJA_DARKGREY 0x696969FF
  32. //============================================================================//
  33. new BOJAA[MAX_PLAYERS];
  34. //============================================================================//
  35. #define DIALOG_3334 3334
  36. #define DIALOG_5555 5555
  37. #define DIALOG_5556 5556
  38. //============================================================================//
  39. public OnFilterScriptInit()
  40. {
  41. print("\n------------------------------------------");
  42. print(" ((==Dinamicni sistem kreiranja 3D Textova==)) ");
  43. print(" ((==Napravio Skriptu: ArMA[Ja]==)) ");
  44. print(" ((==Credits: Ja & Kembor[za boje]==))");
  45. print("------------------------------------------\n");
  46. return 1;
  47. }
  48. //============================================================================//
  49. CMD:kreirajtext(playerid, params[])
  50. {
  51. if(IsPlayerAdmin(playerid)) {
  52. ShowPlayerDialog(playerid,5555,DIALOG_STYLE_MSGBOX,"{0470FC}Dinamicno Kreiranje 3DTexta","Zelite li kreirati \n3D Text ovde?","Da","Ne");
  53. }
  54. else
  55. {
  56. SendClientMessage(playerid,BOJA_CRVENA,"Niste ulogovani kao RCON Admin!.");
  57. }
  58. return 1;
  59. }
  60. //============================================================================//
  61. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  62. {
  63. if(dialogid == 5556)
  64. {
  65. if(response)
  66. {
  67. if(BOJAA[playerid] == 1)
  68. {
  69. new File:file,str[256];
  70. file=fopen("Textovi.txt",io_append);
  71. new Float:x,Float:y,Float:z;
  72. GetPlayerPos(playerid,x,y,z);
  73. Create3DTextLabel(inputtext,BOJA_CRVENA,x,y,z,30.0,0,1);
  74. format(str, 256, "\r\nCreate3DTextLabel(\"%s\",0xFF0000AA,%.2f, %.2f, %.2f,30.0,1);" ,inputtext, x, y, z);
  75. fwrite(file,str);
  76. fwrite(file,"\r\n");
  77. fclose(file);
  78. }
  79. if(BOJAA[playerid] == 2)
  80. {
  81. new File:file,str[256];
  82. file=fopen("Textovi.txt",io_append);
  83. new Float:x,Float:y,Float:z;
  84. GetPlayerPos(playerid,x,y,z);
  85. format(str, 256, "\r\nCreate3DTextLabel(\"%s\",0x3A47DEFF,%.2f, %.2f, %.2f,30.0,1);" ,inputtext, x, y, z);
  86. Create3DTextLabel(inputtext,BOJA_BLUE,x,y,z,30.0,0,1);
  87. fwrite(file,str);
  88. fwrite(file,"\r\n");
  89. fclose(file);
  90. }
  91. if(BOJAA[playerid] == 3)
  92. {
  93. new File:file,str[256];
  94. file=fopen("Textovi.txt",io_append);
  95. new Float:x,Float:y,Float:z;
  96. GetPlayerPos(playerid,x,y,z);
  97. format(str, 256, "\r\nCreate3DTextLabel(\"%s\",0x66CC00FF,%.2f, %.2f, %.2f,30.0,1);" ,inputtext, x, y, z);
  98. Create3DTextLabel(inputtext,BOJA_GREEN,x,y,z,30.0,0,1);
  99. fwrite(file,str);
  100. fwrite(file,"\r\n");
  101. fclose(file);
  102. }
  103. if(BOJAA[playerid] == 4)
  104. {
  105. new File:file,str[256];
  106. file=fopen("Textovi.txt",io_append);
  107. new Float:x,Float:y,Float:z;
  108. GetPlayerPos(playerid,x,y,z);
  109. format(str, 256, "\r\nCreate3DTextLabel(\"%s\",0xFFFF00AA,%.2f, %.2f, %.2f,30.0,1);" ,inputtext, x, y, z);
  110. Create3DTextLabel(inputtext,BOJA_YELLOW,x,y,z,30.0,0,1);
  111. fwrite(file,str);
  112. fwrite(file,"\r\n");
  113. fclose(file);
  114. }
  115. if(BOJAA[playerid] == 5)
  116. {
  117. new File:file,str[256];
  118. file=fopen("Textovi.txt",io_append);
  119. new Float:x,Float:y,Float:z;
  120. GetPlayerPos(playerid,x,y,z);
  121. format(str, 256, "\r\nCreate3DTextLabel(\"%s\",0xFF9900AA,%.2f, %.2f, %.2f,30.0,1);" ,inputtext, x, y, z);
  122. Create3DTextLabel(inputtext,BOJA_ORANGE,x,y,z,30.0,0,1);
  123. fwrite(file,str);
  124. fwrite(file,"\r\n");
  125. fclose(file);
  126. }
  127. if(BOJAA[playerid] == 6)
  128. {
  129. new File:file,str[256];
  130. file=fopen("Textovi.txt",io_append);
  131. new Float:x,Float:y,Float:z;
  132. GetPlayerPos(playerid,x,y,z);
  133. format(str, 256, "\r\nCreate3DTextLabel(\"%s\",0xFF66FFFF,%.2f, %.2f, %.2f,30.0,1);" ,inputtext, x, y, z);
  134. Create3DTextLabel(inputtext,BOJA_PINK,x,y,z,30.0,0,1);
  135. fwrite(file,str);
  136. fwrite(file,"\r\n");
  137. fclose(file);
  138. }
  139. if(BOJAA[playerid] == 7)
  140. {
  141. new File:file,str[256];
  142. file=fopen("Textovi.txt",io_append);
  143. new Float:x,Float:y,Float:z;
  144. GetPlayerPos(playerid,x,y,z);
  145. format(str, 256, "\r\nCreate3DTextLabel(\"%s\",0xAFAFAFAA,%.2f, %.2f, %.2f,30.0,1);" ,inputtext, x, y, z);
  146. Create3DTextLabel(inputtext,BOJA_GREY,x,y,z,30.0,0,1);
  147. fwrite(file,str);
  148. fwrite(file,"\r\n");
  149. fclose(file);
  150. }
  151. if(BOJAA[playerid] == 8)
  152. {
  153. new File:file,str[256];
  154. file=fopen("Textovi.txt",io_append);
  155. new Float:x,Float:y,Float:z;
  156. GetPlayerPos(playerid,x,y,z);
  157. format(str, 256, "\r\nCreate3DTextLabel(\"%s\",0x4B00B0AA,%.2f, %.2f, %.2f,30.0,1);" ,inputtext, x, y, z);
  158. Create3DTextLabel(inputtext,BOJA_INDIGO,x,y,z,30.0,0,1);
  159. fwrite(file,str);
  160. fwrite(file,"\r\n");
  161. fclose(file);
  162. }
  163. }
  164. }
  165. //============================================================================//
  166.  
  167. if(dialogid == 5555)
  168. {
  169. if(response) return ShowPlayerDialog(playerid,3334,DIALOG_STYLE_LIST,"Dinamicno Kreiranje 3D Texta BOJA","{FA0404}CRVENA\n{0704FA}Plava\n{2CF11A}Zelena\n{E2FF09}Zuta\n{FF4101}Narandzasta\n{E97AFD}Roza\n{7A7A7A}Siva\n{330099}Indigo","Odaberi","Otkazi");
  170. else SendClientMessage(playerid,BOJA_BLUE,"Text nije kreiran !");
  171. }
  172. //============================================================================//
  173. if(dialogid == 3334)
  174. {
  175. if(response)
  176. {
  177. switch(listitem)
  178. {
  179. case 0:
  180. {
  181. BOJAA[playerid] = 1;
  182. ShowPlayerDialog(playerid,5556,DIALOG_STYLE_INPUT,"{F8FC04}DinamicnoKreiranje3DTexta","{04FC8C}Molimo unesite {F8FC04}Text{04FC8C}\nkoji zelite da kreirate ovde","Kreiraj","");
  183. }
  184. case 1:
  185. {
  186. BOJAA[playerid]=2;
  187. ShowPlayerDialog(playerid,5556,DIALOG_STYLE_INPUT,"{F8FC04}DinamicnoKreiranje3DTexta","{04FC8C}Molimo unesite {F8FC04}Text{04FC8C}\nkoji zelite da kreirate ovde","Kreiraj","");
  188. }
  189. case 2:
  190. {
  191. BOJAA[playerid]=3;
  192. ShowPlayerDialog(playerid,5556,DIALOG_STYLE_INPUT,"{F8FC04}DinamicnoKreiranje3DTexta","{04FC8C}Molimo unesite {F8FC04}Text{04FC8C}\nkoji zelite da kreirate ovde","Kreiraj","");
  193. }
  194. case 3:
  195. {
  196. BOJAA[playerid]=4;
  197. ShowPlayerDialog(playerid,5556,DIALOG_STYLE_INPUT,"{F8FC04}DinamicnoKreiranje3DTexta","{04FC8C}Molimo unesite {F8FC04}Text{04FC8C}\nkoji zelite da kreirate ovde","Kreiraj","");
  198. }
  199. case 4:
  200. {
  201. BOJAA[playerid]=5;
  202. ShowPlayerDialog(playerid,5556,DIALOG_STYLE_INPUT,"{F8FC04}DinamicnoKreiranje3DTexta","{04FC8C}Molimo unesite {F8FC04}Text{04FC8C}\nkoji zelite da kreirate ovde","Kreiraj","");
  203. }
  204. case 5:
  205. {
  206. BOJAA[playerid]=6;
  207. ShowPlayerDialog(playerid,5556,DIALOG_STYLE_INPUT,"{F8FC04}DinamicnoKreiranje3DTexta","{04FC8C}Molimo unesite {F8FC04}Text{04FC8C}\nkoji zelite da kreirate ovde","Kreiraj","");
  208. }
  209. case 6:
  210. {
  211. BOJAA[playerid]=7;
  212. ShowPlayerDialog(playerid,5556,DIALOG_STYLE_INPUT,"{F8FC04}DinamicnoKreiranje3DTexta","{04FC8C}Molimo unesite {F8FC04}Text{04FC8C}\nkoji zelite da kreirate ovde","Kreiraj","");
  213. }
  214. case 7:
  215. {
  216. BOJAA[playerid]=8;
  217. ShowPlayerDialog(playerid,5556,DIALOG_STYLE_INPUT,"{F8FC04}DinamicnoKreiranje3DTexta","{04FC8C}Molimo unesite {F8FC04}Text{04FC8C}\nkoji zelite da kreirate ovde","Kreiraj","");
  218. }
  219. case 8:
  220. {
  221. BOJAA[playerid]=9;
  222. ShowPlayerDialog(playerid,5556,DIALOG_STYLE_INPUT,"{F8FC04}DinamicnoKreiranje3DTexta","{04FC8C}Molimo unesite {F8FC04}Text{04FC8C}\nkoji zelite da kreirate ovde","Kreiraj","");
  223. }
  224. }
  225. }
  226. }
  227. return 1;
  228. }
  229. //============================================================================//
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement