Advertisement
Guest User

Accent | by Vasic

a guest
Dec 15th, 2017
464
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.32 KB | None | 0 0
  1. //Akcenat Sistem by Vasic (c) 2017, Uzivajte, verujem da ce mnogim serverima pomoci. HVALA!//
  2. //* NAPOMENA: ~ Ovo morate dodati u vasu skriptu, jer akcenat sistem se nece moci sacuvati ukoliko nemate REG/LOG System.
  3. //* Ja sam ovo na brzinu odradio, tako da nisam imao vremena praviti Log/Reg sistem :) Uzivajte!
  4. #include <a_samp>
  5. #include <zcmd>
  6. #include <foreach>
  7.  
  8. #if defined FILTERSCRIPT
  9. public OnFilterScriptInit()
  10. {
  11. print("\n--------------------------------------");
  12. print("FS ~ 'Akcenat System' ~ by Vasic (c) 2017");
  13. print("Balkan Samp Profile Nick ~ 'Vasic'");
  14. print("YouTube Profile Nick ~ 'Vasic'");
  15. print("~~~~~~ENJOY AND MORE FUN~~~~~~'");
  16. print("--------------------------------------\n");
  17. return 1;
  18. }
  19.  
  20. public OnFilterScriptExit()
  21. {
  22. return 1;
  23. }
  24. #else
  25.  
  26. main()
  27. {
  28. print("\n--------------------------------------");
  29. print("FS ~ 'Akcenat System' ~ by Vasic (c) 2017");
  30. print("Balkan Samp Profile Nick ~ 'Vasic'");
  31. print("YouTube Profile Nick ~ 'Vasic'");
  32. print("~~~~~~ENJOY AND MORE FUN~~~~~~'");
  33. print("--------------------------------------\n");
  34. }
  35.  
  36. #endif
  37.  
  38. public OnGameModeInit()
  39. {
  40. SetGameModeText("Accent System | by Vasic");
  41. AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  42. return 1;
  43. }
  44.  
  45. public OnGameModeExit()
  46. {
  47. return 1;
  48. }
  49. enum PlayerInfo_data
  50. {
  51. pAkcenat
  52. }
  53. new PlayerInfo[MAX_PLAYERS][PlayerInfo_data];
  54. public OnPlayerRequestClass(playerid, classid)
  55. {
  56. SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  57. SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  58. SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  59. return 1;
  60. }
  61.  
  62. public OnPlayerConnect(playerid)
  63. {
  64. SendClientMessage(playerid, -1, "~ Akcenat Sistem ~ by Vasic "); //Ovo mozete obrisati :)
  65. return 1;
  66. }
  67. forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
  68. public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
  69. {
  70. if(IsPlayerConnected(playerid))
  71. {
  72. new Float:posx, Float:posy, Float:posz;
  73. new Float:oldposx, Float:oldposy, Float:oldposz;
  74. new Float:tempposx, Float:tempposy, Float:tempposz;
  75. GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  76. foreach(Player,i)
  77. {
  78. if(IsPlayerConnected(i))
  79. {
  80. if(GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i))
  81. {
  82. GetPlayerPos(i, posx, posy, posz);
  83. tempposx = (oldposx -posx);
  84. tempposy = (oldposy -posy);
  85. tempposz = (oldposz -posz);
  86. if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
  87. {
  88. SendClientMessage(i, col1, string);
  89. }
  90. else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
  91. {
  92. SendClientMessage(i, col2, string);
  93. }
  94. else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
  95. {
  96. SendClientMessage(i, col3, string);
  97. }
  98. else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
  99. {
  100. SendClientMessage(i, col4, string);
  101. }
  102. else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  103. {
  104. SendClientMessage(i, col5, string);
  105. }
  106. } }
  107. }
  108. }
  109. return 1;
  110. }
  111. stock GetName(playerid)
  112. {
  113. new name[24];
  114. GetPlayerName(playerid,name,24);
  115. return name;
  116. }
  117. #define D_AKCENAT 1
  118. #define BELA 0xFFFFFFAA
  119. public OnPlayerText(playerid, text[])
  120. {
  121. if(PlayerInfo[playerid][pAkcenat] == 1)
  122. {
  123. new string[128];
  124. format(string, sizeof(string), "{FFFFFF}[SRPSKI]: %s kaze: %s", GetName(playerid), text);
  125. ProxDetector(20.0, playerid, string, BELA,BELA,BELA,BELA,BELA);
  126. return 0;
  127. }
  128. else if(PlayerInfo[playerid][pAkcenat] == 2)
  129. {
  130. new string2[128];
  131. format(string2, sizeof(string2), "{FFFFFF}[HRVATSKI]: %s kaze: %s", GetName(playerid), text);
  132. ProxDetector(20.0, playerid, string2, BELA,BELA,BELA,BELA,BELA);
  133. return 0;
  134. }
  135. else if(PlayerInfo[playerid][pAkcenat] == 3)
  136. {
  137. new string3[128];
  138. format(string3, sizeof(string3), "{FFFFFF}[BOSNJACKI]: %s kaze: %s", GetName(playerid), text);
  139. ProxDetector(20.0, playerid, string3, BELA,BELA,BELA,BELA,BELA);
  140. return 0;
  141. }
  142. else if(PlayerInfo[playerid][pAkcenat] == 4)
  143. {
  144. new string4[128];
  145. format(string4, sizeof(string4), "{FFFFFF}[MAKEDONSKI]: %s kaze: %s", GetName(playerid), text);
  146. ProxDetector(20.0, playerid, string4, BELA,BELA,BELA,BELA,BELA);
  147. return 0;
  148. }
  149. else if(PlayerInfo[playerid][pAkcenat] == 5)
  150. {
  151. new string5[128];
  152. format(string5, sizeof(string5), "{FFFFFF}[CRNOGORSKI]: %s kaze: %s", GetName(playerid), text);
  153. ProxDetector(20.0, playerid, string5, BELA,BELA,BELA,BELA,BELA);
  154. return 0;
  155. }
  156. else if(PlayerInfo[playerid][pAkcenat] == 6)
  157. {
  158. new string6[128];
  159. format(string6, sizeof(string6), "{FFFFFF}[ENGLESKI]: %s kaze: %s", GetName(playerid), text);
  160. ProxDetector(20.0, playerid, string6, BELA,BELA,BELA,BELA,BELA);
  161. return 0;
  162. }
  163. else if(PlayerInfo[playerid][pAkcenat] == 7)
  164. {
  165. new string6[128];
  166. format(string6, sizeof(string6), "{FFFFFF}[RUSKI]: %s kaze: %s", GetName(playerid), text);
  167. ProxDetector(20.0, playerid, string6, BELA,BELA,BELA,BELA,BELA);
  168. return 0;
  169. }
  170. else if(PlayerInfo[playerid][pAkcenat] == 8)
  171. {
  172. new string7[128];
  173. format(string7, sizeof(string7), "{FFFFFF}[MEKSICKI]: %s kaze: %s", GetName(playerid), text);
  174. ProxDetector(20.0, playerid, string7, BELA,BELA,BELA,BELA,BELA);
  175. return 0;
  176. }
  177. else if(PlayerInfo[playerid][pAkcenat] == 9)
  178. {
  179. new string8[128];
  180. format(string8, sizeof(string8), "{FFFFFF}[JAPANSKI]: %s kaze: %s", GetName(playerid), text);
  181. ProxDetector(20.0, playerid, string8, BELA,BELA,BELA,BELA,BELA);
  182. return 0;
  183. }
  184. else if(PlayerInfo[playerid][pAkcenat] == 10)
  185. {
  186. new string9[128];
  187. format(string9, sizeof(string9), "{FFFFFF}[NEMACKI]: %s kaze: %s", GetName(playerid), text);
  188. ProxDetector(20.0, playerid, string9, BELA,BELA,BELA,BELA,BELA);
  189. return 0;
  190. }
  191. else if(PlayerInfo[playerid][pAkcenat] == 11)
  192. {
  193. new string10[128];
  194. format(string10, sizeof(string10), "{FFFFFF}[AMERICKI]: %s kaze: %s", GetName(playerid), text);
  195. ProxDetector(20.0, playerid, string10, BELA,BELA,BELA,BELA,BELA);
  196. return 0;
  197. }
  198. else if(PlayerInfo[playerid][pAkcenat] == 12)
  199. {
  200. new string11[128];
  201. format(string11, sizeof(string11), "{FFFFFF}[BRITANSKI]: %s kaze: %s", GetName(playerid), text);
  202. ProxDetector(20.0, playerid, string11, BELA,BELA,BELA,BELA,BELA);
  203. return 0;
  204. }
  205. else if(PlayerInfo[playerid][pAkcenat] == 13)
  206. {
  207. new string10[128];
  208. format(string10, sizeof(string10), "{FFFFFF}[FRANCUSKI]: %s kaze: %s", GetName(playerid), text);
  209. ProxDetector(20.0, playerid, string10, BELA,BELA,BELA,BELA,BELA);
  210. return 0;
  211. }
  212. else if(PlayerInfo[playerid][pAkcenat] == 0)
  213. {
  214. new string10[128];
  215. format(string10, sizeof(string10), "%s kaze: %s", GetName(playerid), text);
  216. ProxDetector(20.0, playerid, string10, BELA,BELA,BELA,BELA,BELA);
  217. SendClientMessage(playerid, -1,"Preporucujemo vam da koristite akcenat, kako bi vas igraci prepoznali ~ /akcenat");
  218. return 0;
  219. }
  220. return 1;
  221. }
  222. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  223. {
  224. if(dialogid == D_AKCENAT)
  225. {
  226. switch(listitem)
  227. {
  228. case 0:
  229. {
  230. PlayerInfo[playerid][pAkcenat] = 1;
  231. SendClientMessage(playerid, -1, "{FFFFFF}[IME:SERVERA]: Sada govorite Srpskim Akcentom!");
  232. }
  233. case 1:
  234. {
  235. PlayerInfo[playerid][pAkcenat] = 2;
  236. SendClientMessage(playerid, -1, "{FFFFFF}[IME:SERVERA]: Sada govorite Hrvatskim Akcentom!");
  237. }
  238. case 2:
  239. {
  240. PlayerInfo[playerid][pAkcenat] = 3;
  241. SendClientMessage(playerid, -1, "{FFFFFF}[IME:SERVERA]: Sada govorite Bosnjackim Akcentom!");
  242. }
  243. case 3:
  244. {
  245. PlayerInfo[playerid][pAkcenat] = 4;
  246. SendClientMessage(playerid, -1, "{FFFFFF}[IME:SERVERA]: Sada govorite Makedonskim Akcentom!");
  247. }
  248. case 4:
  249. {
  250. PlayerInfo[playerid][pAkcenat] = 5;
  251. SendClientMessage(playerid, -1, "{FFFFFF}[IME:SERVERA]: Sada govorite Crnogorskim Akcentom!");
  252. }
  253. case 5:
  254. {
  255. PlayerInfo[playerid][pAkcenat] = 6;
  256. SendClientMessage(playerid, -1, "{FFFFFF}[IME:SERVERA]: Sada govorite Engleskim Akcentom!");
  257. }
  258. case 6:
  259. {
  260. PlayerInfo[playerid][pAkcenat] = 7;
  261. SendClientMessage(playerid, -1, "{FFFFFF}[IME:SERVERA]: Sada govorite Ruskim Akcentom!");
  262. }
  263. case 7:
  264. {
  265. PlayerInfo[playerid][pAkcenat] = 8;
  266. SendClientMessage(playerid, -1,"{FFFFFF}[IME:SERVERA]: Sada govorite Meksickim Akcentom!");
  267. }
  268. case 8:
  269. {
  270. PlayerInfo[playerid][pAkcenat] = 9;
  271. SendClientMessage(playerid, -1, "{FFFFFF}[IME:SERVERA]: Sada govorite Japanskim Akcentom!");
  272. }
  273. case 9:
  274. {
  275. PlayerInfo[playerid][pAkcenat] = 10;
  276. SendClientMessage(playerid, -1, "{FFFFFF}[IME:SERVERA]: Sada govorite Nemackim Akcentom!");
  277. }
  278. case 10:
  279. {
  280. PlayerInfo[playerid][pAkcenat] = 11;
  281. SendClientMessage(playerid, -1, "{FFFFFF}[IME:SERVERA]: Sada govorite Americki Akcentom!");
  282. }
  283. case 11:
  284. {
  285. PlayerInfo[playerid][pAkcenat] = 12;
  286. SendClientMessage(playerid, -1, "{FFFFFF}[IME:SERVERA]: Sada govorite Britanskim Akcentom!");
  287. }
  288. case 12:
  289. {
  290. PlayerInfo[playerid][pAkcenat] = 13;
  291. SendClientMessage(playerid, -1, "{FFFFFF}[IME:SERVERA]: Sada govorite Francuskim Akcentom!");
  292. }
  293. case 13:
  294. {
  295. PlayerInfo[playerid][pAkcenat] = 0;
  296. SendClientMessage(playerid, -1, "{FFFFFF}[IME:SERVERA]: Sada govorite bez akcenta!");
  297. SendClientMessage(playerid, -1, "{FFFFFF}[IME:SERVERA]: Preporucujemo vam da koristite akcenat kako bi vas drugi igraci prepoznali! ~ /akcenat!");
  298. }
  299. }
  300. }
  301. return 1;
  302. }
  303. CMD:akcenat(playerid,params[])
  304. {
  305. ShowPlayerDialog(playerid, D_AKCENAT, DIALOG_STYLE_LIST, "Izaberi akcenat", "Srpski\nHrvatski\nBosnjacki\nMakedonski\nCrnogorski\nEngleski\nRuski\nMeksicki\nJapanski\nNemacki\nAmericki\nBritanski\nFrancuski\nNormalan", "Izaberi", "Izadji");
  306. return true;
  307. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement