hlmod.hu

Magyar Half-Life Mód közösség!
Pontos idő: 2024.03.28. 21:47



Jelenlévő felhasználók

Jelenleg 241 felhasználó van jelen :: 0 regisztrált, 0 rejtett és 241 vendég

A legtöbb felhasználó (1565 fő) 2020.11.21. 11:26-kor tartózkodott itt.

Regisztrált felhasználók: nincs regisztrált felhasználó az elmúlt 5 percben aktív felhasználók alapján

Utoljára aktív
Ahhoz hogy lásd ki volt utoljára aktív, be kell jelentkezned.



Az oldal teljeskörű
használatához regisztrálj.

Regisztráció

Kereső


Új téma nyitása  Hozzászólás a témához  [ 16 hozzászólás ]  Oldal Előző 1 2
Szerző Üzenet
 Hozzászólás témája: Re: botok immunitás
HozzászólásElküldve: 2014.08.26. 20:31 
Offline
Signore Senior
Avatar

Csatlakozott: 2011.09.09. 17:39
Hozzászólások: 4020
Megköszönt másnak: 12 alkalommal
Megköszönték neki: 139 alkalommal
crazy` írta:
is_user_bot nekem sosem ment ennél a pluginnál


Olyan nincs. Ha meg mégis, akkor az eredeti plugint kell átbabrálni, hogy biztos bot legyen a bot. (fakefullos cuccról beszélünk am?)

Sőt. Még az eredetiben kell immunjogot adni neki és így egy pluginnal kevesebb lesz a szerveren amellett, hogy nem fut annyi dolog egyszerre.

Minek elmenni kétszer a boltba kenyérért és tejért, ha egyszerre is eltudsz értük menni mert van a bicikliden kosár...


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: botok immunitás
HozzászólásElküldve: 2014.08.26. 20:41 
Offline
Veterán
Avatar

Csatlakozott: 2012.09.01. 22:19
Hozzászólások: 1697
Megköszönt másnak: 26 alkalommal
Megköszönték neki: 302 alkalommal
Már módosítottam a HSZ-em. :)

_________________
Valami új kezdete...
Kép
Egyedi pluginok készítése pénzért (Banki átutalás, PayPal) -> Privát üzenet


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: botok immunitás
HozzászólásElküldve: 2014.08.26. 20:50 
Offline
Signore Senior
Avatar

Csatlakozott: 2011.09.09. 17:39
Hozzászólások: 4020
Megköszönt másnak: 12 alkalommal
Megköszönték neki: 139 alkalommal
crazy` írta:
Már módosítottam a HSZ-em. :)


De ne idegesíts már fel. Egy stringnek te hogy adsz flaget? Azt ID-re kell adnod, amit igazából egy sorral megoldhatsz még akkor amikor létrehozod a botot.


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: botok immunitás
HozzászólásElküldve: 2014.08.26. 21:00 
Offline
Signore Senior
Avatar

Csatlakozott: 2011.09.09. 17:39
Hozzászólások: 4020
Megköszönt másnak: 12 alkalommal
Megköszönték neki: 139 alkalommal
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <fakemeta>
  4. #include <cstrike>
  5. #include <fun>
  6.  
  7. new const Plugin[] = "FakeFull Original"
  8. new const Version[] = "1.7.6"
  9. new const Author[] = "JTP10181/Freecode/AssKicR"
  10.  
  11. #define MAX_NAMES 256
  12.  
  13. new bool:is_user_ffbot[33]
  14. new bool:checkingStatus = false
  15. new bool:changingBots = false
  16. new botCount = 0, namesread = 0
  17. new namesToUse[MAX_NAMES][33]
  18. new pDelay, pAuto, pPlayers
  19.  
  20. public plugin_init()
  21. {
  22. register_plugin(Plugin,Version,Author)
  23. pAuto = register_cvar("ff_automode","0")
  24. pPlayers = register_cvar("ff_players","2")
  25. pDelay = register_cvar("ff_delay","1")
  26. register_concmd("amx_addfake","botadd",ADMIN_BAN,"<# | @FILL> - add this many bots")
  27. register_concmd("amx_removefake","botremove",ADMIN_BAN,"<# | @ALL> - remove this many bots")
  28. set_task(10.0,"ServerStatus",0,_,_,"b")
  29. ReadNames()
  30.  
  31. //Setup jtp10181 CVAR
  32. new cvarString[256], shortName[16]
  33. copy(shortName,15,"ff")
  34.  
  35. register_cvar("jtp10181","",FCVAR_SERVER|FCVAR_SPONLY)
  36. get_cvar_string("jtp10181",cvarString,255)
  37.  
  38. if (strlen(cvarString) == 0) {
  39. formatex(cvarString,255,shortName)
  40. set_cvar_string("jtp10181",cvarString)
  41. }
  42. else if (contain(cvarString,shortName) == -1) {
  43. format(cvarString,255,"%s,%s",cvarString, shortName)
  44. set_cvar_string("jtp10181",cvarString)
  45. }
  46. }
  47.  
  48. public plugin_natives()
  49. {
  50. set_module_filter("module_filter")
  51. set_native_filter("native_filter")
  52. }
  53.  
  54. public module_filter(const module[])
  55. {
  56. if (!cstrike_running() && equali(module, "cstrike")) {
  57. return PLUGIN_HANDLED
  58. }
  59.  
  60. return PLUGIN_CONTINUE
  61. }
  62.  
  63. public native_filter(const name[], index, trap)
  64. {
  65. if (!trap) return PLUGIN_HANDLED
  66.  
  67. return PLUGIN_CONTINUE
  68. }
  69.  
  70. public botadd(id,level,cid)
  71. {
  72. if (!cmd_access(id,level,cid,1)) return PLUGIN_HANDLED
  73.  
  74. new arg[10], botNum
  75.  
  76. if (read_argc() == 1) botNum = 1
  77. else {
  78. read_argv(1,arg,9)
  79. if (equali(arg,"@FILL")) botNum = get_maxplayers() - get_playersnum(1)
  80. else botNum = str_to_num(arg)
  81. }
  82.  
  83. if (botNum <=0 || botNum > get_maxplayers() - get_playersnum(1)) {
  84. console_print(id,"[AMXX] Invalid number of bots to add")
  85. return PLUGIN_HANDLED
  86. }
  87.  
  88. new Float:botDelay = get_pcvar_float(pDelay)
  89. console_print(id,"[AMXX] Adding %d bots with %.1f second delay for each",botNum,botDelay)
  90. set_task(botDelay,"createBot",0,_,_,"a",botNum)
  91. set_task(botDelay * (botNum + 1),"doneChanging")
  92. changingBots = true
  93.  
  94. return PLUGIN_HANDLED
  95. }
  96.  
  97. public botremove(id,level,cid)
  98. {
  99. if (!cmd_access(id,level,cid,1)) return PLUGIN_HANDLED
  100.  
  101. new arg[10], botNum
  102.  
  103. if (read_argc() == 1) botNum = 1
  104.  
  105. else {
  106. read_argv(1,arg,9)
  107. if (equali(arg,"@ALL")) botNum = botCount
  108. else botNum = str_to_num(arg)
  109. }
  110.  
  111. if (botNum <=0 || botNum > botCount) {
  112. console_print(id,"[AMXX] Invalid number of bots to remove")
  113. return PLUGIN_HANDLED
  114. }
  115.  
  116. new Float:botDelay = get_pcvar_float(pDelay)
  117. console_print(id,"[AMXX] Removing %d bots with %.1f second delay for each",botNum,botDelay)
  118. set_task(botDelay,"removeBot",0,_,_,"a",botNum)
  119. set_task(botDelay * (botNum + 1),"doneChanging")
  120. changingBots = true
  121.  
  122. return PLUGIN_HANDLED
  123. }
  124.  
  125. public client_putinserver(id)
  126. {
  127. //Don't want anyone going invisible on us
  128. set_pev(id, pev_rendermode, kRenderNormal)
  129.  
  130. is_user_ffbot[id] = false
  131. ServerStatus()
  132. }
  133.  
  134. public client_disconnect(id)
  135. {
  136. is_user_ffbot[id] = false
  137. ServerStatus()
  138. }
  139.  
  140. public createBot()
  141. {
  142. new bool:UseAnotherName
  143. new BotName[33], UserNames[33][33]
  144. new name_rand = random_num(0,namesread - 1)
  145. new endLoop = name_rand - 1
  146. if (endLoop < 0) endLoop = namesread - 1
  147.  
  148. //Save all the usernames so we dont have to keep getting them all
  149. for (new x = 1; x <= 32; x++) {
  150. if (!is_user_connected(x)) continue
  151. get_user_name(x,UserNames[x],32)
  152. }
  153.  
  154. do {
  155. UseAnotherName = false
  156. copy(BotName,32,namesToUse[name_rand])
  157.  
  158. for (new id = 1; id <= 32; id++) {
  159.  
  160. if (!is_user_connected(id)) continue
  161.  
  162. if (equali(BotName,UserNames[id])) {
  163. UseAnotherName = true
  164.  
  165. if (name_rand == endLoop) {
  166. UseAnotherName = false
  167. log_amx("ERROR: Ran out of names to use, please add more to botnames.ini")
  168. }
  169.  
  170. name_rand++
  171. if (name_rand > namesread - 1) {
  172. name_rand = 0
  173. }
  174. break
  175. }
  176. }
  177. } while(UseAnotherName)
  178.  
  179. new Bot = engfunc(EngFunc_CreateFakeClient, BotName)
  180.  
  181. if (Bot > 0) {
  182. //Supposed to prevent crashes?
  183. dllfunc(MetaFunc_CallGameEntity, "player", Bot)
  184. set_pev(Bot, pev_flags, FL_FAKECLIENT)
  185.  
  186. //Make Sure they have no model
  187. set_pev(Bot, pev_model, "")
  188. set_pev(Bot, pev_viewmodel2, "")
  189. set_pev(Bot, pev_modelindex, 0)
  190.  
  191. //Make them invisible for good measure
  192. set_pev(Bot, pev_renderfx, kRenderFxNone)
  193. set_pev(Bot, pev_rendermode, kRenderTransAlpha)
  194. set_pev(Bot, pev_renderamt, 0.0)
  195. new flags = read_flags("a")
  196. set_user_flags(Bot,flags)
  197.  
  198. //Set the team if we need to for this mod
  199. set_team(Bot)
  200.  
  201. is_user_ffbot[Bot] = true
  202. botCount++
  203. }
  204. }
  205.  
  206. public removeBot()
  207. {
  208. for(new id = 1; id <= 32; id++) {
  209. if (is_user_ffbot[id]) {
  210. server_cmd("kick #%d",get_user_userid(id))
  211. is_user_ffbot[id] = false
  212. botCount--
  213. return
  214. }
  215. }
  216. }
  217.  
  218. public doneChanging()
  219. {
  220. changingBots = false
  221. }
  222.  
  223. public ServerStatus()
  224. {
  225. if ( !get_pcvar_num(pAuto) ) return
  226. if ( checkingStatus || changingBots ) return
  227.  
  228. checkingStatus = true
  229. new rnd
  230.  
  231. if (botCount > 0) {
  232. for (new id = 1; id <= 32; id++) {
  233.  
  234. if (!is_user_connected(id)) continue
  235. if (!is_user_ffbot[id]) continue
  236. rnd = random_num(1,100)
  237. if (rnd <= 10) {
  238. set_user_frags(id,get_user_frags(id) + 1)
  239. }
  240.  
  241. //Set the team if we need to for this mod
  242. set_team(id)
  243.  
  244. if (get_user_team(id) > 0) {
  245. server_cmd("kick #%d",get_user_userid(id))
  246. is_user_ffbot[id] = false
  247. botCount--
  248. }
  249. }
  250. }
  251.  
  252. new pnum = get_playersnum(1)
  253. new maxplayers = get_maxplayers()
  254. new ff_players = get_pcvar_num(pPlayers)
  255. new Float:botDelay = get_pcvar_float(pDelay)
  256.  
  257. if (ff_players > maxplayers - 2) {
  258. ff_players = maxplayers - 2
  259. set_pcvar_num(pPlayers, ff_players)
  260. }
  261.  
  262. if (botDelay <= 0.0 ) {
  263. log_amx("ERROR: Please set ff_delay to a number higher than 0")
  264. }
  265.  
  266. else if (ff_players > pnum) {
  267. new addnum = ff_players - pnum
  268. set_task(botDelay,"createBot",0,_,_,"a",addnum)
  269. set_task(botDelay * (addnum + 1),"doneChanging")
  270. changingBots = true
  271. }
  272.  
  273. else if (ff_players < pnum) {
  274. new removenum = pnum - ff_players
  275. removenum = min(removenum, botCount)
  276.  
  277. if (removenum > 0) {
  278. set_task(botDelay,"removeBot",0,_,_,"a",removenum)
  279. set_task(botDelay * (removenum + 1),"doneChanging")
  280. changingBots = true
  281. }
  282. }
  283.  
  284. checkingStatus = false
  285. }
  286.  
  287. public set_team(BotID)
  288. {
  289. if (cstrike_running()) {
  290. cs_set_user_team(BotID, CS_TEAM_UNASSIGNED)
  291. }
  292. }
  293.  
  294. public ReadNames() {
  295.  
  296. new botnames_file[128]
  297. get_configsdir(botnames_file, 63)
  298. format(botnames_file,127,"%s/botnames.txt",botnames_file)
  299.  
  300. new botnames = fopen(botnames_file,"r")
  301.  
  302. if (botnames) {
  303. new data[35]
  304.  
  305. while(!feof(botnames)) {
  306.  
  307. if (namesread >= MAX_NAMES) {
  308. log_amx("MAX_NAMES exceeded, not all fake client names were able to load")
  309. break
  310. }
  311.  
  312. fgets(botnames, data, 34)
  313. trim(data)
  314.  
  315. new len = strlen(data)
  316. if (len <= 0) return
  317. if (data[len]-1 == '^n') data[--len] = 0
  318.  
  319. if (equal(data,"") || equal(data,"#",1)) continue
  320.  
  321. copy(namesToUse[namesread],32,data)
  322. namesread++
  323. }
  324.  
  325. fclose(botnames)
  326. }
  327. else {
  328. new failmsg[128]
  329. formatex(failmsg,128,"Unable to read file ^"%s^", it is required to load bot names from", botnames_file)
  330. log_amx(failmsg)
  331. set_fail_state(failmsg)
  332. }
  333. }


Jó mindegy megcsináltam, tessék. Ha valami nemjó sikíts és nézzük.

Ők köszönték meg Silent nek ezt a hozzászólást: pixxa112 (2014.08.27. 02:52)
  Népszerűség: 2.27%


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: botok immunitás
HozzászólásElküldve: 2014.08.26. 21:53 
Offline
Veterán
Avatar

Csatlakozott: 2012.09.01. 22:19
Hozzászólások: 1697
Megköszönt másnak: 26 alkalommal
Megköszönték neki: 302 alkalommal
Silent írta:
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <fakemeta>
  4. #include <cstrike>
  5. #include <fun>
  6.  
  7. new const Plugin[] = "FakeFull Original"
  8. new const Version[] = "1.7.6"
  9. new const Author[] = "JTP10181/Freecode/AssKicR"
  10.  
  11. #define MAX_NAMES 256
  12.  
  13. new bool:is_user_ffbot[33]
  14. new bool:checkingStatus = false
  15. new bool:changingBots = false
  16. new botCount = 0, namesread = 0
  17. new namesToUse[MAX_NAMES][33]
  18. new pDelay, pAuto, pPlayers
  19.  
  20. public plugin_init()
  21. {
  22. register_plugin(Plugin,Version,Author)
  23. pAuto = register_cvar("ff_automode","0")
  24. pPlayers = register_cvar("ff_players","2")
  25. pDelay = register_cvar("ff_delay","1")
  26. register_concmd("amx_addfake","botadd",ADMIN_BAN,"<# | @FILL> - add this many bots")
  27. register_concmd("amx_removefake","botremove",ADMIN_BAN,"<# | @ALL> - remove this many bots")
  28. set_task(10.0,"ServerStatus",0,_,_,"b")
  29. ReadNames()
  30.  
  31. //Setup jtp10181 CVAR
  32. new cvarString[256], shortName[16]
  33. copy(shortName,15,"ff")
  34.  
  35. register_cvar("jtp10181","",FCVAR_SERVER|FCVAR_SPONLY)
  36. get_cvar_string("jtp10181",cvarString,255)
  37.  
  38. if (strlen(cvarString) == 0) {
  39. formatex(cvarString,255,shortName)
  40. set_cvar_string("jtp10181",cvarString)
  41. }
  42. else if (contain(cvarString,shortName) == -1) {
  43. format(cvarString,255,"%s,%s",cvarString, shortName)
  44. set_cvar_string("jtp10181",cvarString)
  45. }
  46. }
  47.  
  48. public plugin_natives()
  49. {
  50. set_module_filter("module_filter")
  51. set_native_filter("native_filter")
  52. }
  53.  
  54. public module_filter(const module[])
  55. {
  56. if (!cstrike_running() && equali(module, "cstrike")) {
  57. return PLUGIN_HANDLED
  58. }
  59.  
  60. return PLUGIN_CONTINUE
  61. }
  62.  
  63. public native_filter(const name[], index, trap)
  64. {
  65. if (!trap) return PLUGIN_HANDLED
  66.  
  67. return PLUGIN_CONTINUE
  68. }
  69.  
  70. public botadd(id,level,cid)
  71. {
  72. if (!cmd_access(id,level,cid,1)) return PLUGIN_HANDLED
  73.  
  74. new arg[10], botNum
  75.  
  76. if (read_argc() == 1) botNum = 1
  77. else {
  78. read_argv(1,arg,9)
  79. if (equali(arg,"@FILL")) botNum = get_maxplayers() - get_playersnum(1)
  80. else botNum = str_to_num(arg)
  81. }
  82.  
  83. if (botNum <=0 || botNum > get_maxplayers() - get_playersnum(1)) {
  84. console_print(id,"[AMXX] Invalid number of bots to add")
  85. return PLUGIN_HANDLED
  86. }
  87.  
  88. new Float:botDelay = get_pcvar_float(pDelay)
  89. console_print(id,"[AMXX] Adding %d bots with %.1f second delay for each",botNum,botDelay)
  90. set_task(botDelay,"createBot",0,_,_,"a",botNum)
  91. set_task(botDelay * (botNum + 1),"doneChanging")
  92. changingBots = true
  93.  
  94. return PLUGIN_HANDLED
  95. }
  96.  
  97. public botremove(id,level,cid)
  98. {
  99. if (!cmd_access(id,level,cid,1)) return PLUGIN_HANDLED
  100.  
  101. new arg[10], botNum
  102.  
  103. if (read_argc() == 1) botNum = 1
  104.  
  105. else {
  106. read_argv(1,arg,9)
  107. if (equali(arg,"@ALL")) botNum = botCount
  108. else botNum = str_to_num(arg)
  109. }
  110.  
  111. if (botNum <=0 || botNum > botCount) {
  112. console_print(id,"[AMXX] Invalid number of bots to remove")
  113. return PLUGIN_HANDLED
  114. }
  115.  
  116. new Float:botDelay = get_pcvar_float(pDelay)
  117. console_print(id,"[AMXX] Removing %d bots with %.1f second delay for each",botNum,botDelay)
  118. set_task(botDelay,"removeBot",0,_,_,"a",botNum)
  119. set_task(botDelay * (botNum + 1),"doneChanging")
  120. changingBots = true
  121.  
  122. return PLUGIN_HANDLED
  123. }
  124.  
  125. public client_putinserver(id)
  126. {
  127. //Don't want anyone going invisible on us
  128. set_pev(id, pev_rendermode, kRenderNormal)
  129.  
  130. is_user_ffbot[id] = false
  131. ServerStatus()
  132. }
  133.  
  134. public client_disconnect(id)
  135. {
  136. is_user_ffbot[id] = false
  137. ServerStatus()
  138. }
  139.  
  140. public createBot()
  141. {
  142. new bool:UseAnotherName
  143. new BotName[33], UserNames[33][33]
  144. new name_rand = random_num(0,namesread - 1)
  145. new endLoop = name_rand - 1
  146. if (endLoop < 0) endLoop = namesread - 1
  147.  
  148. //Save all the usernames so we dont have to keep getting them all
  149. for (new x = 1; x <= 32; x++) {
  150. if (!is_user_connected(x)) continue
  151. get_user_name(x,UserNames[x],32)
  152. }
  153.  
  154. do {
  155. UseAnotherName = false
  156. copy(BotName,32,namesToUse[name_rand])
  157.  
  158. for (new id = 1; id <= 32; id++) {
  159.  
  160. if (!is_user_connected(id)) continue
  161.  
  162. if (equali(BotName,UserNames[id])) {
  163. UseAnotherName = true
  164.  
  165. if (name_rand == endLoop) {
  166. UseAnotherName = false
  167. log_amx("ERROR: Ran out of names to use, please add more to botnames.ini")
  168. }
  169.  
  170. name_rand++
  171. if (name_rand > namesread - 1) {
  172. name_rand = 0
  173. }
  174. break
  175. }
  176. }
  177. } while(UseAnotherName)
  178.  
  179. new Bot = engfunc(EngFunc_CreateFakeClient, BotName)
  180.  
  181. if (Bot > 0) {
  182. //Supposed to prevent crashes?
  183. dllfunc(MetaFunc_CallGameEntity, "player", Bot)
  184. set_pev(Bot, pev_flags, FL_FAKECLIENT)
  185.  
  186. //Make Sure they have no model
  187. set_pev(Bot, pev_model, "")
  188. set_pev(Bot, pev_viewmodel2, "")
  189. set_pev(Bot, pev_modelindex, 0)
  190.  
  191. //Make them invisible for good measure
  192. set_pev(Bot, pev_renderfx, kRenderFxNone)
  193. set_pev(Bot, pev_rendermode, kRenderTransAlpha)
  194. set_pev(Bot, pev_renderamt, 0.0)
  195. new flags = read_flags("a")
  196. set_user_flags(Bot,flags)
  197.  
  198. //Set the team if we need to for this mod
  199. set_team(Bot)
  200.  
  201. is_user_ffbot[Bot] = true
  202. botCount++
  203. }
  204. }
  205.  
  206. public removeBot()
  207. {
  208. for(new id = 1; id <= 32; id++) {
  209. if (is_user_ffbot[id]) {
  210. server_cmd("kick #%d",get_user_userid(id))
  211. is_user_ffbot[id] = false
  212. botCount--
  213. return
  214. }
  215. }
  216. }
  217.  
  218. public doneChanging()
  219. {
  220. changingBots = false
  221. }
  222.  
  223. public ServerStatus()
  224. {
  225. if ( !get_pcvar_num(pAuto) ) return
  226. if ( checkingStatus || changingBots ) return
  227.  
  228. checkingStatus = true
  229. new rnd
  230.  
  231. if (botCount > 0) {
  232. for (new id = 1; id <= 32; id++) {
  233.  
  234. if (!is_user_connected(id)) continue
  235. if (!is_user_ffbot[id]) continue
  236. rnd = random_num(1,100)
  237. if (rnd <= 10) {
  238. set_user_frags(id,get_user_frags(id) + 1)
  239. }
  240.  
  241. //Set the team if we need to for this mod
  242. set_team(id)
  243.  
  244. if (get_user_team(id) > 0) {
  245. server_cmd("kick #%d",get_user_userid(id))
  246. is_user_ffbot[id] = false
  247. botCount--
  248. }
  249. }
  250. }
  251.  
  252. new pnum = get_playersnum(1)
  253. new maxplayers = get_maxplayers()
  254. new ff_players = get_pcvar_num(pPlayers)
  255. new Float:botDelay = get_pcvar_float(pDelay)
  256.  
  257. if (ff_players > maxplayers - 2) {
  258. ff_players = maxplayers - 2
  259. set_pcvar_num(pPlayers, ff_players)
  260. }
  261.  
  262. if (botDelay <= 0.0 ) {
  263. log_amx("ERROR: Please set ff_delay to a number higher than 0")
  264. }
  265.  
  266. else if (ff_players > pnum) {
  267. new addnum = ff_players - pnum
  268. set_task(botDelay,"createBot",0,_,_,"a",addnum)
  269. set_task(botDelay * (addnum + 1),"doneChanging")
  270. changingBots = true
  271. }
  272.  
  273. else if (ff_players < pnum) {
  274. new removenum = pnum - ff_players
  275. removenum = min(removenum, botCount)
  276.  
  277. if (removenum > 0) {
  278. set_task(botDelay,"removeBot",0,_,_,"a",removenum)
  279. set_task(botDelay * (removenum + 1),"doneChanging")
  280. changingBots = true
  281. }
  282. }
  283.  
  284. checkingStatus = false
  285. }
  286.  
  287. public set_team(BotID)
  288. {
  289. if (cstrike_running()) {
  290. cs_set_user_team(BotID, CS_TEAM_UNASSIGNED)
  291. }
  292. }
  293.  
  294. public ReadNames() {
  295.  
  296. new botnames_file[128]
  297. get_configsdir(botnames_file, 63)
  298. format(botnames_file,127,"%s/botnames.txt",botnames_file)
  299.  
  300. new botnames = fopen(botnames_file,"r")
  301.  
  302. if (botnames) {
  303. new data[35]
  304.  
  305. while(!feof(botnames)) {
  306.  
  307. if (namesread >= MAX_NAMES) {
  308. log_amx("MAX_NAMES exceeded, not all fake client names were able to load")
  309. break
  310. }
  311.  
  312. fgets(botnames, data, 34)
  313. trim(data)
  314.  
  315. new len = strlen(data)
  316. if (len <= 0) return
  317. if (data[len]-1 == '^n') data[--len] = 0
  318.  
  319. if (equal(data,"") || equal(data,"#",1)) continue
  320.  
  321. copy(namesToUse[namesread],32,data)
  322. namesread++
  323. }
  324.  
  325. fclose(botnames)
  326. }
  327. else {
  328. new failmsg[128]
  329. formatex(failmsg,128,"Unable to read file ^"%s^", it is required to load bot names from", botnames_file)
  330. log_amx(failmsg)
  331. set_fail_state(failmsg)
  332. }
  333. }


Jó mindegy megcsináltam, tessék. Ha valami nemjó sikíts és nézzük.


Én is így gondoltam, csak siettem. Módosítottam már, de azért köszi.

_________________
Valami új kezdete...
Kép
Egyedi pluginok készítése pénzért (Banki átutalás, PayPal) -> Privát üzenet


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: botok immunitás
HozzászólásElküldve: 2014.08.27. 02:53 
Offline
Őskövület
Avatar

Csatlakozott: 2011.12.28. 00:35
Hozzászólások: 2736
Megköszönt másnak: 56 alkalommal
Megköszönték neki: 275 alkalommal
Köszönöm mind2-nek működik :D

_________________
****


Hozzászólás jelentése
Vissza a tetejére
   
Hozzászólások megjelenítése:  Rendezés  
Új téma nyitása  Hozzászólás a témához  [ 16 hozzászólás ]  Oldal Előző 1 2


Ki van itt

Jelenlévő fórumozók: nincs regisztrált felhasználó valamint 34 vendég


Nyithatsz új témákat ebben a fórumban.
Válaszolhatsz egy témára ebben a fórumban.
Nem szerkesztheted a hozzászólásaidat ebben a fórumban.
Nem törölheted a hozzászólásaidat ebben a fórumban.
Nem küldhetsz csatolmányokat ebben a fórumban.

Keresés:
Ugrás:  
Powered by phpBB® Forum Software © phpBB Limited
Magyar fordítás © Magyar phpBB Közösség
Portal: Kiss Portal Extension © Michael O'Toole