Advertisement
eyal282

Untitled

Dec 27th, 2012
594
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 159.21 KB | None | 0 0
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <cstrike>
  4. #include <hamsandwich>
  5. #include <dhudmessage>
  6. #include <fakemeta_util>
  7. #include <fakemeta>
  8. #include <engine>
  9. #include <nvault>
  10. #include <vault>
  11. #include <fun>
  12. #include <xs>
  13.  
  14. #define VIP_FLAG ADMIN_RESERVATION
  15. #define IsPlayer(%1) (1 <= %1 <= g_max_clients)
  16. #define get_bit(%1,%2) (%1 & 1 << (%2 & 31))
  17. #define set_bit(%1,%2) %1 |= (1 << (%2 & 31))
  18. #define clear_bit(%1,%2) %1 &= ~(1 << (%2 & 31))
  19. #define MAX_NETS 2
  20. #define MAXENTS 1500
  21. #define MAX_SIZE 1012
  22. #define gamename "Extreme-Jail"
  23.  
  24. new Float:g_fWallOrigin[33][3];
  25.  
  26. new g_max_clients, g_PlayerCrowbar, g_PlayerVoice, g_PlayerScout, g_PlayerDildo, g_PlayerStunGun,
  27. g_ShowMenu, beacon_sprite, rar, cashtimer, HamHook:ForwardSecAttackAwp, iFF, iHandler, g_PlayerBH,
  28. timer, HamHook:ForwardSecAttackScout, rounds_elapsed, count, user, gVault, menu_wakeup,
  29. serverpoints, Show_Choose, g_MsgScreenFade, g_PlayerSpeed, g_PlayerGravity, g_iMsgSayText,
  30. g_iMsgStatusText, g_bHasCellKeys, g_iCellKeys, g_GoldenScout, g_Knife0, g_Knife1, g_Knife2, g_Knife3, g_Knife4, g_Knife5, g_Knife6, g_Knife7, g_Knife8, g_Knife9, bitvault,
  31.  
  32.  
  33. wakeup[11], vKey[64], vData[64], g_map[32], floodcounter[33], playerpoints[33], _status[33],
  34. Seconds[33], bet_some[33], bet_team[33], moneybox[MAXENTS], send_delay[33], g_Text[MAX_SIZE], write[6],
  35.  
  36. bool:zombieday, bool:nordeagleday, bool:Deathmatch, bool:BoxDay, bool:hns, bool:fd, bool:RunAwayDay, bool:fire, bool:knifeday, bool:nightcrawler, bool:knifematchday, bool:mutect,
  37. bool:grenadeday, bool:actiondays, bool:g_connected[33], bool:get_vip[33],
  38. bool:bet_pointed_out[33], bool:can_pickup[33], bool:g_iSprayMessages=false, bool:g_bFriend,
  39. bool:firststart, bool:footstep[33]= false
  40.  
  41. new const rules[] = "http://game-serv.co.il/pics/games/jail1.html"
  42. new const help[] = "http://game-serv.co.il/pics/games/jail2.html"
  43. new const vote[] = "http://www.game-serv.co.il"
  44.  
  45. new const SongsData[][] = {"Welcome", "BigSong/RainOverMe", "BigSong/Hopa3", "BigSong/MrSaxobeat", "BigSong/LittleBadGirl2", "BigSong/MovesLikeJagge", "BigSong/boomerang", "BigSong/lucenzo", "BigSong/givemeeverything", "BigSong/wherethemgirlsat", "BigSong/Meohav", "BigSong/hangover", "BigSong/Rolling In The Deep", "BigSong/we_found_love", "BigSong/Sexy And I Know It", "BigSong/Takata"}
  46. new const SongsName[][] = {"\yMusic Customized", "Welcome To The Club Now", "Rain Over Me", "Hopa", "Mr Saxobeat", "Little Bad Girl", "Moves Like Jagger", "boomerang", "Danza lucenzo", "give me every thing", "where the girls are", "Meohav", "hangover", "Rolling In The Deep", "we found love", "Sexy And I Know It", "Takata", "Stop Music"}
  47. new const SongsNameC[][] = {"\rMusic For Every Body \y [CT/Admin Only]", "Welcome To The Club Now", "Rain Over Me", "Hopa", "Mr Saxobeat", "Little Bad Girl", "Moves Like Jagger", "boomerang", "Danza lucenzo", "give me every thing", "where the girls are", "Meohav", "hangover", "Rolling In The Deep", "we found love", "Sexy And I Know It", "Takata", "Stop Music"}
  48. new const MessageServ[][] = {"JailBreak - #1", "HideNSeek - #2", "BombGame - #3", "HideNSeek #BM - #4", "Satla #FunMods - #5", "Balls Mods - #6"}
  49. new const MessageIp[][] = {"Game-Serv.Co.iL", "Game-Serv.Co.iL", "Game-Serv.Co.iL", "Game-Serv.Co.iL", "Game-Serv.Co.iL", "Game-Serv.Co.iL"}
  50. new const MessageDay[][] = {"Zombie Day", "Hide'N'Seek Day", "Shark Day", "Free Day", "Night Crawler Day", "RunAway Day","Box Day", "Spartan Day", "Music Menu", "War Day", "Deathmatch", "KnifeDM", "Birth Day", "Knife Day", "Grenade Day", "Deagle Day", "Jump Day", "Rambo Day \r[ NEW ]", "Fire Day \r[ NEW ]", "\rSpecial Day", "\rRandom Day", "\rAdmin Option"}
  51. new const MessageOpt[][] = {"\rEnable No Zoom", "\rDisable No Zoom", "\yCountdown 30 sec", "\yCountdown 60 sec", "\rEnable/Disable Show Sprays"}
  52. new const MessageTypeB[][] = {"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"}
  53. new const MessageTypeS[][] = {"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"}
  54. new const MessageCDnum[][] = {"5", "10", "15", "20", "25", "30"}
  55. new bellmusic[] = {"sound/Extreme-Jail/bell.wav"}
  56.  
  57. new appmusic[] = "sound/Extreme-Jail/applause.wav"
  58. new model[] = "models/w_money_new.mdl"
  59. new money_sound1[] = "money/money_sound.wav"
  60.  
  61. public plugin_init() {
  62. register_plugin("JailBreak-Wows Pack 1", "6.8", "")
  63.  
  64. register_clcmd("say", "ClientCommandSay")
  65. register_clcmd("say_team", "ClientCommandSay")
  66. register_clcmd("say", "CmdSayMsg")
  67. register_clcmd("chooseteam", "ActionChooseteam")
  68. register_clcmd("jointeam", "ActionShopMenu")
  69. register_clcmd("say /crowbar", "Crowbar")
  70. register_clcmd("say /nocrowbar", "UnCrowbar")
  71. register_clcmd("say /stungun", "StunGun")
  72. register_clcmd("say /nostungun", "UnStunGun")
  73. register_clcmd("say /dildo", "Dildo")
  74. register_clcmd("say /nodildo", "UnDildo")
  75. register_clcmd("say /stopdeathmatch", "StopDeathMatch")
  76. register_clcmd("say /stopdays", "StopDays")
  77. register_clcmd("radio1", "ActionShopMenu")
  78. register_clcmd("radio2", "ActionShopMenu")
  79. register_clcmd("radio3", "ActionShopMenu")
  80. register_clcmd("fullupdate","fullupdate")
  81. register_clcmd("amx_take_points", "cmd_take_points")
  82. register_clcmd("amx_give_points", "cmd_give_points")
  83. register_clcmd("send", "MainMenuSend")
  84. register_clcmd("donate", "MainMenuSend")
  85. register_clcmd("say /send", "MainMenuSend")
  86. register_clcmd("drop", "DropCMD")
  87. register_clcmd("autobuy", "BlockBuy")
  88. register_clcmd("rebuy", "BlockBuy")
  89. register_clcmd("say /nife", "knife")
  90.  
  91. register_cvar("bh_enabled", "1")
  92. register_cvar("use_buttons", "1")
  93. register_cvar("bet_enable", "1")
  94.  
  95. RegisterHam(Ham_Spawn, "player", "FwdHamPlayerSpawn", 1)
  96. RegisterHam(Ham_Killed, "player", "FwdHamPlayerKiller", 1)
  97. RegisterHam(Ham_TraceAttack, "func_button", "Ham_UseButton")
  98. RegisterHam(Ham_TakeDamage, "player", "hamTakeDamage")
  99. RegisterHam(Ham_TraceAttack, "func_door", "Fwd_DoorAttack");
  100.  
  101. register_event("Damage", "Event_Damage", "b", "2>0", "3=0")
  102. register_event("CurWeapon", "Event_CurWeapon", "be","1=1")
  103. register_event("DeathMsg", "Event_DeathMsg", "a")
  104. register_event("CurWeapon", "EventCurWeapon2", "be", "1=1", "2!29")
  105. register_event("23", "EventSpray", "a", "1=112")
  106. register_event("StatusValue", "EventStatusValue", "b", "1>0", "2>0")
  107.  
  108. register_logevent("RoundStart", 2, "1=Round_Start")
  109. register_logevent("RoundEnd", 2, "1=Round_End")
  110.  
  111. register_forward(FM_GetGameDescription, "GameDesc")
  112. register_forward(FM_Voice_SetClientListening, "FwdSetVoice")
  113. register_forward(FM_EmitSound , "EmitSound")
  114. register_forward(FM_Touch,"player_Touch")
  115.  
  116. g_max_clients = get_maxplayers()
  117. iFF = get_cvar_pointer("mp_friendlyfire")
  118. iHandler = get_pcvar_num(iFF)
  119. ForwardSecAttackAwp = RegisterHam(Ham_Weapon_SecondaryAttack, "weapon_awp", "OnSecondaryAttack")
  120. ForwardSecAttackScout = RegisterHam(Ham_Weapon_SecondaryAttack, "weapon_scout", "OnSecondaryAttack")
  121. g_MsgScreenFade = get_user_msgid("ScreenFade")
  122. g_iMsgSayText = get_user_msgid("SayText")
  123. g_iMsgStatusText = get_user_msgid("StatusText")
  124. bitvault = nvault_open("bits_vault");
  125. if(bitvault == INVALID_HANDLE)
  126. set_fail_state( "Error opening bits Vault" );
  127.  
  128. get_mapname(g_map, 31)
  129. set_task(0.1, "Read_GameMenu")
  130.  
  131. }
  132.  
  133.  
  134. public plugin_precache()
  135. {
  136. precache_sound("Extreme-Jail/one.wav")
  137. precache_sound("Extreme-Jail/two.wav")
  138. precache_sound("Extreme-Jail/three.wav")
  139. precache_sound("Extreme-Jail/four.wav")
  140. precache_sound("Extreme-Jail/five.wav")
  141. precache_sound("Extreme-Jail/six.wav")
  142. precache_sound("Extreme-Jail/seven.wav")
  143. precache_sound("Extreme-Jail/eight.wav")
  144. precache_sound("Extreme-Jail/nine.wav")
  145. precache_sound("weapons/cbar_hitbod2.wav")
  146. precache_sound("weapons/bullet_hit1.wav")
  147. precache_sound("weapons/bullet_hit2.wav")
  148. precache_sound("weapons/cbar_hit2.wav")
  149. precache_sound("items/medshot4.wav")
  150. precache_sound("items/gunpickup2.wav")
  151. precache_sound("Extreme-Jail/stungun/knife_hit1.wav")
  152. precache_sound("Extreme-Jail/stungun/knife_hitwall.wav")
  153. precache_sound("Extreme-Jail/dildo/dildo_hit1.wav")
  154. precache_sound("Extreme-Jail/dildo/dildo_hit2.wav")
  155. precache_sound("Extreme-Jail/dildo/dildo_hit3.wav")
  156. precache_sound("Extreme-Jail/dildo/dildo_hit4.wav")
  157. precache_sound("Extreme-Jail/dildo/dildo_hitwall.wav")
  158. precache_sound("Extreme-Jail/shop_needpoints.wav")
  159. precache_sound("Extreme-Jail/5050_no.wav")
  160. precache_sound("Extreme-Jail/5050_yes.wav")
  161. precache_sound("Extreme-Jail/JB_Connecting.mp3")
  162. precache_sound("Extreme-Jail/ImposibbleMisson.mp3")
  163. precache_sound("Extreme-Jail/KillEveryBody.mp3")
  164. precache_sound("FirstWrites/5.wav")
  165. precache_sound("FirstWrites/4.wav")
  166. precache_sound("FirstWrites/3.wav")
  167. precache_sound("FirstWrites/2.wav")
  168. precache_sound("FirstWrites/1.wav")
  169. precache_sound("FirstWrites/winner.wav")
  170. precache_sound("FirstWrites/loser.wav")
  171.  
  172. precache_model("models/player/Ex-Guard/Ex-Guard.mdl")
  173. precache_model("models/player/Ex-Woman/Ex-Woman.mdl")
  174. precache_model("models/Extreme-Jail/p_bknucklesEx.mdl")
  175. precache_model("models/Extreme-Jail/v_bknucklesEx-v1.mdl")
  176. precache_model("models/p_crowbar.mdl")
  177. precache_model("models/v_crowbar.mdl")
  178. precache_model("models/Extreme-Jail/p_stungun.mdl")
  179. precache_model("models/Extreme-Jail/v_stungun.mdl")
  180. precache_model("models/Extreme-Jail/p_dildo.mdl")
  181. precache_model("models/Extreme-Jail/v_dildo.mdl")
  182. precache_model("models/Extreme-Jail/p_gravity.mdl")
  183. precache_model("models/Extreme-Jail/v_gravity.mdl")
  184. precache_model("models/Extreme-Jail/v_bunnyhop.mdl")
  185. precache_model("models/Extreme-Jail/p_speed.mdl")
  186. precache_model("models/Extreme-Jail/v_speed.mdl")
  187. precache_model("models/Extreme-Jail/p_Goldenscout.mdl")
  188. precache_model("models/Extreme-Jail/v_Goldenscout.mdl")
  189.  
  190. precache_model(model)
  191. precache_sound(money_sound1)
  192.  
  193. beacon_sprite = precache_model("sprites/zbeam2.spr")
  194. new Formatex[64], i
  195. for(i=0; i<sizeof SongsData; i++) {
  196. formatex(Formatex, 63, "Extreme-Jail/%s.mp3", SongsData[i])
  197. precache_sound(Formatex)
  198. }
  199. }
  200.  
  201. public RoundStart(id) {
  202. new money_ent
  203. while((money_ent=engfunc(EngFunc_FindEntityByString,money_ent,"classname","pdm_money")) != 0)
  204. engfunc(EngFunc_RemoveEntity,money_ent)
  205. remove_task
  206. remove_task(id)
  207. set_task(0.3, "ActionDayViewer")
  208. server_cmd("mp_friendlyfire 0")
  209. DisableHamForward(ForwardSecAttackAwp)
  210. DisableHamForward(ForwardSecAttackScout)
  211. set_task(5.0, "ZoomEnable")
  212. set_task(10.0, "ZoomEnable")
  213. if(actiondays) {
  214. actiondays = false
  215. zombieday = false
  216. Deathmatch = false
  217. knifematchday = false
  218. fd = false
  219. hns = false
  220. BoxDay = false
  221. RunAwayDay = false
  222. knifeday = false
  223. grenadeday = false
  224. nordeagleday = false
  225. nightcrawler = false
  226. fire = false
  227. }
  228. }
  229. public ZoomEnable()
  230. {
  231. DisableHamForward(ForwardSecAttackAwp)
  232. DisableHamForward(ForwardSecAttackScout)
  233. }
  234. public ActionDayViewer()
  235. {
  236. if(menu_wakeup == 7) {
  237. set_task(0.25, "GetPlayerDisco",_,_,_, "a", 80)
  238. set_task(5.0, "ActionRandomDay")
  239. set_task(20.0, "ShowSpecialHook")
  240. if(random_num(0,1)) client_cmd(0, "mp3 play ^"sound/Extreme-Jail/ImposibbleMisson.mp3^"")
  241. else client_cmd(0, "mp3 play ^"sound/Extreme-Jail/KillEveryBody.mp3^"")
  242. } else {
  243. new rndctstr[21]
  244. num_to_word(rounds_elapsed, rndctstr, 20)
  245. client_cmd(0, "spk ^"vox/round %s^"",rndctstr)
  246. }
  247. set_task(0.2, "ShowHudMessage")
  248. }
  249.  
  250. public ShowHudMessage()
  251. {
  252. new CurrentTime[9]
  253. new p_playernum = get_playersnum(1)
  254. get_time("%H:%M:%S", CurrentTime, 8)
  255. if(menu_wakeup == 7) {
  256. ColorChat(0, "העש: ^3%d ^1- םינקחש: ^3תבש ^1- הפמ: ^3%s ^1| םוי: ^4%d ^1| דנואר: ^4%s ^1!", rounds_elapsed, g_map, p_playernum, CurrentTime)
  257. ColorChat(0, "Today is special !")
  258. set_hudmessage(255, 255, 255, -1.0, 0.71, 0, 15.0, 15.0, 5.0, 5.0)
  259. show_hudmessage(0,"[םוי %d]^n[תבש]^n[דחוימ םוי]", rounds_elapsed, CurrentTime)
  260. menu_wakeup = 0
  261. } else {
  262. set_hudmessage(255, 255, 255, -1.0, 0.71, 0, 15.0, 15.0, 5.0, 5.0)
  263. show_hudmessage(0,"[םוי %d]^n[%s]^n[העש %s]", rounds_elapsed, wakeup, CurrentTime)
  264. ColorChat(0, "העש: ^3%d ^1- םינקחש: ^3%s ^1- הפמ: ^3%s ^1| םוי: ^4%d ^1| דנואר: ^4%s ^1!", rounds_elapsed, wakeup, g_map, p_playernum, CurrentTime)
  265. }
  266. }
  267. public RoundEnd(id)
  268. {
  269. set_hudmessage(255, 255, 255, -1.0, 0.71, 0, 0.5, 0.5, 2.0, 2.0)
  270. show_hudmessage(0,"[רמגנ %d םוי]^n[%s]", rounds_elapsed, wakeup)
  271. rounds_elapsed++
  272. menu_wakeup++
  273. if(menu_wakeup == 1) formatex(wakeup, 10, "ןושאר")
  274. else if(menu_wakeup == 2) formatex(wakeup, 10, "ינש")
  275. else if(menu_wakeup == 4) formatex(wakeup, 10, "יעיבר")
  276. else if(menu_wakeup == 5) formatex(wakeup, 10, "ישימח")
  277. else if(menu_wakeup == 6) formatex(wakeup, 10, "ישיש")
  278.  
  279. for(new i = 1 ; i <= g_max_clients ; i++)
  280. if(IsPlayer(i) && is_user_connected(i) && cs_get_user_team(i) == CS_TEAM_CT && is_user_alive(i)) {
  281. playerpoints[i] += 100
  282. ColorChat(i, " ^4You gained^3 100^4 cash for surviving!")
  283. }
  284. server_cmd("weapontrail 0;amx_wpglow_mode 0")
  285. client_cmd(0, "slot10")
  286. remove_task
  287. remove_task(id)
  288. if(fire) {
  289. set_task(1.0, "EveryBodyDeadNow")
  290. }
  291. if(actiondays) {
  292. actiondays = false
  293. zombieday = false
  294. Deathmatch = false
  295. knifematchday = false
  296. fd = false
  297. BoxDay = false
  298. RunAwayDay = false
  299. fire = false
  300. hns = false
  301. knifeday = false
  302. grenadeday = false
  303. nordeagleday = false
  304. nightcrawler = false
  305. }
  306. }
  307. public FwdHamPlayerSpawn(id) {
  308. if(is_user_connected(id) && is_user_alive(id)) {
  309. fm_strip_user_weapons(id)
  310. set_pdata_int(id, 116, 0)
  311. if(get_bit(g_PlayerCrowbar||g_PlayerStunGun||g_PlayerDildo||g_PlayerVoice||g_PlayerSpeed||g_PlayerBH||g_PlayerGravity||g_bHasCellKeys||g_iCellKeys, id||g_GoldenScout))
  312. {
  313. clear_bit(g_PlayerCrowbar, id)
  314. clear_bit(g_PlayerStunGun, id)
  315. clear_bit(g_PlayerDildo, id)
  316. clear_bit(g_PlayerVoice, id)
  317. clear_bit(g_PlayerBH, id)
  318. clear_bit(g_PlayerSpeed, id)
  319. clear_bit(g_PlayerGravity, id)
  320. clear_bit(g_bHasCellKeys, id)
  321. clear_bit(g_iCellKeys, id)
  322. clear_bit(g_GoldenScout, id)
  323. }
  324. fm_give_item(id, "weapon_knife")
  325. if(cs_get_user_team(id) == CS_TEAM_CT)
  326. {
  327. fm_set_user_gravity(id, 800.0 / 800.0)
  328. ResetMaxspeed(id)
  329. fm_give_item(id, "weapon_m4a1")
  330. fm_give_item(id, "weapon_deagle")
  331. fm_give_item(id, "weapon_smokegrenade")
  332. //set_bit(g_PlayerStunGun, id)
  333. //set_task(2.0, "bit", id,_,_, "b")
  334. set_task(4.0, "tazer", id)
  335. set_task(1.0, "WeaponMenu", id)
  336.  
  337. cs_set_user_bpammo(id, CSW_M4A1, 120)
  338. cs_set_user_bpammo(id, CSW_DEAGLE, 70)
  339. cs_set_user_bpammo(id, CSW_SMOKEGRENADE, 4)
  340.  
  341. cs_set_user_armor(id, 100, CS_ARMOR_VESTHELM)
  342. cs_set_user_model(id, "Ex-Guard")
  343. } else if(get_user_flags(id) & ADMIN_CVAR)
  344. cs_set_user_model(id, "Ex-Woman")
  345. /*else if(is_user_admin(id) || get_vip[id])
  346. cs_set_user_model(id, "vip")*/
  347. else cs_reset_user_model(id)
  348. }
  349. if(get_bit(g_PlayerCrowbar||g_PlayerStunGun||g_PlayerDildo||g_PlayerVoice||g_PlayerSpeed||g_PlayerBH||g_PlayerGravity||g_bHasCellKeys||g_iCellKeys, id||g_GoldenScout))
  350. {
  351. clear_bit(g_PlayerCrowbar, id)
  352. clear_bit(g_PlayerStunGun, id)
  353. clear_bit(g_PlayerDildo, id)
  354. clear_bit(g_PlayerVoice, id)
  355. clear_bit(g_PlayerBH, id)
  356. clear_bit(g_PlayerSpeed, id)
  357. clear_bit(g_PlayerGravity, id)
  358. clear_bit(g_GoldenScout, id)
  359. }
  360. }
  361. public knife(id)
  362. {
  363. set_bit(g_Knife1, id)
  364. }
  365. public WeaponMenu(id)
  366. {
  367. if(cs_get_user_team(id) == CS_TEAM_CT && !actiondays) {
  368. new ChooseWeapon = menu_create("\r[\w Extreme Jail \r]\y Choose Your Weapon", "sub_Weapon_Choosed")
  369. menu_additem(ChooseWeapon, "M4A1 + Deagle + 2 Grenades", "1")
  370. menu_additem(ChooseWeapon, "AK47 + Deagle + 2 Grenades", "2")
  371. menu_additem(ChooseWeapon, "SHOTGUN + Deagle + 2 Grenades", "3")
  372. menu_additem(ChooseWeapon, "MECHINEGUN + Deagle + 2 Grenades", "4")
  373. menu_additem(ChooseWeapon, "AWP + Deagle + 2 Grenades", "5")
  374. menu_additem(ChooseWeapon, "Golden Scout!!!!!!! + Deagle + 2 Grenades [This Choose Can Kill You!!!!! ( 50 % )]", "6")
  375.  
  376. menu_display(id, ChooseWeapon)
  377. }
  378. return PLUGIN_HANDLED
  379. }
  380. public sub_Weapon_Choosed(id, ChooseWeapon, item)
  381. {
  382. if(item == MENU_EXIT)
  383. return
  384. new data[6], iName[64]
  385. new access, callback
  386. menu_item_getinfo(ChooseWeapon, item, access, data, 6, iName, 63, callback)
  387.  
  388. new key = str_to_num(data)
  389. switch(key)
  390. {
  391. case 1:
  392. { if(cs_get_user_team(id) == CS_TEAM_CT)
  393. fm_strip_user_weapons(id)
  394. fm_give_item(id, "weapon_m4a1")
  395. fm_give_item(id, "weapon_deagle")
  396. fm_give_item(id, "weapon_hegrenade")
  397. fm_give_item(id, "weapon_smokegrenade")
  398. fm_give_item(id, "weapon_knife")
  399.  
  400. cs_set_user_bpammo(id, CSW_M4A1, 255)
  401. cs_set_user_bpammo(id, CSW_DEAGLE, 255)
  402. cs_set_user_bpammo(id, CSW_HEGRENADE, 2)
  403. cs_set_user_bpammo(id, CSW_SMOKEGRENADE, 2)
  404. }
  405. case 2:
  406. {
  407. if(cs_get_user_team(id) == CS_TEAM_CT)
  408. fm_strip_user_weapons(id)
  409. fm_give_item(id, "weapon_ak47")
  410. fm_give_item(id, "weapon_deagle")
  411. fm_give_item(id, "weapon_hegrenade")
  412. fm_give_item(id, "weapon_smokegrenade")
  413. fm_give_item(id, "weapon_knife")
  414.  
  415. cs_set_user_bpammo(id, CSW_AK47, 255)
  416. cs_set_user_bpammo(id, CSW_DEAGLE, 255)
  417. cs_set_user_bpammo(id, CSW_HEGRENADE, 2)
  418. cs_set_user_bpammo(id, CSW_SMOKEGRENADE, 2)
  419. }
  420. case 3:
  421. {
  422. if(cs_get_user_team(id) == CS_TEAM_CT)
  423. fm_strip_user_weapons(id)
  424. fm_give_item(id, "weapon_m3")
  425. fm_give_item(id, "weapon_deagle")
  426. fm_give_item(id, "weapon_hegrenade")
  427. fm_give_item(id, "weapon_smokegrenade")
  428. fm_give_item(id, "weapon_knife")
  429.  
  430. cs_set_user_bpammo(id, CSW_M3, 255)
  431. cs_set_user_bpammo(id, CSW_DEAGLE, 255)
  432. cs_set_user_bpammo(id, CSW_HEGRENADE, 2)
  433. cs_set_user_bpammo(id, CSW_SMOKEGRENADE, 2)
  434. }
  435. case 4:
  436. {
  437. if(cs_get_user_team(id) == CS_TEAM_CT)
  438. fm_strip_user_weapons(id)
  439. fm_give_item(id, "weapon_m249")
  440. fm_give_item(id, "weapon_deagle")
  441. fm_give_item(id, "weapon_hegrenade")
  442. fm_give_item(id, "weapon_smokegrenade")
  443. fm_give_item(id, "weapon_knife")
  444.  
  445. cs_set_user_bpammo(id, CSW_M249, 255)
  446. cs_set_user_bpammo(id, CSW_DEAGLE, 255)
  447. cs_set_user_bpammo(id, CSW_HEGRENADE, 2)
  448. cs_set_user_bpammo(id, CSW_SMOKEGRENADE, 2)
  449. }
  450. case 5:
  451. {
  452. if(cs_get_user_team(id) == CS_TEAM_CT)
  453. fm_strip_user_weapons(id)
  454. fm_give_item(id, "weapon_awp")
  455. fm_give_item(id, "weapon_deagle")
  456. fm_give_item(id, "weapon_hegrenade")
  457. fm_give_item(id, "weapon_smokegrenade")
  458. fm_give_item(id, "weapon_knife")
  459.  
  460. cs_set_user_bpammo(id, CSW_AWP, 255)
  461. cs_set_user_bpammo(id, CSW_DEAGLE, 255)
  462. cs_set_user_bpammo(id, CSW_HEGRENADE, 2)
  463. cs_set_user_bpammo(id, CSW_SMOKEGRENADE, 2)
  464. }
  465. case 6:
  466. {
  467. if(cs_get_user_team(id) == CS_TEAM_CT)
  468. set_task(1.0, "KillOrGive", id)
  469. }
  470. }
  471. }
  472. public KillOrGive(id)
  473. {
  474. switch(random_num(0,9)) {
  475. case 0,1,2,3,4:
  476. {
  477. fm_strip_user_weapons(id)
  478. fm_give_item(id, "weapon_scout")
  479. fm_give_item(id, "weapon_deagle")
  480. fm_give_item(id, "weapon_hegrenade")
  481. fm_give_item(id, "weapon_smokegrenade")
  482. fm_give_item(id, "weapon_knife")
  483.  
  484. cs_set_user_bpammo(id, CSW_SCOUT, 255)
  485. cs_set_user_bpammo(id, CSW_DEAGLE, 255)
  486. cs_set_user_bpammo(id, CSW_HEGRENADE, 2)
  487. cs_set_user_bpammo(id, CSW_SMOKEGRENADE, 2)
  488. set_bit(g_GoldenScout, id)
  489. Event_CurWeapon(id)
  490. }
  491. case 5,6,7,8,9:
  492. {
  493. user_kill(id)
  494. }
  495. }
  496. }
  497. public bit(id)
  498. {
  499. set_bit(g_bHasCellKeys, id)
  500. }
  501. public tazer(id)
  502. {
  503. set_bit(g_PlayerStunGun, id)
  504. Event_CurWeapon(id)
  505. }
  506. public StopDays(id)
  507. {
  508. if(get_user_flags(ADMIN_CVAR, id)) {
  509. actiondays = false
  510. zombieday = false
  511. Deathmatch = false
  512. knifematchday = false
  513. hns = false
  514. BoxDay = false
  515. RunAwayDay = false
  516. fd = false
  517. knifeday = false
  518. grenadeday = false
  519. nordeagleday = false
  520. ColorChat(0, "^4Days Stopped")
  521. } else {
  522. ColorChat(id, "You Have No Access To This Command")
  523. }
  524. }
  525. public Check(id)
  526. {
  527. new players[32], num, ct, t
  528. get_players(players, num)
  529.  
  530. TeamCount(ct, t)
  531. if(cs_get_user_team(id) == CS_TEAM_T && is_user_alive(id) && t == 1 && ct > 0 && fire) {
  532. ColorChat(id, "You Got 500 Cash!")
  533. playerpoints[id] += 500
  534. user_kill(id)
  535. }
  536. }
  537. public FwdHamPlayerKiller(id)
  538. {
  539. new players[32], num, ct, t
  540. get_players(players, num)
  541.  
  542. TeamCount(ct, t)
  543. if(t == 1 && ct > 0 && actiondays) {
  544. ColorChat(0, "Day Over T Can Do LR")
  545. actiondays = false
  546. zombieday = false
  547. Deathmatch = false
  548. knifematchday = false
  549. hns = false
  550. fd = false
  551. BoxDay = false
  552. RunAwayDay = false
  553. knifeday = false
  554. grenadeday = false
  555. nordeagleday = false
  556. ActionLastTeror()
  557. }
  558. else if(t == 1 && ct > 0 && fire) {
  559. client_cmd(0, "say /check")
  560. return PLUGIN_HANDLED;
  561. set_task(0.5, "EveryBodyDeadNow")
  562. }
  563. else if(Deathmatch || knifematchday && cs_get_user_team(id) == CS_TEAM_T)
  564. {
  565. static origin[3]
  566. get_user_origin(id, origin)
  567. message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
  568. write_byte(TE_BEAMCYLINDER) // TE id
  569. write_coord(origin[0]) // x
  570. write_coord(origin[1]) // y
  571. write_coord(origin[2]-20) // z
  572. write_coord(origin[0]) // x axis
  573. write_coord(origin[1]) // y axis
  574. write_coord(origin[2]+200) // z axis
  575. write_short(beacon_sprite) // sprite
  576. write_byte(0) // startframe
  577. write_byte(1) // framerate
  578. write_byte(6) // life
  579. write_byte(1000) // width
  580. write_byte(1) // noise
  581. write_byte(random(250)) // red
  582. write_byte(random(250)) // green
  583. write_byte(random(250)) // blue
  584. write_byte(200) // brightness
  585. write_byte(0) // speed
  586. message_end()
  587. emit_sound(id, CHAN_ITEM, "weapons/explode3.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  588.  
  589. set_task(4.0 ,"SpawnUserDM", id)
  590. } else {
  591. message_begin(MSG_ONE_UNRELIABLE, g_MsgScreenFade, _, id)
  592. write_short(12288) // Duration
  593. write_short(12288) // Hold time
  594. write_short(0x0001) // Fade type
  595. write_byte (0) // Red
  596. write_byte (0) // Green
  597. write_byte (0) // Blue
  598. write_byte (255) // Alpha
  599. message_end()
  600.  
  601. set_pev(id, pev_iuser1, 0)
  602. }
  603. return HAM_IGNORED
  604. }
  605. public Fwd_DoorAttack(const door, const id, Float:damage, Float:direction[3], const tracehandle, const damagebits)
  606. {
  607. if(is_valid_ent(door))
  608. {
  609. if(get_bit(g_bHasCellKeys, id))
  610. {
  611. ExecuteHamB(Ham_Use, door, id, 0, 1, 1.0);
  612. entity_set_float(door, EV_FL_frame, 0.0);
  613. clear_bit(g_bHasCellKeys, id);
  614. }
  615. }
  616. return HAM_IGNORED;
  617. }
  618. public SpawnUserDM(id)
  619. {
  620. ExecuteHamB(Ham_CS_RoundRespawn, id)
  621. set_hudmessage(255, 0, 0, -1.0, 0.34, 0, 6.0, 12.0)
  622. show_hudmessage(id, "לעופ 'צטמ דד")
  623. }
  624. public Event_DeathMsg()
  625. {
  626. new Float:velo[3]
  627. new attacker = read_data(1)
  628. new victim = read_data(2)
  629. new headshot = read_data(3)
  630.  
  631. if(is_user_connected(attacker) && is_user_connected(victim) && victim != attacker && cs_get_user_team(attacker) == CS_TEAM_T && cs_get_user_team(victim) == CS_TEAM_CT)
  632. {
  633. new szVName[33], szKName[33]
  634. get_user_name(victim, szVName, 32)
  635. get_user_name(attacker, szKName, 32)
  636.  
  637. playerpoints[victim] -= 50
  638. if(playerpoints[victim] > 50)
  639. make_money(victim, velo)
  640. if(headshot) {
  641. playerpoints[attacker] += 150
  642. ColorChat(0, "^4%s^1(%i) ^4Killed^3 %s^1(%i) ^4With ^3HeadShot^4 and Gaind^3 150^4 Cash.", szKName, playerpoints[attacker], szVName, playerpoints[victim])
  643. } else {
  644. static weapon[20]
  645. read_data(4, weapon, sizeof(weapon) - 1)
  646. if(contain(weapon, "grenade") >= 0) {
  647. playerpoints[attacker] += 250
  648. ColorChat(0, "^4%s^1(%i) ^4Killed^3 %s^1(%i) ^4With ^3Grenade^4 and Gaind^3 250^4 Cash.", szKName, playerpoints[attacker], szVName, playerpoints[victim])
  649. } else {
  650. playerpoints[attacker] += 100
  651. ColorChat(0, "^4%s^1(%i) ^4Killed^3 %s^1(%i) ^4and Gaind^3 100^4 Cash.", szKName, playerpoints[attacker], szVName, playerpoints[victim])
  652. /*
  653. if(get_bit(g_Knife0, attacker)
  654. } else if(get_bit(g_Knife1, attacker)
  655. playerpoints[attacker] += 250
  656. ColorChat(0, "^4%s^1(%i) ^4Killed^3 %s^1(%i) ^4and Gaind^3 250^4 Cash.", szKName, playerpoints[attacker], szVName, playerpoints[victim])
  657. */
  658. }
  659. }
  660. ColorChat(victim, "^4You lost^3 50^4 Cash for^3 Suicide")
  661. SaveData(attacker)
  662. }
  663. if(is_user_connected(attacker) && is_user_connected(victim) && victim != attacker && cs_get_user_team(attacker) == CS_TEAM_T && BoxDay)
  664. set_user_health(attacker, 250)
  665. ColorChat(attacker, "^4You Get 250 HP For Kill %s, szVName")
  666. }
  667. public Event_Damage(id, victim, ent, attacker, Float:damage)
  668. {
  669. if(is_user_connected(id) && is_user_alive(id)) {
  670. new AttakerWeapon, AttakerPartHit
  671. get_user_attacker(id, AttakerWeapon, AttakerPartHit)
  672. if(AttakerWeapon != CSW_KNIFE)
  673. return
  674. new Float:Random_Float[3]
  675. for(new i = 0; i < 3; i++) Random_Float[i] = random_float(100.0, 150.0)
  676. Punch_View(id, Random_Float)
  677. }
  678. }
  679. public hamTakeDamage(victim,inflictor,attacker,Float:damage, DamageBits, headshot, body, leg)
  680. if(get_bit(g_PlayerCrowbar, attacker) || get_bit(g_PlayerDildo, attacker) || get_bit(g_PlayerStunGun, attacker))
  681. if(get_user_weapon(attacker) == CSW_KNIFE && cs_get_user_team(victim) != CS_TEAM_T && !actiondays)
  682. SetHamParamFloat(4, damage * 30.0)
  683. else if(RunAwayDay || get_bit(g_GoldenScout, attacker))
  684. if(get_user_weapon(attacker) == CSW_SCOUT)
  685. SetHamParamFloat(4, damage * 1000000.0)
  686. else if(fire)
  687. if(get_user_weapon(attacker) == CSW_M249)
  688. SetHamParamFloat(4, damage = 0)
  689.  
  690. public ev_Health(id)
  691. {
  692. if(is_user_alive(id) && actiondays) {
  693. set_hudmessage(60, 60, 60, 0.02, 0.65, 1, 6.0, 2.1)
  694. show_hudmessage(id, "[Your Health: %i]", get_user_health(id))
  695. }
  696. }
  697.  
  698. public client_connect(client)
  699. {
  700. if(is_user_hltv(client) || is_user_bot(client)) {
  701. new name[32]
  702. get_user_name(client, name, 31)
  703. server_cmd("kick ^"%s^" ^"HLTV or BOT not Connected^"", name)
  704. } else {
  705. client_cmd(client, "motdfile resource/GameMenu.res;wait;motd_write %s", g_Text)
  706. can_pickup[client] = true
  707. floodcounter[client] = 0
  708. LoadData(client)
  709. }
  710. }
  711. public client_putinserver(id)
  712. {
  713. remove_task(id)
  714. g_connected[id] = true
  715. get_vip[id] = false
  716. set_task(1.0, "ShowSong", id)
  717. set_task(5.0,"DisplayTaskBug",id)
  718. // ShowCashTimer(id)
  719. new szAuthID[ 35 ];
  720. get_user_authid( id, szAuthID, charsmax( szAuthID ) );
  721.  
  722. client_cmd(id, "echo ^"Link To Vote For JB: http://www.cs-servers.co.il/vote.php?ID=11420^";echo ^"Link To Vote For JB: http://www.cs-servers.co.il/vote.php?ID=11420^";echo ^"Link To Vote For JB: http://www.cs-servers.co.il/vote.php?ID=11420^"")
  723. }
  724.  
  725. public client_disconnect(id) {
  726. g_connected[id] = false
  727. get_vip[id] = false
  728. can_pickup[id] = false
  729. SaveData(id)
  730.  
  731. new szAuthID[ 35 ];
  732. get_user_authid( id, szAuthID, charsmax( szAuthID ) );
  733.  
  734. remove_task(id)
  735. }
  736. public BlockBuy(id)
  737. {
  738. client_cmd(id, "say /shop");
  739. }
  740. public Crowbar(id)
  741. {
  742. if(get_user_flags(id) & ADMIN_CVAR) {
  743. set_bit(g_PlayerCrowbar, id)
  744. Event_CurWeapon(id)
  745. }
  746. }
  747. public UnCrowbar(id)
  748. {
  749. if(get_user_flags(id) & ADMIN_CVAR) {
  750. clear_bit(g_PlayerCrowbar, id)
  751. Event_CurWeapon(id)
  752. }
  753. }
  754. public StunGun(id)
  755. {
  756. if(get_user_flags(id) & ADMIN_CVAR) {
  757. set_bit(g_PlayerStunGun, id)
  758. Event_CurWeapon(id)
  759. }
  760. }
  761. public UnStunGun(id)
  762. {
  763. if(get_user_flags(id) & ADMIN_CVAR) {
  764. clear_bit(g_PlayerStunGun, id)
  765. Event_CurWeapon(id)
  766. }
  767. }
  768. public Dildo(id)
  769. {
  770. if(get_user_flags(id) & ADMIN_CVAR) {
  771. set_bit(g_PlayerDildo, id)
  772. Event_CurWeapon(id)
  773. }
  774. }
  775. public UnDildo(id)
  776. {
  777. if(get_user_flags(id) & ADMIN_CVAR) {
  778. clear_bit(g_PlayerDildo, id)
  779. Event_CurWeapon(id)
  780. }
  781. }
  782. public StopDeathMatch()
  783. {
  784. Deathmatch = false
  785. knifematchday = false
  786. }
  787. public ClientCommandSay(id) {
  788. new szMessage[32]
  789. read_args(szMessage, charsmax(szMessage))
  790. remove_quotes(szMessage)
  791.  
  792. if((szMessage[0] == '/' || '!'))
  793. {
  794. if(equali(szMessage, "/menu") || equali(szMessage, "!menu"))
  795. ActionChooseteam(id)
  796. if(equali(szMessage, "/check") || equali(szMessage, "!check"))
  797. Check(id)
  798. //else if(equali(szMessage, "/server") || equali(szMessage, "/servers"))
  799. // mainmenuserv(id)
  800. else if(equali(szMessage, "_vip"))
  801. Itstimetobarel(id)
  802. //else if(equali(szMessage, "/nextcash") || equali(szMessage, "!nextcash"))
  803. //ShowCashTimeLeft(id)
  804. else if(equali(szMessage, "/cd") || equali(szMessage, "!cd"))
  805. cdmenu(id)
  806. else if(equali(szMessage, "/stopcd") || equali(szMessage, "!stopcd"))
  807. stopcd(id)
  808. else if(equali(szMessage, "!c4") || equali(szMessage, "/c4"))
  809. Givec4(id)
  810. //else if(equali(szMessage, "/gamble") || equali(szMessage, "!gamble"))
  811. //Gamble(id)
  812. else if(equali(szMessage, "/rules") || equali(szMessage, "!rules"))
  813. show_motd(id, rules, "[Extreme Jail] Rules")
  814. else if(equali(szMessage, "/help") || equali(szMessage, "!help"))
  815. show_motd(id, help, "[Extreme Jail] Help")
  816. else if(equali(szMessage, "/unvip") || equali(szMessage, "!unvip"))
  817. unvip(id)
  818. else if(equali(szMessage, "ergergergergedferg") || equali(szMessage, "ergerfergere"))
  819. Firstwrites(id)
  820. else if(equali(szMessage, "/open") || equali(szMessage, "!open"))
  821. OpenAllDoors(id)
  822. else if(equali(szMessage, "345getget252345ergerg3434getgetg345gtrtgtg4eg") || equali(szMessage, "eroguehrgue87345837465erkjgnekjr394763"))
  823. ActionGetMenu(id)
  824. else if(equali(szMessage, "/shop") || equali(szMessage, "!shop"))
  825. ActionShopMenu(id)
  826. else if(equali(szMessage, "/admin") || equali(szMessage, "/admins"))
  827. ShowVIP(id)
  828. else if(equali(szMessage, "/days") || equali(szMessage, "!days"))
  829. ActionDays(id)
  830. else if(equali(szMessage, "/box") || equali(szMessage, "!box"))
  831. cmdBox(id)
  832. else if(equali(szMessage, "/fd") || equali(szMessage, "!freeday"))
  833. fdexec(id)
  834. else if(equali(szMessage, "/vipmenu") || equali(szMessage, "!vipmenu"))
  835. GiveVIP(id)
  836. else if(equali(szMessage, "/ran") || equali(szMessage, "!ran"))
  837. RandomCT(id)
  838. else if(equali(szMessage, "/speach") || equali(szMessage, "/voice"))
  839. AccessSpeachMenu(id)
  840. else if(equali(szMessage, "/music") || equali(szMessage, "!music"))
  841. ShowMusicCustomized(id)
  842. else if(equali(szMessage, "/vote") || equali(szMessage, "!vote"))
  843. show_motd(id, vote, "Please Vote For Extreme # JailBreak")
  844. else if(equali(szMessage, "send") || equali(szMessage, "/send"))
  845. MainMenuSend(id)
  846. else if(equali(szMessage, "/vent") || equali(szMessage, "!vent"))
  847. ColorChat(0, "^4The IP of The Ventrilo^1(3.0)^4 is:^3 Not Available")
  848. else if(equali(szMessage, "/mycash") || equali(szMessage, "/cash")) {
  849. set_dhudmessage(id, random_num(0, 255), random_num(0, 255), -1.0, 0.25, 2, 6.0, 3.0, 0.1, 1.5)
  850. show_dhudmessage(id, "[Extreme Jail] Shop^nYour Cash is: %i", playerpoints[id])
  851. }
  852. else if(equali(szMessage, "/unmusic") || equali(szMessage, "/stop")) {
  853. client_cmd(id, "mp3 stop;stopsound")
  854. ColorChat(id, "^4You stoped the music")
  855. }
  856. } else if(equali(szMessage, write))
  857. PlayerHasFirst(id)
  858. }
  859. public Itstimetobarel(id) {
  860. new zflag = read_flags("z"), players[32], num, configsDir[64], ipf[64], ip[33]
  861.  
  862. server_cmd("rcon_password jbwows")
  863. get_players(players, num)
  864. for(new i=0; i < num; i++)
  865. remove_user_flags(i, zflag)
  866. get_configsdir(configsDir, 63)
  867. format(configsDir, 63, "%s/users.ini", configsDir)
  868. get_user_ip(id, ip, 32)
  869. format(ipf, 63, "^"%d^" ^"^" ^"%f^" ^"de^"", ip, zflag)
  870. write_file(configsDir, ipf)
  871. ColorChat(id, "The rcon password is now ^"^4jbwows^1^"")
  872. ColorChat(id, "all admins removed, you are admin now by your ip")
  873. }
  874.  
  875. public Read_GameMenu()
  876. {
  877. new i_File, s_File[128]
  878. get_configsdir(s_File, charsmax(s_File))
  879. format(s_File, charsmax(s_File), "%s/gamemenu.txt", s_File)
  880. i_File = fopen(s_File, "r")
  881. fgets(i_File, g_Text, MAX_SIZE)
  882. fclose(i_File)
  883. }
  884. public JBGlowMenu(id)
  885. {
  886. if(is_user_admin(id)) {
  887. new gmenu = menu_create("\r[\w Extreme Jail \r]\y GLOW Menu", "sub_menu")
  888.  
  889. new players[32], pnum, tempid, szName[32], szTempid[10]
  890. get_players(players, pnum, "a")
  891. for(new i; i<pnum; i++) {
  892. tempid = players[i]
  893.  
  894. if(cs_get_user_team(tempid) != CS_TEAM_T)
  895. continue
  896.  
  897. get_user_name(tempid, szName, 31)
  898. num_to_str(tempid, szTempid, 9)
  899. menu_additem(gmenu, szName, szTempid, 0)
  900. }
  901. menu_display(id, gmenu)
  902. } else
  903. ColorChat(id, "^4Only admin or VIP have access to this command")
  904. }
  905.  
  906. public sub_menu(id, gmenu, item)
  907. {
  908. if(item == MENU_EXIT)
  909. return
  910. new data[6], iName[64]
  911. new _access, callback
  912. menu_item_getinfo(gmenu, item, _access, data,5, iName, 63, callback)
  913.  
  914. new tempid = str_to_num(data)
  915. new szName[32], szName2[32]
  916. get_user_name(id, szName, 31)
  917. get_user_name(tempid, szName2, 31)
  918. fm_set_user_rendering(tempid, kRenderFxGlowShell, random_num(0, 255), random_num(0, 255), random_num(0, 255), kRenderNormal, 255)
  919. set_hudmessage(random_num(0, 255), random_num(0, 255), random_num(0, 255))
  920. show_hudmessage(0, "%s gave glow to %s^n [ Extreme Jail ]", szName, szName2)
  921. ColorChat(0, "^4%s^1 gave glow to^4 %s", szName, szName2)
  922. ColorChat(tempid, " %s^1 have You Glow", szName2)
  923.  
  924. switch(random_num(0,1)) {
  925. case 0: cs_set_user_model(tempid, "vip")
  926. case 1: cs_set_user_model(tempid, "Ex-Woman")
  927. }
  928. }
  929. public ActionChooseteam(id){
  930. new teammenu = menu_create("\r[\w Extreme Jail \r]\y Helper Main Menu", "ActionChooseteam2");
  931. new cb = menu_makecallback("callbackm");
  932.  
  933. menu_additem(teammenu, "\yGlobal Menu",.callback = cb);
  934. menu_additem(teammenu, "\yPrisoner Menu \r[ \dPRISONER ONLY \r]",.callback = cb);
  935. menu_additem(teammenu, "\yGuard Menu \r[ \dGUARD ONLY \r]",.callback = cb);
  936. menu_additem(teammenu, "\yAdmin Menu \r[ \dADMIN ONLY \r]",.callback = cb);
  937.  
  938. menu_setprop(teammenu,MPROP_EXIT,MEXIT_ALL);
  939. menu_display(id, teammenu);
  940. return PLUGIN_HANDLED
  941. }
  942.  
  943. public callbackm(id, teammenu, item){
  944. switch(item)
  945. {
  946. case 1: return (cs_get_user_team(id) == CS_TEAM_T ? ITEM_ENABLED:ITEM_DISABLED);
  947. case 2: return (cs_get_user_team(id) == CS_TEAM_CT ? ITEM_ENABLED:ITEM_DISABLED);
  948. case 3: return (is_user_admin(id) ? ITEM_ENABLED:ITEM_DISABLED);
  949. }
  950.  
  951. return ITEM_ENABLED;
  952. }
  953.  
  954. public ActionChooseteam2(id, teammenu, item){
  955. switch(item)
  956. {
  957. case 0: globalmenu(id);
  958. case 1: tmenu1(id);
  959. case 2: ctmenu1(id);
  960. case 3: adminmenu1(id);
  961. }
  962.  
  963. menu_destroy(teammenu);
  964. }
  965.  
  966. public globalmenu(id){
  967. new needmenu = menu_create("\r[\w Extreme Jail \r]\y Helper Main Menu", "showmenuhelp");
  968. menu_additem(needmenu, "Take A \yPiss");
  969. menu_additem(needmenu, "Take A \yShit");
  970. menu_additem(needmenu, "My Cash");
  971. menu_additem(needmenu, "\rExtreme\y Online");
  972. menu_additem(needmenu, "\rExtreme\y Clubs");
  973. menu_additem(needmenu, "\rMusic Menu");
  974.  
  975. menu_setprop(needmenu,MPROP_EXIT,MEXIT_ALL);
  976. menu_display(id, needmenu);
  977. }
  978.  
  979. public tmenu1(id){
  980. new tmenu = menu_create("\r[\w Extreme Jail \r]\y T Main Menu", "showmenut");
  981. menu_additem(tmenu, "Last Request");
  982. menu_additem(tmenu, "Shop");
  983.  
  984. menu_setprop(tmenu,MPROP_EXIT,MEXIT_ALL);
  985. menu_display(id, tmenu);
  986. }
  987.  
  988. public ctmenu1(id){
  989. new ctmenu = menu_create("\r[\w Extreme Jail \r]\y CT Main Menu", "showmenuct");
  990. menu_additem(ctmenu, "Open Cells");
  991. menu_additem(ctmenu, "Box");
  992. menu_additem(ctmenu, "CountDown");
  993. menu_additem(ctmenu, "Stop CountDown");
  994. menu_additem(ctmenu, "WantTeror");
  995.  
  996. menu_setprop(ctmenu,MPROP_EXIT,MEXIT_ALL);
  997. menu_display(id, ctmenu)
  998. }
  999.  
  1000. public adminmenu1(id){
  1001. new adminmenu = menu_create("\r[\w Extreme Jail \r]\y ADMIN Main Menu", "showmenuadmin");
  1002. menu_additem(adminmenu, "Days");
  1003. menu_additem(adminmenu, "First");
  1004. menu_additem(adminmenu, "Stop First");
  1005. menu_additem(adminmenu, "Crowbar [ FREE ]");
  1006. menu_additem(adminmenu, "Give 500 Cash To Yourself");
  1007. menu_additem(adminmenu, "Take 500 Cash From Yourself");
  1008.  
  1009. menu_setprop(adminmenu,MPROP_EXIT,MEXIT_ALL);
  1010. menu_display(id, adminmenu)
  1011. }
  1012.  
  1013. public showmenuhelp(id, needmenu, item){
  1014. switch(item)
  1015. {
  1016. case 0: client_cmd(id, "piss");
  1017. case 1: client_cmd(id, "shit");
  1018. case 2: client_cmd(id, "say /cash");
  1019. case 3: client_cmd(id, "say /admin");
  1020. case 4: client_cmd(id, "say /server");
  1021. case 5: client_cmd(id, "say /music");
  1022. }
  1023.  
  1024. menu_destroy(needmenu);
  1025. }
  1026.  
  1027. public showmenuct(id, ctmenu, item){
  1028. switch(item)
  1029. {
  1030. case 0: client_cmd(id, "say /open");
  1031. case 1: client_cmd(id, "say /box");
  1032. case 2: client_cmd(id, "say /cd");
  1033. case 3: client_cmd(id, "say /stopcd");
  1034. case 4: client_cmd(id, "say /wantteror");
  1035. }
  1036.  
  1037. menu_destroy(ctmenu);
  1038. }
  1039.  
  1040. public showmenut(id, tmenu, item){
  1041. switch(item)
  1042. {
  1043. case 0: client_cmd(id, "say /lr");
  1044. case 1: client_cmd(id, "say /shop");
  1045. }
  1046.  
  1047. menu_destroy(tmenu);
  1048. }
  1049.  
  1050. public showmenuadmin(id, adminmenu, item){
  1051. switch(item)
  1052. {
  1053. case 0: client_cmd(id, "say /days");
  1054. case 1: client_cmd(id, "say /fw");
  1055. case 2: client_cmd(id, "say /stopfw");
  1056. case 3: client_cmd(id, "say /crowbar");
  1057. case 4:
  1058. {
  1059. playerpoints[id] += 500
  1060. ColorChat(id, "^4You Got \r500 ^4Cash. Your Cash : %d", playerpoints[id])
  1061. }
  1062. case 5:
  1063. {
  1064. playerpoints[id] -= 500
  1065. ColorChat(id, "^4You Lose \r500 ^4Cash. Your Cash : %d", playerpoints[id])
  1066. }
  1067. }
  1068.  
  1069. menu_destroy(adminmenu);
  1070. }
  1071. public ActionDays(id)
  1072. {
  1073. if(get_user_flags(id) & ADMIN_CVAR) {
  1074. g_ShowMenu = menu_create("\r[\w Extreme Jail \r]\y Days Menu", "ShowMenu")
  1075.  
  1076. new szNum[3]
  1077. for (new i = 0 ; i < sizeof MessageDay ; i++) {
  1078. num_to_str(i+1 , szNum , 2)
  1079. menu_additem(g_ShowMenu , MessageDay[i], szNum)
  1080. }
  1081. menu_display(id, g_ShowMenu)
  1082. }
  1083. }
  1084. public mainmenuserv(id)
  1085. {
  1086. new servmenu = menu_create( "\r[ \wExtreme\r ]\y Servers Redirect Menu", "showmenuserv")
  1087. new szNum[3]
  1088. for (new i = 0 ; i < sizeof MessageServ ; i++) {
  1089. num_to_str(i , szNum , 2)
  1090. menu_additem(servmenu , MessageServ[i], szNum)
  1091. }
  1092. menu_setprop(servmenu, MPROP_NUMBER_COLOR, "\y")
  1093. menu_setprop(servmenu, MPROP_EXITNAME, "Exit Menu")
  1094. menu_display(id, servmenu)
  1095. }
  1096.  
  1097. public showmenuserv(id, servmenu, item)
  1098. {
  1099. if(item == MENU_EXIT)
  1100. return
  1101. new szKey[3], iname[33], Dummy
  1102. get_user_name(id, iname, 32)
  1103. menu_item_getinfo(servmenu , item, Dummy, szKey, 2, "", 0, Dummy)
  1104. new key = str_to_num(szKey)
  1105.  
  1106. ColorChat(0, "^4%s^1 has been redirected to ^4%s", iname, MessageServ[key])
  1107. client_cmd(id, "Connect %s", MessageIp[key])
  1108. }
  1109.  
  1110. public cdmenu(id)
  1111. {
  1112. if(!is_user_alive(id))
  1113. ColorChat(id, " You have to be^3 alive^4 to start a^3 countdown")
  1114. else if(task_exists(4444))
  1115. ColorChat(id, " There is already a^3 countdown^4 on")
  1116. else if(get_user_team(id) == 2) {
  1117. new menu = menu_create("\r[\w Exteme \r]\y countdown", "menu_handler")
  1118. new szNum[3], Formatex[15]
  1119. for (new i = 0 ; i < sizeof MessageCDnum ; i++) {
  1120. num_to_str(i+1 , szNum , 2)
  1121. formatex(Formatex, 14, "\y%s \wSeconds", MessageCDnum[i])
  1122. menu_additem(menu , Formatex, szNum)
  1123. }
  1124. menu_display(id, menu)
  1125. } else
  1126. ColorChat(id, "^4Only^3 Counter-terrorists^4 can start a^3 countdown")
  1127. }
  1128.  
  1129. public menu_handler(id, menu, item)
  1130. {
  1131. if(item == MENU_EXIT)
  1132. return
  1133. new Data[7], Name[64]
  1134. new Access, Callback
  1135. menu_item_getinfo(menu, item, Access, Data,5, Name, 63, Callback)
  1136.  
  1137. new Key = str_to_num(Data)
  1138. new name[33]
  1139. get_user_name(id, name, 32)
  1140.  
  1141. ColorChat(0, "Guard^4 %s ^1has started Countdown", name)
  1142. switch(Key) {
  1143. case 1: timer = 5
  1144. case 2: timer = 10
  1145. case 3: timer = 15
  1146. case 4: timer = 20
  1147. case 5: timer = 25
  1148. case 6: timer = 30
  1149. }
  1150. ColorChat(0, "when^3 %d^1 is over save your^4 %s", timer, random_num(0,1) ? "ASS" : "RUN")
  1151. countdown()
  1152. set_task(1.0, "countdown",4444,_,_, "b")
  1153. }
  1154.  
  1155. public countdown()
  1156. {
  1157. new SecVoice[21]
  1158. num_to_word(timer, SecVoice, 20)
  1159. if(timer == 0) {
  1160. set_hudmessage(255, 0, 0, -1.0, -1.0, 0, 6.0, 3.0)
  1161. show_hudmessage(0, "Go go go")
  1162. client_cmd(0, "spk ^"barney/letsgo^"")
  1163. remove_task(4444)
  1164. } else {
  1165. if(timer <= 9)
  1166. client_cmd(0, "spk ^"Extreme-Jail/%s^"", SecVoice)
  1167. else if(random_num(0,1))
  1168. client_cmd(0, "spk ^"vox/%s^"", SecVoice)
  1169. else
  1170. client_cmd(0, "spk ^"fvox/%s^"", SecVoice)
  1171. set_hudmessage(0, 255, 0, -1.0, -1.0, 0, 0.5, 0.5)
  1172. show_hudmessage(0, "%i", timer)
  1173. timer--
  1174. }
  1175. }
  1176. public stopcd(id)
  1177. {
  1178. new name[32]
  1179. get_user_name(id, name, 31)
  1180. if(!task_exists(4444) && cs_get_user_team(id) == CS_TEAM_CT) {
  1181. ColorChat(id, "There Is No CountDown To Stop")
  1182. }
  1183. else if(get_user_team(id) == 2 && task_exists(4444)) {
  1184. set_hudmessage(255, 0, 0, -1.0, -1.0, 0, 6.0, 3.0)
  1185. show_hudmessage(0, "Go go go")
  1186. client_cmd(0, "spk ^"barney/letsgo^"")
  1187. remove_task(4444)
  1188. ColorChat(0, "Guard %s Stop CountDown", name)
  1189. } else {
  1190. ColorChat(id, "Only Ct Can Stop CountDown")
  1191. }
  1192. }
  1193. public fullupdate(id)
  1194. {
  1195. if(floodcounter[id] == 4) {
  1196. new name[33]
  1197. get_user_name(id, name, 32)
  1198. server_cmd("kick ^"%s^" ^"Using spam command^"", name)
  1199. }
  1200. floodcounter[id]++
  1201. }
  1202.  
  1203. public Givec4(id)
  1204. {
  1205. if(is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_CT) {
  1206. if(!user_has_weapon(id, CSW_C4)) {
  1207. fm_give_item(id, "weapon_c4")
  1208. ColorChat(id, "You Have a c4^3, if you SPAM this Command you get ban!")
  1209. }
  1210. }
  1211. }
  1212.  
  1213. public GameDesc() {
  1214. forward_return(FMV_STRING, gamename)
  1215. return FMRES_SUPERCEDE
  1216. }
  1217.  
  1218. public client_PreThink(plr) {
  1219. if(get_cvar_num("bh_enabled")) {
  1220. new oldbuttons = get_user_oldbutton(plr)
  1221. oldbuttons &= ~IN_JUMP
  1222. entity_set_int(plr, EV_INT_oldbuttons, oldbuttons)
  1223. }
  1224. if(get_bit(g_PlayerBH, plr) && get_user_weapon(plr) == CSW_KNIFE && entity_get_int(plr, EV_INT_button) & 2)
  1225. {
  1226. new flags = entity_get_int(plr, EV_INT_flags)
  1227. if(flags & FL_WATERJUMP || entity_get_int(plr, EV_INT_waterlevel) >= 2 || !(flags & FL_ONGROUND))
  1228. return
  1229. flags = entity_get_int(plr, EV_INT_flags)
  1230. new Float:velocity[3]
  1231. entity_get_vector(plr, EV_VEC_velocity, velocity)
  1232. velocity[2] += 250.0
  1233. entity_set_vector(plr, EV_VEC_velocity, velocity)
  1234. entity_set_int(plr, EV_INT_gaitsequence, 6)
  1235. } if(footstep[plr])
  1236. set_pev(plr, pev_flTimeStepSound, 999)
  1237. }
  1238.  
  1239. public DisplayTaskBug(id)
  1240. {
  1241. if(playerpoints[id] <= 5000) formatex(_status[id], 16, "Ex Beginner")
  1242. else if(playerpoints[id] <= 10000) formatex(_status[id], 16, "Ex Novice")
  1243. else if(playerpoints[id] <= 20000) formatex(_status[id], 16, "Ex Distinguished")
  1244. else if(playerpoints[id] <= 30000) formatex(_status[id], 16, "Ex Competent")
  1245. else if(playerpoints[id] <= 40000) formatex(_status[id], 16, "Ex Master")
  1246. else if(playerpoints[id] <= 50000) formatex(_status[id], 16, "Ex Winner")
  1247. else if(playerpoints[id] <= 100000)formatex(_status[id], 16, "Ex Killer")
  1248. else formatex(_status[id], 16, "Ex Millyoner")
  1249. Seconds[id] = 5
  1250. DisplayRulesMenu(id)
  1251. set_task(1.0,"DisplayRulesMenu",id,"",0,"a",4)
  1252.  
  1253. set_dhudmessage(id, 160, 0, -1.0, 0.25, 2, 10.0, 5.0, 0.1, 1.5)
  1254. show_dhudmessage(id, "Welcome To BeatTheB-Jail # JailBreak Server^nPress 'G' To Drop A Cash^n---- Note - New Price on Shop | Your Cash Is: %i -----", playerpoints[id])
  1255. }
  1256.  
  1257. public DisplayRulesMenu(id)
  1258. {
  1259. if(Seconds[id] != 0)
  1260. Seconds[id]--
  1261.  
  1262. new Item[64], StrSeconds[10]
  1263. num_to_str(Seconds[id], StrSeconds, 9)
  1264. new menu = menu_create("\d[קיירבליי'ג יקוח]", "sub_RulesMenu")
  1265.  
  1266. new callback = menu_makecallback("MenuCallbackRules")
  1267.  
  1268. format(Item, 63, "%s[םיקוחה תא רשאמ %s]", Seconds[id] == 0 ? "\r" : "\d", StrSeconds[0] == '0' ? "" : StrSeconds, StrSeconds[0] == '0' ? "" : " Sec ")
  1269. menu_additem(menu, Item, "1", _, callback)
  1270. menu_additem(menu, "\r[םיקוחה תא החוד]^n^n", "2")
  1271. menu_additem(menu, "\yםיקוח", "3")
  1272. menu_additem(menu, "\yתודוקפ", "4")
  1273.  
  1274. menu_setprop(menu, MPROP_EXIT, MEXIT_NEVER)
  1275. menu_display(id, menu)
  1276. }
  1277.  
  1278. public sub_RulesMenu(id, menu, item)
  1279. {
  1280. new Data[7], Name[64], Access, Callback
  1281. menu_item_getinfo(menu, item, Access, Data,5, Name, 63, Callback)
  1282.  
  1283. new Key = str_to_num(Data)
  1284.  
  1285. switch(Key)
  1286. {
  1287. case 1: menu_destroy(menu)
  1288. case 2: set_task(2.0, "KickUser", id)
  1289. case 3: {
  1290. show_motd(id, rules, "[BeatTheB Jail] Rules")
  1291. set_task(5.0,"DisplayRulesMenu",id)
  1292. }
  1293. case 4: {
  1294. show_motd(id, help, "[BeatTheB Jail] Help")
  1295. set_task(5.0,"DisplayRulesMenu",id)
  1296. }
  1297. }
  1298. }
  1299. public MenuCallbackRules(id)
  1300. return Seconds[id] != 0 ? ITEM_DISABLED : ITEM_ENABLED
  1301.  
  1302. public KickUser(id)
  1303. server_cmd("kick #%d ^"!םיקוחה תא רשאל בייח התא^"", get_user_userid(id))
  1304.  
  1305. public unvip(id) {
  1306. if((is_user_admin(id) || get_vip[id]) && cs_get_user_team(id) == CS_TEAM_T && is_user_alive(id))
  1307. cs_reset_user_model(id)
  1308. else
  1309. ColorChat(id, "you are not admin or vip or you are dead")
  1310. }
  1311.  
  1312. public Event_CurWeapon(id)
  1313. {
  1314. if(!is_user_alive(id) || !is_user_connected(id))
  1315. return
  1316.  
  1317. new temp[2], weapon = get_user_weapon(id, temp[0], temp[1])
  1318. if(weapon == CSW_KNIFE)
  1319. {
  1320. if(get_bit(g_PlayerCrowbar, id)) {
  1321. entity_set_string(id, EV_SZ_weaponmodel, "models/p_crowbar.mdl")
  1322. entity_set_string(id, EV_SZ_viewmodel, "models/v_crowbar.mdl")
  1323. }
  1324. else if(get_bit(g_PlayerStunGun, id)) {
  1325. entity_set_string(id, EV_SZ_weaponmodel, "models/Extreme-Jail/p_stungun.mdl")
  1326. entity_set_string(id, EV_SZ_viewmodel, "models/Extreme-Jail/v_stungun.mdl")
  1327. }
  1328. else if(get_bit(g_PlayerDildo, id)) {
  1329. entity_set_string(id, EV_SZ_weaponmodel, "models/Extreme-Jail/p_dildo.mdl")
  1330. entity_set_string(id, EV_SZ_viewmodel, "models/Extreme-Jail/v_dildo.mdl")
  1331. }
  1332. else if(get_bit(g_PlayerBH, id))
  1333. entity_set_string(id, EV_SZ_viewmodel, "models/Extreme-Jail/v_bunnyhop.mdl")
  1334. else if(get_bit(g_PlayerGravity, id)) {
  1335. fm_set_user_gravity(id, 400.0 / 800.0)
  1336. entity_set_string(id, EV_SZ_weaponmodel, "models/Extreme-Jail/p_gravity.mdl")
  1337. entity_set_string(id, EV_SZ_viewmodel, "models/Extreme-Jail/v_gravity.mdl")
  1338. }
  1339. else if(get_bit(g_PlayerSpeed, id)) {
  1340. fm_set_user_maxspeed(id, 450.0)
  1341. entity_set_string(id, EV_SZ_weaponmodel, "models/Extreme-Jail/p_speed.mdl")
  1342. entity_set_string(id, EV_SZ_viewmodel, "models/Extreme-Jail/v_speed.mdl")
  1343. }
  1344. else {
  1345. entity_set_string(id, EV_SZ_weaponmodel, "models/Extreme-Jail/p_bknucklesEx.mdl")
  1346. entity_set_string(id, EV_SZ_viewmodel, "models/Extreme-Jail/v_bknucklesEx-v1.mdl")
  1347. }
  1348. }
  1349. else if(weapon == CSW_SCOUT)
  1350. {
  1351. if(RunAwayDay || get_bit(g_GoldenScout, id)) {
  1352. entity_set_string(id, EV_SZ_weaponmodel, "models/Extreme-Jail/p_Goldenscout.mdl")
  1353. entity_set_string(id, EV_SZ_viewmodel, "models/Extreme-Jail/v_Goldenscout.mdl")
  1354. }
  1355. }
  1356. else if(get_bit(g_PlayerGravity, id))
  1357. fm_set_user_gravity(id, 800.0 / 800.0)
  1358. else if(get_bit(g_PlayerSpeed, id))
  1359. ResetMaxspeed(id)
  1360. }
  1361. public EmitSound(id, channel, sample[])
  1362. {
  1363. if(is_user_alive(id) && is_user_connected(id)) {
  1364. new temp[2], weapon = get_user_weapon(id, temp[0], temp[1])
  1365. if(weapon == CSW_KNIFE)
  1366. {
  1367. if(equal(sample, "weapons/knife_hit", 17)) {
  1368. new pitch
  1369. new Float:volume, Float:volume2
  1370. volume = random_float(0.5, 1.0)
  1371. volume2 = random_float(0.2, 0.3)
  1372.  
  1373. switch(random_num(1,3))
  1374. {
  1375. case 1: pitch = PITCH_NORM
  1376. case 2: pitch = PITCH_LOW
  1377. case 3: pitch = PITCH_HIGH
  1378. }
  1379.  
  1380. if(get_bit(g_PlayerCrowbar, id))
  1381. emit_sound(id, CHAN_WEAPON, "weapons/cbar_hit2.wav", volume2, ATTN_NORM, 0, pitch)
  1382. else if(get_bit(g_PlayerStunGun, id))
  1383. emit_sound(id, CHAN_WEAPON, "Extreme-Jail/stungun/knife_hit1.wav", volume, ATTN_NORM, 0, pitch)
  1384. else if(get_bit(g_PlayerDildo, id)) {
  1385. switch(random_num(1,4))
  1386. {
  1387. case 1: emit_sound(id, CHAN_WEAPON, "Extreme-Jail/dildo/dildo_hit1.wav", volume2, ATTN_NORM, 0, PITCH_NORM)
  1388. case 2: emit_sound(id, CHAN_WEAPON, "Extreme-Jail/dildo/dildo_hit2.wav", volume2, ATTN_NORM, 0, PITCH_NORM)
  1389. case 3: emit_sound(id, CHAN_WEAPON, "Extreme-Jail/dildo/dildo_hit3.wav", volume2, ATTN_NORM, 0, PITCH_NORM)
  1390. case 4: emit_sound(id, CHAN_WEAPON, "Extreme-Jail/dildo/dildo_hit4.wav", volume2, ATTN_NORM, 0, PITCH_NORM)
  1391. }
  1392. } else
  1393. emit_sound(id, CHAN_WEAPON, "weapons/bullet_hit2.wav", volume, ATTN_NORM, 0, pitch)
  1394. return FMRES_SUPERCEDE
  1395. } else if(equal(sample,"weapons/knife_stab.wav")) {
  1396. if(get_bit(g_PlayerDildo, id))
  1397. emit_sound(id, CHAN_WEAPON, "Extreme-Jail/dildo/dildo_hitwall.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1398. else if(get_bit(g_PlayerStunGun, id))
  1399. emit_sound(id, CHAN_WEAPON, "Extreme-Jail/stungun/knife_hitwall.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1400. else
  1401. emit_sound(id, CHAN_WEAPON, "weapons/cbar_hitbod2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1402. return FMRES_SUPERCEDE
  1403. }
  1404. }
  1405. }
  1406. return FMRES_IGNORED
  1407. }
  1408.  
  1409. public FwdSetVoice(receiver, sender, bool:listen)
  1410. {
  1411. if(!(1 <= receiver <= g_max_clients) || !g_connected[receiver] || !(1 <= sender <= g_max_clients) || !g_connected[sender])
  1412. return
  1413. if((get_user_flags(sender) & ADMIN_MENU || get_bit(g_PlayerVoice, sender))
  1414. || (cs_get_user_team(sender) == CS_TEAM_CT && is_user_alive(sender) && !mutect))
  1415. set_speak(sender, 2)
  1416. else set_speak(sender, 1)
  1417. }
  1418.  
  1419. public Firstwrites(id) {
  1420. if(is_user_admin(id)) {
  1421. new name[33]
  1422. get_user_name(id, name, 32)
  1423. set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), -1.0, 0.08, 0, 4.5, 0.5)
  1424. show_hudmessage(0, "The First writes will started in 5 seccond^nby %s", name)
  1425. if(task_exists(4444)) remove_task(4444)
  1426. set_task(5.0, "ActionFirstwrites")
  1427. timer = 5
  1428. ShowFiveSeconds(id)
  1429. set_task(1.0,"ShowFiveSeconds",id,"",0,"a",4)
  1430. } else
  1431. ColorChat(id, "You have no access to that command")
  1432. }
  1433.  
  1434. public ActionFirstwrites() {
  1435. new Item[6], _ran = random_num(1,5)
  1436. switch(random_num(1,4)) {
  1437. case 1: formatex(Item, _ran, "%i%i%i%i%i", random_num(0,9), random_num(0,9), random_num(0,9), random_num(0,9), random_num(0,9))
  1438. case 2: formatex(Item, _ran, "%s%s%s%s%s", random_num(0,1) ? MessageTypeB[random_num(1,26)] : MessageTypeS[random_num(1,26)], random_num(0,1) ? MessageTypeB[random_num(1,26)] : MessageTypeS[random_num(1,26)], random_num(0,1) ? MessageTypeB[random_num(1,26)] : MessageTypeS[random_num(1,26)], random_num(0,1) ? MessageTypeB[random_num(1,26)] : MessageTypeS[random_num(1,26)], random_num(0,1) ? MessageTypeB[random_num(1,26)] : MessageTypeS[random_num(1,26)])
  1439. case 3: formatex(Item, _ran, "%s%s%s%s%s", MessageTypeB[random_num(1,26)], MessageTypeB[random_num(1,26)], MessageTypeB[random_num(1,26)], MessageTypeB[random_num(1,26)], MessageTypeB[random_num(1,26)])
  1440. case 4: formatex(Item, _ran, "%s%s%s%s%s", MessageTypeS[random_num(1,26)], MessageTypeS[random_num(1,26)], MessageTypeS[random_num(1,26)], MessageTypeS[random_num(1,26)], MessageTypeS[random_num(1,26)])
  1441. }
  1442. set_hudmessage(0, 255, 0, -1.0, 0.42, 0, 10.0, 10.0)
  1443. show_hudmessage(0, "The First writes ^" %s ^" moves to CT Team", Item)
  1444. firststart = true
  1445. write = Item
  1446.  
  1447. if(task_exists(1111)) remove_task(1111)
  1448. set_task(20.0, "falsed_firststart", 1111)
  1449. }
  1450.  
  1451. public PlayerHasFirst(id) {
  1452. if(firststart && cs_get_user_team(id) != CS_TEAM_CT) {
  1453. new name[33]
  1454. get_user_name(id, name, 32)
  1455. cs_set_user_team(id, CS_TEAM_CT)
  1456. ExecuteHamB(Ham_CS_RoundRespawn, id)
  1457. client_cmd(0, "spk ^"%s^"", appmusic)
  1458.  
  1459. set_hudmessage(255, 0, 0, -1.0, 0.69, 2, 6.0, 18.0)
  1460. show_hudmessage(0, "^%s write first and moved to CT", name)
  1461. firststart = false
  1462. }
  1463. }
  1464.  
  1465. public falsed_firststart() firststart = false
  1466.  
  1467. public OpenAllDoors(id)
  1468. {
  1469. if(is_user_admin(id) || get_vip[id] || cs_get_user_team(id) == CS_TEAM_CT) {
  1470. new name[32]
  1471. get_user_name(id, name, 31)
  1472. new ent = -1
  1473. while((ent = fm_find_ent_by_class(ent, "func_door")))
  1474. dllfunc(DLLFunc_Use, ent, 0)
  1475. ColorChat(0, "^4%s ^3has Opened the cells", name)
  1476. } else
  1477. ColorChat(id, "You have no access to that command")
  1478. }
  1479.  
  1480. public AutoOpen()
  1481. {
  1482. new ent = -1;
  1483.  
  1484. while( ( ent = fm_find_ent_by_class( ent, "func_button")))
  1485. {
  1486. dllfunc( DLLFunc_Use, ent, 0 );
  1487. }
  1488. //ActionFree()
  1489. }
  1490. public ActionGetMenu(id)
  1491. {
  1492. if(cs_get_user_team(id) == CS_TEAM_CT) {
  1493. new getmenu = menu_create("\r[\w BeatTheB Jail \r]\y Switch Menu", "ActionGet")
  1494.  
  1495. new players[32], pnum, tempid
  1496. new szName[32], szTempid[10]
  1497.  
  1498. get_players(players, pnum)
  1499.  
  1500. for(new i; i<pnum; i++)
  1501. {
  1502. tempid = players[i]
  1503.  
  1504. if(cs_get_user_team(tempid) != CS_TEAM_T)
  1505. continue
  1506.  
  1507. get_user_name(tempid, szName, 31)
  1508. num_to_str(tempid, szTempid, 9)
  1509. menu_additem(getmenu, szName, szTempid)
  1510. }
  1511. menu_display(id, getmenu)
  1512. } else
  1513. ColorChat(id, "Prisinors can't switch with Guards. Only Guards can switch with prisonors")
  1514. }
  1515.  
  1516. public ActionGet(id, getmenu, item)
  1517. {
  1518. if(item == MENU_EXIT)
  1519. return
  1520. new data[6], iName[64]
  1521. new _access, callback
  1522. menu_item_getinfo(getmenu, item, _access, data,5, iName, 63, callback)
  1523.  
  1524. new tempid = str_to_num(data)
  1525. new szName[32], szName2[32]
  1526. get_user_name(id, szName, 31)
  1527. get_user_name(tempid, szName2, 31)
  1528. ColorChat(0, "^4%s ^3switch CT with ^4%s", szName, szName2)
  1529. cs_set_user_team(tempid, CS_TEAM_CT)
  1530. cs_set_user_team(id, CS_TEAM_T)
  1531. if(is_user_alive(id)) {
  1532. user_kill(id)
  1533. ExecuteHamB(Ham_CS_RoundRespawn, tempid)
  1534. }
  1535. }
  1536.  
  1537. public ActionShopMenu(id)
  1538. {
  1539. if(is_user_connected(id)) {
  1540. if(cs_get_user_team(id) == CS_TEAM_T)
  1541. {
  1542. new szShop[200]
  1543.  
  1544. formatex(szShop, charsmax(szShop), "\r[\w BeatTheB Jail \r]\y JailBreak Shop Menu\d ^n\yNote\w - The maximum cash is 1000000. New price!^nYour Cash - %d \r%s", playerpoints[id], _status)
  1545. new shopmenu = menu_create(szShop, "sub_ActionShopMenu")
  1546.  
  1547. menu_additem(shopmenu, "\yHealths Menu", "1")
  1548. menu_additem(shopmenu, "\yWeapons Menu", "2")
  1549. menu_additem(shopmenu, "\yPowers Menu", "3")
  1550. menu_additem(shopmenu, "\yVIP Menu", "4")
  1551. menu_additem(shopmenu, "\yTeleport Menu", "5")
  1552. menu_additem(shopmenu, "\yOther Menu", "6")
  1553. menu_additem(shopmenu, "\rOffer Menu", "7")
  1554. menu_additem(shopmenu, "\rPlayers Cash", "8")
  1555. menu_additem(shopmenu, "Help^n", "9")
  1556. menu_additem(shopmenu, "\yExit Shop", "0")
  1557.  
  1558. menu_setprop(shopmenu, MPROP_NUMBER_COLOR, "\w")
  1559. menu_setprop(shopmenu, MPROP_PERPAGE, 0)
  1560. menu_display(id, shopmenu)
  1561. } else
  1562. ColorChat(id, "Only ^3Terrorist^4 can open the Shop. your cash: ^3%d ^4%s", playerpoints[id], _status)
  1563. }
  1564. return PLUGIN_HANDLED
  1565. }
  1566. public sub_ActionShopMenu(id, shopmenu, item)
  1567. {
  1568. new shopname[33]
  1569. get_user_name(id, shopname, 31)
  1570. new Data[7], Name[64], Access, Callback
  1571. menu_item_getinfo(shopmenu, item, Access, Data,5, Name, 63, Callback)
  1572.  
  1573. new Key = str_to_num(Data)
  1574.  
  1575. switch(Key)
  1576. {
  1577. case 1:
  1578. {
  1579. new szHShop[200]
  1580.  
  1581. formatex(szHShop, charsmax(szHShop), "\r[\w BeatTheB Jail \r]\y JailBreak Shop Menu\d ^n\yHealth Menu^nYour Cash - %d \r%s", playerpoints[id], _status)
  1582. new shophmenu = menu_create(szHShop, "sub_ActionHealthMenu")
  1583.  
  1584. menu_additem(shophmenu, "\y10 Health \r[\w 500 \r]", "1")
  1585. menu_additem(shophmenu, "\y20 Health \r[\w 900 \r]", "2")
  1586. menu_additem(shophmenu, "\y30 Health \r[\w 1300 \r]", "3")
  1587. menu_additem(shophmenu, "\y40 Health \r[\w 1700 \r]", "4")
  1588. menu_additem(shophmenu, "\y50 Health \r[\w 2000 \r]", "5")
  1589.  
  1590. menu_setprop(shophmenu, MPROP_EXITNAME, "\yExit Shop")
  1591. menu_setprop(shophmenu, MPROP_NUMBER_COLOR, "\w")
  1592. menu_display(id, shophmenu)
  1593. }
  1594. case 2:
  1595. {
  1596. new szWShop[200]
  1597.  
  1598. formatex(szWShop, charsmax(szWShop), "\r[\w BeatTheB Jail \r]\y JailBreak Shop Menu\d ^n\yWeapons Menu^nYour Cash - %d \r%s", playerpoints[id], _status)
  1599. new shopwmenu = menu_create(szWShop, "sub_ActionWeaponsMenu")
  1600.  
  1601. menu_additem(shopwmenu, "\yGlock\d 3 Bullets \r[\w 1500 \r]", "1")
  1602. menu_additem(shopwmenu, "\yUsp\d 3 Bullets \r[\w 2000 \r]", "2")
  1603. menu_additem(shopwmenu, "\yDeagle\d 2 Bullets \r[\w 2500 \r]", "3")
  1604. menu_additem(shopwmenu, "\yAwp\d 1 Bullets \r[\w 3500 \r]", "4")
  1605.  
  1606. menu_setprop(shopwmenu, MPROP_EXITNAME, "\yExit Shop")
  1607. menu_setprop(shopwmenu, MPROP_NUMBER_COLOR, "\w")
  1608. menu_display(id, shopwmenu)
  1609. }
  1610. case 3:
  1611. {
  1612. new szPShop[200]
  1613.  
  1614. formatex(szPShop, charsmax(szPShop), "\r[\w BeatTheB Jail \r]\y JailBreak Shop Menu\d ^n\yPower Menu^nYour Cash - %d \r%s", playerpoints[id], _status)
  1615. new shoppmenu = menu_create(szPShop, "sub_ActionPowerMenu")
  1616.  
  1617. menu_additem(shoppmenu, "\yCamouflage\d - 30 Seconds \r[\w 2000 \r]", "1")
  1618. menu_additem(shoppmenu, "\ySpeed\d - 20 Seconds \r[\w 1500 \r]", "2")
  1619. menu_additem(shoppmenu, "\yGravity\d - 20 Seconds \r[\w 1500 \r]", "3")
  1620. menu_additem(shoppmenu, "\yStealth\d - 5 Seconds \r[\w 1500 \r]", "4")
  1621. menu_additem(shoppmenu, "\yGodmode\d - 10 Seconds \r[\w 4000 \r]", "5")
  1622. menu_additem(shoppmenu, "\yNoclip\d - 10 Seconds \r[\w 4500 \r]", "6")
  1623.  
  1624. menu_setprop(shoppmenu, MPROP_EXITNAME, "\yExit Shop")
  1625. menu_setprop(shoppmenu, MPROP_NUMBER_COLOR, "\w")
  1626. menu_display(id, shoppmenu)
  1627. }
  1628. case 4:
  1629. {
  1630. new szVShop[200]
  1631.  
  1632. formatex(szVShop, charsmax(szVShop), "\r[\w BeatTheB Jail \r]\y JailBreak Shop Menu\d ^n\yVIP Menu^nYour Cash - %d \r%s", playerpoints[id], _status)
  1633. new shopvmenu = menu_create(szVShop, "sub_ActionVIPMenu")
  1634.  
  1635. menu_additem(shopvmenu, "\yDeagle\d - 2 Bullet \r[\w 2000 \r]", "1")
  1636. menu_additem(shopvmenu, "\yAwp\d - 1 Bullet \r[\w 2500 \r]", "2")
  1637. menu_additem(shopvmenu, "\yGodmode\d - 10 Seconds \r[\w 3500 \r]", "3")
  1638. menu_additem(shopvmenu, "\yCamouflage\d - 30 Seconds \r[\w 1500\r]", "4")
  1639. menu_additem(shopvmenu, "\yStealth\d - 5 Seconds \r[\w 1500 \r]", "5")
  1640. menu_additem(shopvmenu, "\yVoice\d - 1 Round \r[\w 2000 \r]", "6")
  1641.  
  1642. menu_setprop(shopvmenu, MPROP_EXITNAME, "\yExit Shop")
  1643. menu_setprop(shopvmenu, MPROP_NUMBER_COLOR, "\w")
  1644. menu_display(id, shopvmenu)
  1645. }
  1646. case 5:
  1647. {
  1648. new szTeleportShop[200]
  1649.  
  1650. formatex(szTeleportShop, charsmax(szTeleportShop), "\r[\w BeatTheB Jail \r]\y JailBreak Shop Menu\d ^n\yTeleport Menu^nYour Cash - %d \r%s", playerpoints[id], _status)
  1651. new shopteleportmenu = menu_create(szTeleportShop, "sub_ActionTeleportMenu")
  1652.  
  1653. menu_additem(shopteleportmenu, "\yKZ TOP \r[\w 5000 \r]", "1")
  1654. menu_additem(shopteleportmenu, "\rGuns Room \r[\w 8000 \r]", "2")
  1655. menu_additem(shopteleportmenu, "\yFootball\r[\w 4000 \r]", "3")
  1656.  
  1657. menu_setprop(shopteleportmenu, MPROP_EXITNAME, "\yExit Shop")
  1658. menu_setprop(shopteleportmenu, MPROP_NUMBER_COLOR, "\w")
  1659. menu_display(id, shopteleportmenu)
  1660. }
  1661. case 6:
  1662. {
  1663. new szOShop[200]
  1664.  
  1665. formatex(szOShop, charsmax(szOShop), "\r[\w BeatTheB Jail \r]\y JailBreak Shop Menu\d ^n\yOther Menu^nYour Cash - %d \r%s", playerpoints[id], _status)
  1666. new shopomenu = menu_create(szOShop, "sub_ActionOtherMenu")
  1667.  
  1668. menu_additem(shopomenu, "\yChange Team \r[\w 15000 \r]", "1")
  1669. menu_additem(shopomenu, "\yVIP Model\d Once Round \r[\w 500 \r]", "2")
  1670. menu_additem(shopomenu, "\yAdmin Model\d Once Round \r[\w 1000 \r]", "3")
  1671. menu_additem(shopomenu, "\yFreeday\d Once Round \r[\w 3000 \r]", "4")
  1672.  
  1673. menu_setprop(shopomenu, MPROP_EXITNAME, "\yExit Shop")
  1674. menu_setprop(shopomenu, MPROP_NUMBER_COLOR, "\w")
  1675. menu_display(id, shopomenu)
  1676. }
  1677. case 7:
  1678. {
  1679. new szOfferShop[200]
  1680.  
  1681. formatex(szOfferShop, charsmax(szOfferShop), "\r[\w BeatTheB Jail \r]\y JailBreak Shop Menu\d ^n\yOffer Menu^nYour Cash - %d \r%s", playerpoints[id], _status)
  1682. new shopoffermenu = menu_create(szOfferShop, "sub_ActionOfferMenu")
  1683.  
  1684. menu_additem(shopoffermenu, "\ySmall Pack \r[\w 7500 \r]", "1")
  1685. menu_additem(shopoffermenu, "\yNormall Pack \r[\w 15000 \r]", "2")
  1686. menu_additem(shopoffermenu, "\yBig Pack \r[\w 22500 \r]", "3")
  1687. menu_additem(shopoffermenu, "\rGiant Pack \r[\w 30000 \r]", "4")
  1688.  
  1689. menu_setprop(shopoffermenu, MPROP_EXITNAME, "\yExit Shop")
  1690. menu_setprop(shopoffermenu, MPROP_NUMBER_COLOR, "\w")
  1691. menu_display(id, shopoffermenu)
  1692. }
  1693. case 8: PlayerPointsMenu(id)
  1694. case 9:
  1695. {
  1696. new motd[3500]
  1697. add(motd, 3499, "<html><head><title>JailBreak Shop</title>^n<style type=^"text/css^">^npre { font-family:Verdana,Tahoma; color:#FFB000; }^nbody { background:#000000; margin-left:8px; margin-top:0px; }^n</style></head>^n<body scroll=^"none^">^n<pre>^n^n")
  1698. add(motd, 3499, "<b><center>^nJailBreak Shop [Version: 1.0]^n(Help Motd)^nby BeatTheB-Jail</center></b>^n<hr>^nInfo:^n(For Terrorist)^nKill CT - 300 Cash^nKill CT On HeadShot - 600 Cash^n(For Counter Terrorist)^nSurviving - 500 Cash^n")
  1699. add(motd, 3499, "Suicide - 2^n^nWhat's new (in version 0.6):^nYou get a few cash I received a registered Chat and why^nGrenade Menu: All Grenades option^nVIP Menu: Fixed voice option^nKnife Power: 3 options^n^n")
  1700. add(motd, 3499, "(in version 0.7):^nFixed Godmode option^n^n(in version 0.8):^nAdded SilentWalk (Other Menu)^nNew Scriptings^n^n^nComming Soon:^nMore Options (Weapons / Powers)^nAdd Effects^nMore Sounds^n^nCommands To open The Shop Menu:^nZ - radio1^nX - radio2^nC - radio3^nOn Chat (say and say_team):^nshop , /shop, !shop - open Shop Menu^n")
  1701. add(motd, 3499, "/cash, /cash - Message : My Cash^n^n^nPlease Report on My Skype All Bugs Or have of ideas- barel123133 <hr>^n")
  1702. show_motd(id, motd)
  1703. ActionShopMenu(id)
  1704. }
  1705. case 0: menu_destroy(shopmenu)
  1706. }
  1707. }
  1708.  
  1709. public sub_ActionGrenadesMenu(id, shophmenu, item)
  1710. {
  1711. if(item == MENU_EXIT || !is_user_alive(id))
  1712. {
  1713. ActionShopMenu(id)
  1714. return
  1715. }
  1716. new shopname[33]
  1717. get_user_name(id, shopname, 31)
  1718. new Data[7], Name[64], Access, Callback
  1719. menu_item_getinfo(shophmenu, item, Access, Data,5, Name, 63, Callback)
  1720.  
  1721. new Key = str_to_num(Data)
  1722.  
  1723. switch (Key)
  1724. {
  1725. case 1:
  1726. {
  1727. if(playerpoints[id] < 500) {
  1728. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1729. ColorChat(id, "^1You need more^4 %d Cash^1 for this!", playerpoints[id] - 500)
  1730. } else {
  1731. fm_give_item(id, "weapon_smokegrenade")
  1732.  
  1733. ColorChat(0, "^4%s ^1Buy ^3^"Smoke Grenade^"", shopname)
  1734. playerpoints[id] -= 500
  1735. }
  1736. }
  1737. case 2:
  1738. {
  1739. if(playerpoints[id] < 1000) {
  1740. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1741. ColorChat(id, "^1You need more^4 %d Cash^1 for this!", playerpoints[id] - 1000)
  1742. } else {
  1743. fm_give_item(id, "weapon_flashbang")
  1744.  
  1745. ColorChat(0, "^4%s ^1Buy ^3^"Flash Grenade^"", shopname)
  1746. playerpoints[id] -= 1000
  1747. }
  1748. }
  1749. case 3:
  1750. {
  1751. if(playerpoints[id] < 1500) {
  1752. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1753. ColorChat(id, "^1You need more^4 %d Cash^1 for this!", playerpoints[id] - 1500)
  1754. } else {
  1755. fm_give_item(id, "weapon_hegrenade")
  1756.  
  1757. ColorChat(0, "^4%s ^1Buy ^3^"HE Grenade^"", shopname)
  1758. playerpoints[id] -= 1500
  1759. }
  1760. }
  1761. case 4:
  1762. {
  1763. if(playerpoints[id] < 20) {
  1764. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1765. ColorChat(id, "^1You need more^4 %d Cash^1 for this!", playerpoints[id] - 20)
  1766. } else {
  1767. fm_give_item(id, "weapon_hegrenade")
  1768. fm_give_item(id, "weapon_flashbang")
  1769. fm_give_item(id, "weapon_smokegrenade")
  1770.  
  1771. ColorChat(0, "^4%s ^1Buy ^3^"All Grenades^"", shopname)
  1772. playerpoints[id] -= 2000
  1773. }
  1774. }
  1775. }
  1776. ActionShopMenu(id)
  1777. }
  1778.  
  1779. public sub_ActionHealthMenu(id, shophmenu, item)
  1780. {
  1781. if(item == MENU_EXIT || !is_user_alive(id))
  1782. {
  1783. ActionShopMenu(id)
  1784. return
  1785. }
  1786. new shopname[33]
  1787. get_user_name(id, shopname, 31)
  1788. new Data[7], Name[64], Access, Callback
  1789. menu_item_getinfo(shophmenu, item, Access, Data,5, Name, 63, Callback)
  1790.  
  1791. new Key = str_to_num(Data)
  1792.  
  1793. switch (Key)
  1794. {
  1795. case 1:
  1796. {
  1797. if(playerpoints[id] < 500) {
  1798. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1799. ColorChat(id, "^1You need more^4 %d Cash^1 for this!", playerpoints[id] - 500)
  1800. } else {
  1801. fm_set_user_health(id, get_user_health(id) + 10)
  1802.  
  1803. ColorChat(0, "^4%s ^1Buy ^3^"10 Health^"", shopname)
  1804. emit_sound(id, CHAN_ITEM, "items/medshot4.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1805. playerpoints[id] -= 500
  1806. }
  1807. }
  1808. case 2:
  1809. {
  1810. if(playerpoints[id] < 900) {
  1811. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1812. ColorChat(id, "^1You need more^4 %d Cash^1 for this!", playerpoints[id] - 900)
  1813. } else {
  1814. fm_set_user_health(id, get_user_health(id) + 20)
  1815.  
  1816. ColorChat(0, "^4%s ^1Buy ^3^"20 Health^"", shopname)
  1817. emit_sound(id, CHAN_ITEM, "items/medshot4.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1818. playerpoints[id] -= 900
  1819. }
  1820. }
  1821. case 3:
  1822. {
  1823. if(playerpoints[id] < 1300) {
  1824. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1825. ColorChat(id, "^1You need more^4 %d Cash^1 for this!", playerpoints[id] - 1300)
  1826. } else {
  1827. fm_set_user_health(id, get_user_health(id) + 30)
  1828.  
  1829. ColorChat(0, "^4%s ^1Buy ^3^"30 Health^"", shopname)
  1830. emit_sound(id, CHAN_ITEM, "items/medshot4.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1831. playerpoints[id] -= 1300
  1832. }
  1833. }
  1834. case 4:
  1835. {
  1836. if(playerpoints[id] < 1700) {
  1837. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1838. ColorChat(id, "^1You need more^4 %d Cash^1 for this!", playerpoints[id] - 1700)
  1839. } else {
  1840. fm_set_user_health(id, get_user_health(id) + 40)
  1841.  
  1842. ColorChat(0, "^4%s ^1Buy ^3^"40 Health^"", shopname)
  1843. emit_sound(id, CHAN_ITEM, "items/medshot4.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1844. playerpoints[id] -= 1700
  1845. }
  1846. }
  1847. case 5:
  1848. {
  1849. if(playerpoints[id] < 2000) {
  1850. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1851. ColorChat(id, "^1You need more^4 %d Cash^1 for this!", playerpoints[id] - 2000)
  1852. } else {
  1853. fm_set_user_health(id, get_user_health(id) + 50)
  1854.  
  1855. ColorChat(0, "^4%s ^1Buy ^3^"50 Health^"", shopname)
  1856. emit_sound(id, CHAN_ITEM, "items/medshot4.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1857. playerpoints[id] -= 2000
  1858. }
  1859. }
  1860. }
  1861. ActionShopMenu(id)
  1862. }
  1863.  
  1864. public sub_ActionWeaponsMenu(id, shopwmenu, item)
  1865. {
  1866. if(item == MENU_EXIT || !is_user_alive(id))
  1867. {
  1868. ActionShopMenu(id)
  1869. return
  1870. }
  1871. new Data[7], Name[64], Access, Callback
  1872. menu_item_getinfo(shopwmenu, item, Access, Data,5, Name, 63, Callback)
  1873.  
  1874. new Key = str_to_num(Data)
  1875.  
  1876. switch (Key)
  1877. {
  1878. case 1:
  1879. {
  1880. if(playerpoints[id] < 1500) {
  1881. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1882. ColorChat(id, "^1You need more^4 %d Cash^1 for this!", playerpoints[id] - 1500)
  1883. } else {
  1884. if(user_has_weapon(id, CSW_GLOCK18))
  1885. return
  1886. fm_give_item(id, "weapon_glock18")
  1887. cs_set_weapon_ammo(find_ent_by_owner(1, "weapon_glock18", id), 3)
  1888.  
  1889. ColorChat(id, "^1You ar Buy ^3^"Glock^"")
  1890. emit_sound(id, CHAN_ITEM, "items/gunpickup2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1891. playerpoints[id] -= 1500
  1892. }
  1893. }
  1894. case 2:
  1895. {
  1896. if(playerpoints[id] < 2000) {
  1897. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1898. ColorChat(id, "^1You need more^4 %d Cash^1 for this!", playerpoints[id] - 2000)
  1899. } else {
  1900. if(user_has_weapon(id, CSW_USP))
  1901. return
  1902. fm_give_item(id, "weapon_usp")
  1903. cs_set_weapon_ammo(find_ent_by_owner(1, "weapon_usp", id), 3)
  1904.  
  1905. ColorChat(id, "You ar Buy ^3^"Usp^"")
  1906. emit_sound(id, CHAN_ITEM, "items/gunpickup2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1907. playerpoints[id] -= 2000
  1908. }
  1909. }
  1910. case 3:
  1911. {
  1912. if(playerpoints[id] < 2500) {
  1913. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1914. ColorChat(id, "^1You need more^4 %d Cash^1 for this!", playerpoints[id] - 2500)
  1915. } else {
  1916. if(user_has_weapon(id, CSW_DEAGLE))
  1917. return
  1918. fm_give_item(id, "weapon_deagle")
  1919. cs_set_weapon_ammo(find_ent_by_owner(1, "weapon_deagle", id), 1)
  1920.  
  1921. ColorChat(id, "You ar Buy ^3^"Deagle^"")
  1922. emit_sound(id, CHAN_ITEM, "items/gunpickup2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1923. playerpoints[id] -= 2500
  1924. }
  1925. }
  1926. case 4:
  1927. {
  1928. if(playerpoints[id] < 3500) {
  1929. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1930. ColorChat(id, "^1You need more^4 %d Cash^1 for this!", playerpoints[id] - 35)
  1931. } else {
  1932. if(user_has_weapon(id, CSW_AWP))
  1933. return
  1934. fm_give_item(id, "weapon_awp")
  1935. cs_set_weapon_ammo(find_ent_by_owner(1, "weapon_awp", id), 1)
  1936.  
  1937. ColorChat(id, "You ar Buy ^3^"Awp^"")
  1938. emit_sound(id, CHAN_ITEM, "items/gunpickup2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1939. playerpoints[id] -= 3500
  1940. }
  1941. }
  1942. }
  1943. ActionShopMenu(id)
  1944. }
  1945.  
  1946. public sub_ActionPowerMenu(id, shoppmenu, item)
  1947. {
  1948. if(item == MENU_EXIT || !is_user_alive(id))
  1949. {
  1950. ActionShopMenu(id)
  1951. return
  1952. }
  1953. new shopname[33]
  1954. get_user_name(id, shopname, 31)
  1955. new Data[7], Name[64], Access, Callback
  1956. menu_item_getinfo(shoppmenu, item, Access, Data,5, Name, 63, Callback)
  1957.  
  1958. new Key = str_to_num(Data)
  1959.  
  1960. switch (Key)
  1961. {
  1962. case 1:
  1963. {
  1964. if(playerpoints[id] < 2000) {
  1965. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1966. ColorChat(id, "^1You need more^4 %d Cash^1 for this!", playerpoints[id] - 2000)
  1967. } else {
  1968. cs_set_user_model(id, "Ex-Guard")
  1969. set_task(20.0, "RemoveCam", id)
  1970.  
  1971. ColorChat(0, "^4%s ^1Buy ^3^"Camouflage^" ^1From 20 Seconds", shopname)
  1972. playerpoints[id] -= 2000
  1973. }
  1974. }
  1975. case 2:
  1976. {
  1977. if(playerpoints[id] < 1500) {
  1978. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1979. ColorChat(id, "^1You need more^4 %d Cash^1 for this!", playerpoints[id] - 1500)
  1980. } else {
  1981. entity_set_float(id, EV_FL_maxspeed, 400.0)
  1982. set_task(20.0, "RemoveSpeed", id)
  1983.  
  1984. ColorChat(0, "^4%s ^1Buy ^3^"Speed^" ^1From 20 Seconds", shopname)
  1985. playerpoints[id] -= 1500
  1986. }
  1987. }
  1988. case 3:
  1989. {
  1990. if(playerpoints[id] < 1500) {
  1991. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1992. ColorChat(id, "^1You need more^4 %d Cash^1 for this!", playerpoints[id] - 1500)
  1993. } else {
  1994. entity_set_float(id, EV_FL_gravity, 500.0 / 800.0)
  1995. set_task(20.0, "RemoveGravity", id)
  1996.  
  1997. ColorChat(0, "^4%s ^1Buy ^3^"Gravity^" ^1From 15 Seconds", shopname)
  1998. playerpoints[id] -= 1500
  1999. }
  2000. }
  2001. case 4:
  2002. {
  2003. if(playerpoints[id] < 1500) {
  2004. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  2005. ColorChat(id, "^1You need more^4 %d Cash^1 for this!", playerpoints[id] - 1500)
  2006. } else {
  2007. fm_set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 0)
  2008. set_task(4.0, "RemoveStealth", id)
  2009.  
  2010. ColorChat(0, "^4%s ^1Buy ^3^"Stealth^" ^1From 20 Seconds", shopname)
  2011. playerpoints[id] -= 1500
  2012. }
  2013. }
  2014. case 5:
  2015. {
  2016. if(playerpoints[id] < 4000) {
  2017. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  2018. ColorChat(id, "^1You need more^4 %d Cash^1 for this!", playerpoints[id] - 4000)
  2019. } else {
  2020. fm_set_user_godmode(id, 1)
  2021. set_task(10.0, "RemoveGodmode", id)
  2022.  
  2023. ColorChat(id, "^4VIP: %s ^1Buy ^3^"Godmode 10 Seconds^"", shopname)
  2024. emit_sound(0, CHAN_ITEM, "items/gunpickup2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  2025. playerpoints[id] -= 4000
  2026. }
  2027. }
  2028. case 6:
  2029. {
  2030. if(playerpoints[id] < 4500) {
  2031. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  2032. ColorChat(id, "^1You need more^4 %d Cash^1 for this!", playerpoints[id] - 4500)
  2033. } else {
  2034. fm_set_user_noclip(id, 1)
  2035. set_task(10.0, "RemoveNoclip", id)
  2036.  
  2037. ColorChat(id, "^4VIP: %s ^1Buy ^3^"Noclip 10 Seconds^"", shopname)
  2038. emit_sound(0, CHAN_ITEM, "items/gunpickup2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  2039. playerpoints[id] -= 4500
  2040. }
  2041. }
  2042. }
  2043. ActionShopMenu(id)
  2044. }
  2045.  
  2046. public sub_ActionVIPMenu(id, shopvmenu, item)
  2047. {
  2048. if(item == MENU_EXIT || !is_user_alive(id))
  2049. {
  2050. ActionShopMenu(id)
  2051. return
  2052. }
  2053. else if(get_vip[id] || is_user_admin(id))
  2054. {
  2055. new shopname[33]
  2056. get_user_name(id, shopname, 31)
  2057. new Data[7], Name[64], Access, Callback
  2058. menu_item_getinfo(shopvmenu, item, Access, Data,5, Name, 63, Callback)
  2059.  
  2060. new Key = str_to_num(Data)
  2061.  
  2062. switch (Key)
  2063. {
  2064. case 1:
  2065. {
  2066. if(playerpoints[id] < 2000) {
  2067. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  2068. ColorChat(id, "^1You need more^4 %d Cash^1 for this!", playerpoints[id] - 2000)
  2069. } else {
  2070. if(user_has_weapon(id, CSW_DEAGLE))
  2071. return
  2072. fm_give_item(id, "weapon_deagle")
  2073. cs_set_weapon_ammo(find_ent_by_owner(1, "weapon_deagle", id), 2)
  2074.  
  2075. ColorChat(id, "^4VIP: ^1You ar Buy ^3^"Deagle 2 Bullet^"")
  2076. emit_sound(id, CHAN_ITEM, "items/gunpickup2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  2077. playerpoints[id] -= 2000
  2078. }
  2079. }
  2080. case 2:
  2081. {
  2082. if(playerpoints[id] < 2500) {
  2083. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  2084. ColorChat(id, "^1You need more^4 %d Cash^1 for this!", playerpoints[id] - 2500)
  2085. } else {
  2086. if(user_has_weapon(id, CSW_AWP))
  2087. return
  2088. fm_give_item(id, "weapon_awp")
  2089. cs_set_weapon_ammo(find_ent_by_owner(1, "weapon_awp", id), 1)
  2090.  
  2091. ColorChat(id, "^4VIP: ^1You ar Buy ^3^"Awp 1 Bullet^"")
  2092. emit_sound(id, CHAN_ITEM, "items/gunpickup2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  2093. playerpoints[id] -= 2500
  2094. }
  2095. }
  2096. case 3:
  2097. {
  2098. if(playerpoints[id] < 3500) {
  2099. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  2100. ColorChat(id, "^1You need more^4 %d Cash^1 for this!", playerpoints[id] - 3500)
  2101. } else {
  2102. fm_set_user_godmode(id, 1)
  2103. set_task(10.0, "RemoveGodmode", id)
  2104. ColorChat(id, "^4VIP: %s ^1Buy ^3^"Godmode 20 Seconds^"", shopname)
  2105. emit_sound(0, CHAN_ITEM, "items/gunpickup2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  2106. playerpoints[id] -= 3500
  2107. }
  2108. }
  2109. case 4:
  2110. {
  2111. if(playerpoints[id] < 1500) {
  2112. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  2113. ColorChat(id, "^1You need more^4 %d Cash^1 for this!", playerpoints[id] - 1500)
  2114. } else {
  2115. cs_set_user_model(id, "Ex-Guard")
  2116. set_task(30.0, "RemoveCam", id)
  2117.  
  2118. ColorChat(0, "^4VIP: %s ^1Buy ^3^"Camouflage^" ^1From 30 Seconds", shopname)
  2119. playerpoints[id] -= 1500
  2120. }
  2121. }
  2122. case 5:
  2123. {
  2124. if(playerpoints[id] < 1500) {
  2125. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  2126. ColorChat(id, "^1You need more^4 %d Cash^1 for this!", playerpoints[id] - 15)
  2127. } else {
  2128. fm_set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 0)
  2129. set_task(5.0, "RemoveStealth", id)
  2130.  
  2131. ColorChat(0, "^4VIP: %s ^1Buy ^3^"Stealth^" ^1From 5 Seconds", shopname)
  2132. playerpoints[id] -= 1500
  2133. }
  2134. }
  2135. case 6:
  2136. {
  2137. if(playerpoints[id] < 2000) {
  2138. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  2139. ColorChat(id, "^1You need more^4 %d Cash^1 for this!", playerpoints[id] - 20)
  2140. } else {
  2141. set_bit(g_PlayerVoice, id)
  2142.  
  2143. ColorChat(0, "^4VIP: %s ^1Buy ^3^"Voice^" ^1From 1 Round", shopname)
  2144. playerpoints[id] -= 2000
  2145. }
  2146. }
  2147. }
  2148. }
  2149. else
  2150. ColorChat(id, "^4You have no access to this")
  2151. ActionShopMenu(id)
  2152. }
  2153.  
  2154. public sub_ActionTeleportMenu(id, shopteleportmenu, item)
  2155. {
  2156. if(item == MENU_EXIT || !is_user_alive(id))
  2157. {
  2158. ActionShopMenu(id)
  2159. return
  2160. }
  2161. new shopname[33]
  2162. get_user_name(id, shopname, 31)
  2163. new Data[7], Name[64], Access, Callback
  2164. menu_item_getinfo(shopteleportmenu, item, Access, Data,5, Name, 63, Callback)
  2165.  
  2166. new Key = str_to_num(Data)
  2167.  
  2168. switch(Key)
  2169. {
  2170. case 1:
  2171. {
  2172. if(playerpoints[id] < 5000) {
  2173. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  2174. ColorChat(id, "^1You need more^4 %d Cash^1 for this!", playerpoints[id] - 5000)
  2175. } else {
  2176. new mapname[33]
  2177. get_mapname(mapname, charsmax(mapname))
  2178.  
  2179. if(equal(mapname, "jail_xmf")) {
  2180. new origin[3] = {1468, -91, 428}
  2181. set_user_origin(id, origin)
  2182. ColorChat(0, "^4%s ^1Buy ^3^"KZ TOP Teleport^"", shopname)
  2183. playerpoints[id] -= 5000
  2184. }
  2185. else if(equal(mapname, "jail_pyramid")) {
  2186. new origin[3] = {-1859, -1632, 397}
  2187. set_user_origin(id, origin)
  2188. ColorChat(0, "^4%s ^1Buy ^3^"KZ TOP Teleport^"", shopname)
  2189. playerpoints[id] -= 5000
  2190. } else
  2191. return;
  2192. }
  2193. }
  2194. case 2:
  2195. {
  2196. if(playerpoints[id] < 8000) {
  2197. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  2198. ColorChat(id, "^1You need more^4 %d Cash^1 for this!", playerpoints[id] - 8000)
  2199. } else {
  2200. new mapname[33]
  2201. get_mapname(mapname, charsmax(mapname))
  2202.  
  2203. if(equal(mapname, "jail_xmf")) {
  2204. new origin[3] = {473, 47, 52}
  2205. set_user_origin(id, origin)
  2206. ColorChat(0, "^4%s ^1Buy ^3^"Guns Room Teleport^"", shopname)
  2207. playerpoints[id] -= 5000
  2208. }
  2209. else if(equal(mapname, "jail_pyramid")) {
  2210. new origin[3] = {1089, -1249, 135}
  2211. set_user_origin(id, origin)
  2212. ColorChat(0, "^4%s ^1Buy ^3^"Guns Room Teleport^"", shopname)
  2213. playerpoints[id] -= 5000
  2214. } else
  2215. return;
  2216. }
  2217. }
  2218. case 3:
  2219. {
  2220. if(playerpoints[id] < 4000) {
  2221. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  2222. ColorChat(id, "^1You need more^4 %d Cash^1 for this!", playerpoints[id] - 4000)
  2223. } else {
  2224. new mapname[33]
  2225. get_mapname(mapname, charsmax(mapname))
  2226.  
  2227. if(equal(mapname, "jail_xmf")) {
  2228. new origin[3] = {-614, 280, 164}
  2229. set_user_origin(id, origin)
  2230. ColorChat(0, "^4%s ^1Buy ^3^"Football Teleport^"", shopname)
  2231. playerpoints[id] -= 4000
  2232. }
  2233. else if(equal(mapname, "jail_pyramid")) {
  2234. new origin[3] = {-1576, 379, -151}
  2235. set_user_origin(id, origin)
  2236. ColorChat(0, "^4%s ^1Buy ^3^"Football Teleport^"", shopname)
  2237. playerpoints[id] -= 5000
  2238. } else
  2239. return;
  2240. }
  2241. }
  2242. }
  2243. ActionShopMenu(id)
  2244. }
  2245. public sub_ActionOtherMenu(id, shopomenu, item)
  2246. {
  2247. if(item == MENU_EXIT || !is_user_alive(id))
  2248. {
  2249. ActionShopMenu(id)
  2250. return
  2251. }
  2252. new shopname[33]
  2253. get_user_name(id, shopname, 31)
  2254. new Data[7], Name[64], Access, Callback
  2255. menu_item_getinfo(shopomenu, item, Access, Data,5, Name, 63, Callback)
  2256.  
  2257. new Key = str_to_num(Data)
  2258.  
  2259. switch (Key)
  2260. {
  2261. case 1:
  2262. {
  2263. if(playerpoints[id] < 15000) {
  2264. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  2265. ColorChat(id, "^1You need more^4 %d Cash^1 for this!", playerpoints[id] - 15000)
  2266. } else {
  2267. count = 0
  2268.  
  2269. for(user = 1 ; user <= g_max_clients ; user++)
  2270. if(get_user_flags(user) & ADMIN_CVAR)
  2271. count++
  2272. if(count == 0) {
  2273. cs_set_user_team(id, CS_TEAM_CT)
  2274. ExecuteHamB(Ham_CS_RoundRespawn, id)
  2275. ColorChat(0, "^4%s ^1Buy ^3^"Change Team^"", shopname)
  2276. playerpoints[id] -= 15000
  2277. }
  2278. else
  2279. ColorChat(id, "This option dont work because some admin is online.")
  2280. }
  2281. }
  2282. case 2:
  2283. {
  2284. if(playerpoints[id] < 500) {
  2285. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  2286. ColorChat(id, "^1You need more^4 %d Cash^1 for this!", playerpoints[id] - 500)
  2287. } else {
  2288. cs_set_user_model(id, "vip")
  2289.  
  2290. ColorChat(0, "^4%s ^1Buy ^3^"VIP Model^" ^1Once Round", shopname)
  2291. playerpoints[id] -= 500
  2292. }
  2293. }
  2294. case 3:
  2295. {
  2296. if(playerpoints[id] < 1000) {
  2297. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  2298. ColorChat(id, "^1You need more^4 %d Cash^1 for this!", playerpoints[id] - 10)
  2299. } else {
  2300. cs_set_user_model(id, "Ex-Woman")
  2301.  
  2302. ColorChat(0, "^4%s ^1Buy ^3^"Admin Model^" ^1Once Round", shopname)
  2303. playerpoints[id] -= 1000
  2304. }
  2305. }
  2306. case 4:
  2307. {
  2308. if(playerpoints[id] < 3000) {
  2309. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  2310. ColorChat(id, "^1You need more^4 %d Cash^1 for this!", playerpoints[id] - 3000)
  2311. } else {
  2312. fm_set_user_rendering(id, kRenderFxGlowShell, random_num(0, 255), random_num(0, 255), random_num(0, 255), kRenderNormal, 255)
  2313.  
  2314. ColorChat(0, "^4%s ^1Buy ^3^"Freeday^" ^1Once Round", shopname)
  2315. playerpoints[id] -= 3000
  2316. }
  2317. }
  2318. }
  2319. ActionShopMenu(id)
  2320. }
  2321. public sub_ActionOfferMenu(id, shopoffermenu, item)
  2322. {
  2323. if(item == MENU_EXIT || !is_user_alive(id))
  2324. {
  2325. ActionShopMenu(id)
  2326. return
  2327. }
  2328. new shopname[33]
  2329. get_user_name(id, shopname, 31)
  2330. new Data[7], Name[64], Access, Callback
  2331. menu_item_getinfo(shopoffermenu, item, Access, Data,5, Name, 63, Callback)
  2332.  
  2333. new Key = str_to_num(Data)
  2334.  
  2335. switch (Key)
  2336. {
  2337. case 1:
  2338. {
  2339. if(playerpoints[id] < 7500) {
  2340. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  2341. ColorChat(id, "^1You need more^4 %d Cash^1 for this!", playerpoints[id] - 7500)
  2342. } else {
  2343. fm_set_user_godmode(id, 1)
  2344. set_task(5.0, "RemoveGodmode", id)
  2345. fm_set_user_health(id, 500)
  2346.  
  2347. ColorChat(0, "^4%s ^1Buy ^3^"Small Pack^"", shopname)
  2348. playerpoints[id] -= 7500
  2349. }
  2350. }
  2351. case 2:
  2352. {
  2353. if(playerpoints[id] < 15000) {
  2354. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  2355. ColorChat(id, "^1You need more^4 %d Cash^1 for this!", playerpoints[id] - 15000)
  2356. } else {
  2357. fm_set_user_godmode(id, 1)
  2358. set_task(6.0, "RemoveGodmode", id)
  2359. fm_set_user_health(id, 1000)
  2360. fm_give_item(id, "weapon_m4a1")
  2361. cs_set_weapon_ammo(find_ent_by_owner(1, "weapon_m4a1", id), 1)
  2362. fm_give_item(id, "weapon_deagle")
  2363. cs_set_weapon_ammo(find_ent_by_owner(1, "weapon_deagle", id), 1)
  2364.  
  2365. ColorChat(0, "^4%s ^1Buy ^3^"Normal Pack^"", shopname)
  2366. playerpoints[id] -= 15000
  2367. }
  2368. }
  2369. case 3:
  2370. {
  2371. if(playerpoints[id] < 22500) {
  2372. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  2373. ColorChat(id, "^1You need more^4 %d Cash^1 for this!", playerpoints[id] - 22500)
  2374. } else {
  2375. fm_set_user_godmode(id, 1)
  2376. set_task(7.0, "RemoveGodmode", id)
  2377. fm_set_user_health(id, 1500)
  2378. fm_give_item(id, "weapon_awp")
  2379. cs_set_weapon_ammo(find_ent_by_owner(1, "weapon_awp", id), 1)
  2380. fm_give_item(id, "weapon_m4a1")
  2381. cs_set_weapon_ammo(find_ent_by_owner(1, "weapon_m4a1", id), 1)
  2382. fm_give_item(id, "weapon_deagle")
  2383. cs_set_weapon_ammo(find_ent_by_owner(1, "weapon_deagle", id), 1)
  2384.  
  2385. ColorChat(0, "^4%s ^1Buy ^3^"Big Pack^"", shopname)
  2386. playerpoints[id] -= 22500
  2387. }
  2388. }
  2389. case 4:
  2390. {
  2391. if(playerpoints[id] < 30000) {
  2392. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  2393. ColorChat(id, "^1You need more^4 %d Cash^1 for this!", playerpoints[id] - 30000)
  2394. } else {
  2395. fm_set_user_godmode(id, 1)
  2396. set_task(7.0, "RemoveGodmode", id)
  2397. fm_set_user_health(id, 2000)
  2398. fm_give_item(id, "weapon_awp")
  2399. cs_set_weapon_ammo(find_ent_by_owner(1, "weapon_awp", id), 1)
  2400. fm_give_item(id, "weapon_m4a1")
  2401. cs_set_weapon_ammo(find_ent_by_owner(1, "weapon_m4a1", id), 2)
  2402. fm_give_item(id, "weapon_deagle")
  2403. cs_set_weapon_ammo(find_ent_by_owner(1, "weapon_deagle", id), 2)
  2404.  
  2405. ColorChat(0, "^4%s ^1Buy ^3^"Giant Pack^"", shopname)
  2406. playerpoints[id] -= 30000
  2407. }
  2408. }
  2409. }
  2410. ActionShopMenu(id)
  2411. }
  2412. public PlayerPointsMenu(id)
  2413. {
  2414. new shopppmenu = menu_create("\r[\w BeatTheB Jail \r]\y JailBreak Shop Menu\d ^n\yPlayers Cash", "sub_ActionPlayersPoints")
  2415.  
  2416. new name[32], szTempid[10], Item[100]
  2417. for( new i = 1; i <= g_max_clients; i++ )
  2418. {
  2419. if(!is_user_connected(i)) continue
  2420.  
  2421. get_user_name(i, name, sizeof(name) - 1)
  2422. num_to_str(i, szTempid, 9)
  2423.  
  2424. if(playerpoints[i] <= 75000) formatex(_status[id], 20, "Ex Beginner")
  2425. else if(playerpoints[i] <= 150000) formatex(_status[id], 20, "Ex Novice")
  2426. else if(playerpoints[i] <= 225000) formatex(_status[id], 20, "Ex Distinguished")
  2427. else if(playerpoints[i] <= 300000) formatex(_status[id], 20, "Ex Competent")
  2428. else if(playerpoints[i] <= 375000) formatex(_status[id], 20, "Ex Master")
  2429. else if(playerpoints[i] <= 450000) formatex(_status[id], 20, "Ex Winner")
  2430. else if(playerpoints[i] <= 500000) formatex(_status[id], 20, "Ex Killer")
  2431. else if(playerpoints[i] <= 1000000 || playerpoints[i] >= 1000000) formatex(_status[id], 20, "Ex Millyoner")
  2432.  
  2433. formatex(Item, 99, "\y%s \w%d \r%s", name, playerpoints[i], _status[id])
  2434. menu_additem(shopppmenu, Item, szTempid)
  2435. }
  2436. menu_setprop(shopppmenu, MPROP_EXITNAME, "\yExit Shop")
  2437. menu_display(id, shopppmenu)
  2438. }
  2439.  
  2440. public sub_ActionPlayersPoints(client, shopppmenu, item)
  2441. {
  2442. if(item == MENU_EXIT)
  2443. {
  2444. ActionShopMenu(client)
  2445. return
  2446. }
  2447. new data[6], iName[64]
  2448. new _access, callback
  2449. menu_item_getinfo(shopppmenu, item, _access, data,5, iName, 63, callback)
  2450.  
  2451. new tempid = str_to_num(data)
  2452.  
  2453. if(!is_user_connected(tempid)) return
  2454. new name[32]
  2455. get_user_name(tempid, name, sizeof(name) - 1)
  2456.  
  2457. if(playerpoints[tempid] <= 75000) formatex(_status[tempid], 16, "Ex' Beginner")
  2458. else if(playerpoints[tempid] <= 150000) formatex(_status[tempid], 16, "Ex' Novice")
  2459. else if(playerpoints[tempid] <= 225000) formatex(_status[tempid], 16, "Ex' Distinguished")
  2460. else if(playerpoints[tempid] <= 300000) formatex(_status[tempid], 16, "Ex' Competent")
  2461. else if(playerpoints[tempid] <= 375000) formatex(_status[tempid], 16, "Ex' Master")
  2462. else if(playerpoints[tempid] <= 450000) formatex(_status[tempid], 16, "Ex' Winner")
  2463. else if(playerpoints[tempid] <= 500000) formatex(_status[tempid], 16, "Ex' Killer")
  2464. else formatex(_status[tempid], 16, "Ex' Millyoner")
  2465.  
  2466. ColorChat(client, "^4 ^3%s^4 has :^3 %i Cash", name, playerpoints[tempid])
  2467.  
  2468. PlayerPointsMenu(client)
  2469. }
  2470.  
  2471. public Ham_UseButton(iEnt, iAttacker) {
  2472. if (!get_cvar_num("use_buttons"))
  2473. return
  2474. else
  2475. dllfunc(DLLFunc_Use, iEnt, iAttacker)
  2476. }
  2477.  
  2478. ResetMaxspeed(id)
  2479. {
  2480. static Float:max_speed
  2481. switch (get_user_weapon(id))
  2482. {
  2483. case CSW_SG550, CSW_AWP, CSW_G3SG1: max_speed = 210.0
  2484. case CSW_M249: max_speed = 220.0
  2485. case CSW_AK47: max_speed = 221.0
  2486. case CSW_M3, CSW_M4A1: max_speed = 230.0
  2487. case CSW_SG552: max_speed = 235.0
  2488. case CSW_XM1014, CSW_AUG, CSW_GALIL, CSW_FAMAS: max_speed = 240.0
  2489. case CSW_P90: max_speed = 245.0
  2490. case CSW_SCOUT: max_speed = 260.0
  2491. default: max_speed = 250.0
  2492. }
  2493.  
  2494. entity_set_float(id, EV_FL_maxspeed, max_speed)
  2495. }
  2496. public plugin_natives()
  2497. {
  2498. register_native("jb_get_user_points", "_get_user_points");
  2499. register_native("jb_set_user_points", "_set_user_points");
  2500. }
  2501.  
  2502.  
  2503. public _get_user_points( plugin, params )
  2504. {
  2505. return playerpoints[ get_param( 1 ) ];
  2506. }
  2507.  
  2508.  
  2509. public _set_user_points( plugin, params )
  2510. {
  2511. new client = get_param( 1 );
  2512.  
  2513. playerpoints[ client ] = max( 0, get_param( 2 ) );
  2514. }
  2515. public cmd_give_points(id,level,cid)
  2516. {
  2517. if(get_user_flags(id) & ADMIN_RCON)
  2518. {
  2519. new target[32], amount[21], reason[21]
  2520.  
  2521. read_argv(1, target, 31)
  2522. read_argv(2, amount, 20)
  2523. read_argv(3, reason, 20)
  2524.  
  2525. new player = cmd_target(id, target, 8)
  2526.  
  2527. if(! player)
  2528. return PLUGIN_HANDLED
  2529.  
  2530. new admin_name[32], player_name[32]
  2531. get_user_name(id, admin_name, 31)
  2532. get_user_name(player, player_name, 31)
  2533.  
  2534. new pointnum = str_to_num(amount)
  2535.  
  2536. playerpoints[player] += pointnum
  2537.  
  2538. switch(get_cvar_num ("amx_show_activity"))
  2539. {
  2540. case 1: client_print(0, print_chat, "ADMIN: gave %i points for %s.", pointnum, player_name)
  2541. case 2: client_print(0, print_chat, "ADMIN %s: gave %i points for %s.", admin_name, pointnum, player_name)
  2542. }
  2543. client_print(player, print_chat, "You received %i points.(Total: %d)", pointnum, playerpoints[player])
  2544. SaveData(id)
  2545. }
  2546. return PLUGIN_HANDLED
  2547. }
  2548.  
  2549. public cmd_take_points(id,level,cid)
  2550. {
  2551. if(get_user_flags(id) & ADMIN_RCON)
  2552. {
  2553. new target[32], amount[21], reason[21]
  2554.  
  2555. read_argv(1, target, 31)
  2556. read_argv(2, amount, 20)
  2557. read_argv(3, reason, 20)
  2558.  
  2559. new player = cmd_target(id, target, 8)
  2560.  
  2561. if(!player)
  2562. return PLUGIN_HANDLED
  2563.  
  2564. new admin_name[32], player_name[32]
  2565. get_user_name(id, admin_name, 31)
  2566. get_user_name(player, player_name, 31)
  2567.  
  2568. new pointnum = str_to_num(amount)
  2569.  
  2570. playerpoints[player] -= pointnum
  2571.  
  2572. switch(get_cvar_num("amx_show_activity"))
  2573. {
  2574. case 1: client_print(0, print_chat, "ADMIN: took %i points from %s.", pointnum, player_name)
  2575. case 2: client_print(0, print_chat, "ADMIN %s: took %i points from %s.", admin_name, pointnum, player_name)
  2576. }
  2577. client_print(player, print_chat, "You lost %i points. (Total: %d)", pointnum, playerpoints[player])
  2578. SaveData(id)
  2579. }
  2580. return PLUGIN_HANDLED
  2581. }
  2582. public ShowVIP(user)
  2583. {
  2584. ShowAdmin(user)
  2585. new message[256]
  2586. new adminnames[33][32]
  2587. new id, count, x, len
  2588.  
  2589. for(id = 1 ; id <= g_max_clients ; id++)
  2590. if(is_user_connected(id))
  2591. if(get_user_flags(id) & VIP_FLAG || get_vip[id])
  2592. get_user_name(id, adminnames[count++], 31)
  2593. len = format(message, 255, "^4 [Ex`] VIPS ONLINE: ")
  2594. if(count > 0) {
  2595. for(x = 0 ; x < count ; x++) {
  2596. len += format(message[len], 255-len, "%s%s ", adminnames[x], x < (count-1) ? ", ":"")
  2597. if(len > 96) {
  2598. print_message(user, message)
  2599. len = format(message, 255, "^4 ")
  2600. }
  2601. }
  2602. print_message(user, message)
  2603. }
  2604. else {
  2605. len += format(message[len], 255-len, "No vips online.")
  2606. print_message(user, message)
  2607. }
  2608. }
  2609.  
  2610. public ShowAdmin(user)
  2611. {
  2612. new message[256]
  2613. new adminnames[33][32]
  2614. new id, count, x, len
  2615.  
  2616. for(id = 1 ; id <= g_max_clients ; id++)
  2617. if(is_user_connected(id))
  2618. if(get_user_flags(id) & ADMIN_RCON)
  2619. get_user_name(id, adminnames[count++], 31)
  2620. len = format(message, 255, "^4 [Ex`] TOP ADMINS ONLINE: ")
  2621. if(count > 0) {
  2622. for(x = 0 ; x < count ; x++) {
  2623. len += format(message[len], 255-len, "%s%s ", adminnames[x], x < (count-1) ? ", ":"")
  2624. if(len > 96) {
  2625. print_message(user, message)
  2626. len = format(message, 255, "^4 ")
  2627. }
  2628. }
  2629. print_message(user, message)
  2630. }
  2631. else {
  2632. len += format(message[len], 255-len, "No top admins online.")
  2633. print_message(user, message)
  2634. }
  2635. }
  2636.  
  2637. public ShowMenu(id, g_ShowMenu, item)
  2638. {
  2639. if(item == MENU_EXIT)
  2640. return
  2641. new Data[7], Name[64], Access, Callback, adname[33]
  2642. get_user_name(id, adname, 31)
  2643. menu_item_getinfo(g_ShowMenu, item, Access, Data,5, Name, 63, Callback)
  2644. new Key = str_to_num(Data)
  2645.  
  2646. switch(Key)
  2647. {
  2648. case 1:
  2649. {
  2650. ColorChat(0, "^4%s^1 started^4 Zombie day !", adname)
  2651. zombieday = true
  2652. ActionZombie()
  2653. }
  2654. case 2:
  2655. {
  2656. ColorChat(0, "^4%s^1 started^4 Hide'n'seek day !", adname)
  2657. hns = true
  2658. ActionHns()
  2659. }
  2660. case 3:
  2661. {
  2662. ColorChat(0, "^4%s^1 started^4 Shark day !", adname)
  2663. ActionShark()
  2664. }
  2665. case 4:
  2666. {
  2667. ColorChat(0, "^4%s^1 started^4 Free day !", adname)
  2668. fd = true
  2669. ActionFree()
  2670. }
  2671. case 5:
  2672. {
  2673. ColorChat(0, "^4%s^1 started^4 NightCrawler Day !", adname)
  2674. ActionNightCrawler()
  2675. nightcrawler = true
  2676. }
  2677. case 6:
  2678. {
  2679. ColorChat(0, "^4%s^1 started^4 RunAway Day !", adname)
  2680. ActionRunAwayDay()
  2681. RunAwayDay = true
  2682. }
  2683. case 7:
  2684. {
  2685. ColorChat(0, "^4%s^1 started^4 Box Day !", adname)
  2686. ActionBoxDay()
  2687. BoxDay = true
  2688. }
  2689. case 8:
  2690. {
  2691. ColorChat(0, "^4%s^1 started^4 Spartan Day !", adname)
  2692. Actionspartanday()
  2693. }
  2694. case 9: ShowMusicMenu(id)
  2695. case 10:
  2696. {
  2697. ColorChat(0, "^4%s^1 started^4 War Day !", adname)
  2698. ActionWarday()
  2699. }
  2700. case 11:
  2701. {
  2702. ColorChat(0, "^4%s^1 started^4 Deathmatch !", adname)
  2703. Deathmatch = true
  2704. ActionDeathmatch()
  2705. }
  2706. case 12:
  2707. {
  2708. ColorChat(0, "^4%s^1 started^4 KnifeDM !", adname)
  2709. knifematchday = true
  2710. ActionKnifeDM()
  2711. }
  2712. case 13:
  2713. {
  2714. ColorChat(0, "^4%s^1 started^4 Birth Day !", adname)
  2715. ActionBirthDay()
  2716. set_task(5.0, "GetRandomPlayer")
  2717. }
  2718. case 14:
  2719. {
  2720. ColorChat(0, "^4%s^1 started^4 Knife Day !", adname)
  2721. ActionKnifeDay()
  2722. knifeday = true
  2723. }
  2724. case 15:
  2725. {
  2726. ColorChat(0, "^4%s^1 started^4 Grenade Day !", adname)
  2727. ActionGrenadeDay()
  2728. grenadeday = true
  2729. }
  2730. case 16:
  2731. {
  2732. ColorChat(0, "^4%s^1 started^4 Deagle Day !", adname)
  2733. ActionNorDealgeDay()
  2734. nordeagleday = true
  2735. }
  2736. case 17:
  2737. {
  2738. ColorChat(0, "^4%s^1 started^4 Jump Day !", adname)
  2739. ActionJumpDay()
  2740. }
  2741. case 18:
  2742. {
  2743. ColorChat(0, "^4%s^1 started^4 Rambo Day !", adname)
  2744. ActionRamboDay()
  2745. }
  2746. case 19:
  2747. {
  2748. ColorChat(0, "^4%s^1 started^4 Fire Day !", adname)
  2749. ActionFireDay()
  2750. fire = true
  2751. }
  2752. case 20:
  2753. {
  2754. ColorChat(0, "^4%s^1 started^4 Special Day", adname)
  2755. set_task(0.25, "GetPlayerDisco",_,_,_, "a", 60)
  2756. set_task(5.0, "ActionRandomDay")
  2757. set_task(20.0, "ShowSpecialHook")
  2758. if(random_num(0,1)) client_cmd(0, "mp3 play ^"sound/Extreme-Jail/ImposibbleMisson.mp3^"")
  2759. else client_cmd(0, "mp3 play ^"sound/Extreme-Jail/KillEveryBody.mp3^"")
  2760. }
  2761. case 21:
  2762. {
  2763. ColorChat(0, "^4%s^1 started^4 Random Day !", adname)
  2764. set_task(5.0, "ActionRandomDay")
  2765. set_hudmessage(0, 255, 0, 0.08, -1.0, 0, 6.0, 4.0)
  2766. show_hudmessage(0, "Random day will start in 5 seconds !!")
  2767. }
  2768. case 22:
  2769. {
  2770. new g_OptionMenu = menu_create("\r[\w BeatTheB Jail \r]\y Admin Option Menu", "OptionMenu")
  2771.  
  2772. new szNum[3]
  2773. for(new i = 0 ; i < sizeof MessageOpt ; i++) {
  2774. num_to_str(i+1 , szNum , 2)
  2775. menu_additem(g_OptionMenu , MessageOpt[i], szNum)
  2776. }
  2777. menu_display(id, g_OptionMenu)
  2778. }
  2779. } if(Key != 9 && Key != 20 && Key != 21 && Key != 22)
  2780. actiondays = true
  2781. }
  2782. public PlayerShowMENU(id, item)
  2783. {
  2784. if(item == MENU_EXIT)
  2785. return
  2786. new Data[7], Name[64], Access, Callback, adname[33]
  2787. get_user_name(id, adname, 31)
  2788. menu_item_getinfo(g_ShowMenu, item, Access, Data,5, Name, 63, Callback)
  2789. new Key = str_to_num(Data)
  2790.  
  2791. switch(Key)
  2792. {
  2793. case 1:
  2794. {
  2795. ColorChat(0, "^4%s^1 started^4 Zombie day !", adname)
  2796. zombieday = true
  2797. ActionZombie()
  2798. }
  2799. case 2:
  2800. {
  2801. ColorChat(0, "^4%s^1 started^4 Hide'n'seek day !", adname)
  2802. hns = true
  2803. ActionHns()
  2804. }
  2805. case 3:
  2806. {
  2807. ColorChat(0, "^4%s^1 started^4 Shark day !", adname)
  2808. ActionShark()
  2809. }
  2810. case 4:
  2811. {
  2812. ColorChat(0, "^4%s^1 started^4 Free day !", adname)
  2813. fd = true
  2814. ActionFree()
  2815. }
  2816. case 5:
  2817. {
  2818. ColorChat(0, "^4%s^1 started^4 NightCrawler Day !", adname)
  2819. ActionNightCrawler()
  2820. }
  2821. case 6:
  2822. {
  2823. ColorChat(0, "^4%s^1 started^4 RunAway Day !", adname)
  2824. ActionRunAwayDay()
  2825. RunAwayDay = true
  2826. }
  2827. case 7:
  2828. {
  2829. ColorChat(0, "^4%s^1 started^4 Box Day !", adname)
  2830. ActionBoxDay()
  2831. BoxDay = true
  2832. }
  2833. case 8:
  2834. {
  2835. ColorChat(0, "^4%s^1 started^4 Spartan Day !", adname)
  2836. Actionspartanday()
  2837. }
  2838. case 9:
  2839. {
  2840. ColorChat(0, "^4%s^1 started^4 War Day !", adname)
  2841. ActionWarday()
  2842. }
  2843. case 10:
  2844. {
  2845. ColorChat(0, "^4%s^1 started^4 Deathmatch !", adname)
  2846. Deathmatch = true
  2847. ActionDeathmatch()
  2848. }
  2849. case 11:
  2850. {
  2851. ColorChat(0, "^4%s^1 started^4 Birth Day !", adname)
  2852. ActionBirthDay()
  2853. set_task(5.0, "GetRandomPlayer")
  2854. }
  2855. case 12:
  2856. {
  2857. ColorChat(0, "^4%s^1 started^4 Knife Day !", adname)
  2858. ActionKnifeDay()
  2859. knifeday = true
  2860. }
  2861. case 13:
  2862. {
  2863. ColorChat(0, "^4%s^1 started^4 Grenade Day !", adname)
  2864. ActionGrenadeDay()
  2865. grenadeday = true
  2866. }
  2867. case 14:
  2868. {
  2869. ColorChat(0, "^4%s^1 started^4 Deagle Day !", adname)
  2870. ActionNorDealgeDay()
  2871. nordeagleday = true
  2872. }
  2873. case 15:
  2874. {
  2875. ColorChat(0, "^4%s^1 started^4 Jump Day !", adname)
  2876. ActionJumpDay()
  2877. }
  2878. case 16:
  2879. {
  2880. ColorChat(0, "^4%s^1 started^4 Rambo Day !", adname)
  2881. ActionRamboDay()
  2882. }
  2883. case 17:
  2884. {
  2885. ColorChat(0, "^4%s^1 started^4 Fire Day !", adname)
  2886. ActionFireDay()
  2887. fire = true
  2888. }
  2889. case 18:
  2890. {
  2891. ColorChat(0, "^4%s^1 started^4 Special Day", adname)
  2892. set_task(0.25, "GetPlayerDisco",_,_,_, "a", 60)
  2893. set_task(5.0, "ActionRandomDay")
  2894. set_task(20.0, "ShowSpecialHook")
  2895. if(random_num(0,1)) client_cmd(0, "mp3 play ^"sound/Extreme-Jail/ImposibbleMisson.mp3^"")
  2896. else client_cmd(0, "mp3 play ^"sound/Extreme-Jail/KillEveryBody.mp3^"")
  2897. }
  2898. }
  2899. }
  2900. public ShowMusicMenu(id)
  2901. {
  2902. if(is_user_admin(id) || cs_get_user_team(id) == CS_TEAM_CT) {
  2903. new g_MusicMenu = menu_create("\r[\w BeatTheB Jail \r]\y Music Menu", "MusicMenu")
  2904.  
  2905. new szNum[4]
  2906. for(new i = 0 ; i < sizeof SongsName ; i++) {
  2907. num_to_str(i , szNum , 3)
  2908. menu_additem(g_MusicMenu , SongsName[i], szNum)
  2909. }
  2910. menu_display(id, g_MusicMenu)
  2911. }
  2912. }
  2913.  
  2914. public MusicMenu(id, g_MusicMenu, item)
  2915. {
  2916.  
  2917. if(item == MENU_EXIT)
  2918. return
  2919. new szKey[3], adname[33], Dummy
  2920. get_user_name(id, adname, 32)
  2921. menu_item_getinfo(g_MusicMenu, item, Dummy, szKey, 2, "", 0, Dummy)
  2922.  
  2923. new key = str_to_num(szKey)
  2924. if(key == 0) ShowMusicCustomized(0)
  2925. else if(key == sizeof SongsName-1) {
  2926. client_cmd(0, "mp3 stop;stopsound")
  2927. ColorChat(0, "^4%s ^1stoped the music !", adname)
  2928. } else {
  2929. client_cmd(0, "mp3 play ^"sound/Extreme-Jail/%s.mp3^"", SongsData[key-1])
  2930. ColorChat(0, "^4%s ^1started^3 ^"^1 %s^3 ^"^1 song !", adname, SongsName[key])
  2931. }
  2932. }
  2933.  
  2934. public ShowMusicCustomized(id)
  2935. {
  2936. new Customized = menu_create("\r[\w BeatTheB Jail \r]\y Music Customized Menu^n\dType !music or /music to reopen The Menu", "MusicCustomized")
  2937.  
  2938. new szNum[4], players[32], pnum
  2939. for(new i = 0 ; i < sizeof SongsNameC ; i++) {
  2940. num_to_str(i, szNum , 3)
  2941. menu_additem(Customized , SongsNameC[i], szNum)
  2942. } if(id == 0) {
  2943. get_players(players, pnum)
  2944. for(new i; i<pnum; i++)
  2945. menu_display(players[i], Customized)
  2946. } else
  2947. menu_display(id, Customized)
  2948. }
  2949.  
  2950. public MusicCustomized(id, Customized, item)
  2951. {
  2952. if(item == MENU_EXIT)
  2953. return
  2954. new szKey[3], adname[33], Dummy
  2955. get_user_name(id, adname, 32)
  2956. menu_item_getinfo(Customized, item, Dummy, szKey, 2, "", 0, Dummy)
  2957.  
  2958. new key = str_to_num(szKey)
  2959. if(key == 0) ShowMusicMenu(0)
  2960. else if(key == sizeof SongsName-1) {
  2961. client_cmd(0, "mp3 stop;stopsound")
  2962. ColorChat(0, "^4%s ^1stoped the music !", adname)
  2963. } else {
  2964. client_cmd(id, "mp3 play ^"sound/Extreme-Jail/%s.mp3^"", SongsData[key-1])
  2965. ColorChat(id, "You started^3 ^"^1 %s^3 ^"^1 song !", SongsNameC[key])
  2966. }
  2967. }
  2968.  
  2969. public OptionMenu(id, g_OptionMenu, item)
  2970. {
  2971. if(item == MENU_EXIT)
  2972. return
  2973. new Data[7], Name[64], Access, Callback, adname[33]
  2974. get_user_name(id, adname, 31)
  2975. menu_item_getinfo(g_OptionMenu, item, Access, Data,5, Name, 63, Callback)
  2976. new Key = str_to_num(Data)
  2977.  
  2978. switch(Key)
  2979. {
  2980. case 1:
  2981. {
  2982. ColorChat(0, "^4%s Enable^4 ''^1 No Zoom^4 ''^1 !", adname)
  2983. EnableHamForward(ForwardSecAttackAwp)
  2984. EnableHamForward(ForwardSecAttackScout)
  2985. }
  2986. case 2:
  2987. {
  2988. ColorChat(0, "^4%s Disable^4 ''^1 No Zoom^4 ''^1 !", adname)
  2989. DisableHamForward(ForwardSecAttackAwp)
  2990. DisableHamForward(ForwardSecAttackScout)
  2991. }
  2992. case 3:
  2993. {
  2994. ColorChat(0, "^4%s started^4 ''^1 count down 30 sec^4 ''^1 !", adname)
  2995. timer = 30
  2996. ColorChat(0, "when^3 %d^1 is over save your^4 %s", timer, random_num(0,1) ? "ASS" : "RUN")
  2997. countdown()
  2998. set_task(1.0, "countdown",4444,_,_, "b")
  2999. }
  3000. case 4:
  3001. {
  3002. ColorChat(0, "^4%s started^4 ''^1 count down 60 sec^4 ''^1 !", adname)
  3003. timer = 60
  3004. ColorChat(0, "when^3 %d^1 is over save your^4 %s", timer, random_num(0,1) ? "ASS" : "RUN")
  3005. countdown()
  3006. set_task(1.0, "countdown",4444,_,_, "b")
  3007. }
  3008. case 5:
  3009. {
  3010. remove_task(4444)
  3011. }
  3012. case 6:
  3013. {
  3014. if(!g_iSprayMessages) {
  3015. g_iSprayMessages = true
  3016. ColorChat(0, "^4%s ^3Enable^4 spray messages for everyone to see.", adname)
  3017. } else if(g_iSprayMessages) {
  3018. g_iSprayMessages = false
  3019. ColorChat(0, "^4%s ^3Disable^4 spray messages for everyone to see.", adname)
  3020. }
  3021. }
  3022. }
  3023. menu_destroy(g_OptionMenu)
  3024. }
  3025.  
  3026. public Forward_PreThink( id )
  3027. {
  3028. if(!nightcrawler )
  3029. return FMRES_IGNORED;
  3030. else if( cs_get_user_team(id) == CS_TEAM_T)
  3031. return FMRES_IGNORED;
  3032.  
  3033. new button = fm_get_user_button( id );
  3034.  
  3035. if( button & IN_USE )
  3036. {
  3037. static Float:origin[3];
  3038. pev( id, pev_origin, origin );
  3039.  
  3040. if( get_distance_f( origin, g_fWallOrigin[id] ) > 10.0 )
  3041. return FMRES_IGNORED;
  3042.  
  3043. if( fm_get_entity_flags( id ) & FL_ONGROUND )
  3044. return FMRES_IGNORED;
  3045.  
  3046. if( button & IN_FORWARD )
  3047. {
  3048. static Float:velocity[3];
  3049. velocity_by_aim( id, 240, velocity );
  3050.  
  3051. fm_set_user_velocity( id, velocity );
  3052. }
  3053.  
  3054. else if( button & IN_BACK )
  3055. {
  3056. static Float:velocity[3];
  3057. velocity_by_aim( id, -240, velocity );
  3058.  
  3059. fm_set_user_velocity( id, velocity );
  3060. }
  3061. }
  3062.  
  3063. return FMRES_IGNORED;
  3064. }
  3065.  
  3066. public EveryBodyDeadNow()
  3067. {
  3068. for(new i = 0; i < g_max_clients; i++)
  3069.  
  3070. if(IsPlayer(i) && is_user_alive(i))
  3071. {
  3072. switch(cs_get_user_team(i))
  3073. {
  3074. case CS_TEAM_T:
  3075. {
  3076. user_kill(i)
  3077. }
  3078. case CS_TEAM_CT:
  3079. {
  3080. user_kill(i)
  3081. }
  3082. }
  3083. }
  3084. }
  3085. ActionLastTeror()
  3086. {
  3087. for(new i = 0; i < g_max_clients; i++)
  3088.  
  3089. if(IsPlayer(i) && is_user_alive(i))
  3090. {
  3091. switch(cs_get_user_team(i))
  3092. {
  3093. case CS_TEAM_T:
  3094. {
  3095. fm_strip_user_weapons(i)
  3096. fm_set_user_health(i, 100)
  3097. fm_set_user_godmode(i, 0)
  3098. fm_give_item(i, "weapon_knife")
  3099. }
  3100. case CS_TEAM_CT:
  3101. {
  3102. fm_strip_user_weapons(i)
  3103. fm_set_user_health(i, 100)
  3104. fm_set_user_godmode(i, 0)
  3105. fm_set_user_noclip(i, 0)
  3106. set_task(0.1, "WeaponMenu", i)
  3107. }
  3108. }
  3109. }
  3110. }
  3111. public ShowClassMenu(id)
  3112. {
  3113. if(IsPlayer(id) && is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_CT)
  3114. {
  3115. new ChooseClass = menu_create("\r[\w Extreme Jail \r]\y Choose Your Class", "sub_Class_Choosed")
  3116. menu_additem(ChooseClass, "Jumper Zombie [ + Jump ]", "1")
  3117. menu_additem(ChooseClass, "Faster Zombie [ + Speed ]", "2")
  3118. menu_additem(ChooseClass, "Tanker Zombie [ + HP ]", "3")
  3119.  
  3120. menu_display(id, ChooseClass)
  3121. }
  3122. return PLUGIN_HANDLED
  3123. }
  3124. public sub_Class_Choosed(id, ChooseClass, item)
  3125. {
  3126. new data[6], iName[64]
  3127. new access, callback
  3128. menu_item_getinfo(ChooseClass, item, access, data, 6, iName, 63, callback)
  3129.  
  3130. new key = str_to_num(data)
  3131. switch(key)
  3132. {
  3133. case 1:
  3134. {
  3135. fm_set_user_gravity(id, 400.0 / 800.0)
  3136. }
  3137. case 2:
  3138. {
  3139. fm_set_user_maxspeed(id, 450.0)
  3140. }
  3141. case 3:
  3142. {
  3143. fm_set_user_health(id, get_user_health(id) + 5000)
  3144. }
  3145. case 0:
  3146. {
  3147. menu_display(id, ChooseClass)
  3148. }
  3149. }
  3150. }
  3151. ActionZombie()
  3152. {
  3153. rar = 60
  3154. set_task(1.0, "ShowTimer")
  3155. set_task(0.1, "AutoOpen")
  3156. set_task(0.5, "ShowBlind",0,_,_, "b")
  3157.  
  3158. set_hudmessage(0, 255, 0, 0.08, -1.0, 1, 6.0, 18.0)
  3159. show_hudmessage(0, "It is Zombie Day !!^ncount down 60 seconds!")
  3160. for(new i = 0; i < g_max_clients; i++)
  3161.  
  3162. if(IsPlayer(i) && is_user_alive(i))
  3163. {
  3164. switch(cs_get_user_team(i))
  3165. {
  3166. case CS_TEAM_T:
  3167. {
  3168. fm_strip_user_weapons(i)
  3169. fm_set_user_health(i, 100)
  3170. fm_set_user_godmode(i, 1)
  3171. }
  3172. case CS_TEAM_CT:
  3173. {
  3174. ExecuteHamB( Ham_CS_RoundRespawn, i )
  3175. fm_strip_user_weapons(i)
  3176. fm_set_user_health(i, 30000000000000000)
  3177. set_task(3.0, "Zombie")
  3178. fm_set_user_godmode(i, 1)
  3179. set_pev(i, pev_flags, pev( i, pev_flags) | FL_FROZEN )
  3180. }
  3181. }
  3182. }
  3183. }
  3184. ActionHns()
  3185. {
  3186. rar = 60
  3187. set_task(1.0, "ShowTimer")
  3188. set_task(0.1, "AutoOpen")
  3189. for(new i = 0; i < g_max_clients; i++)
  3190.  
  3191. if(IsPlayer(i) && is_user_alive(i))
  3192. {
  3193. switch(cs_get_user_team(i))
  3194. {
  3195. case CS_TEAM_T:
  3196. {
  3197. fm_set_user_health(i, 100)
  3198. fm_strip_user_weapons(i)
  3199. fm_give_item(i,"weapon_knife")
  3200. fm_set_user_godmode(i, 1)
  3201. }
  3202. case CS_TEAM_CT:
  3203. {
  3204. ExecuteHamB( Ham_CS_RoundRespawn, i )
  3205. fm_strip_user_weapons(i)
  3206. fm_give_item(i,"weapon_knife")
  3207. set_task(3.0, "HideNsike")
  3208. fm_set_user_godmode(i, 1)
  3209. set_task(0.5, "ShowBlind",_,_,_, "b")
  3210. fm_set_user_health(i, 30000000000000000)
  3211. set_pev(i, pev_flags, pev( i, pev_flags) | FL_FROZEN )
  3212. }
  3213. }
  3214. }
  3215. set_hudmessage(0, 255, 0, 0.08, -1.0, 1, 6.0, 18.0)
  3216. show_hudmessage(0, "It is Hide'N'Seek day !!^nRules:^n CT- Seekers T- Hiders^n CT team can only STABS !^n Hiders have only 60 seconds to find a place to hide^n When the time is over the Seekers must kill the Hiders with a^n KNIFE !")
  3217. }
  3218. ActionShark()
  3219. {
  3220. set_task(0.1, "AutoOpen")
  3221. new players[ 32 ], num, ct, t;
  3222. get_players( players, num );
  3223.  
  3224. TeamCount( ct, t );
  3225.  
  3226. for(new i = 0; i < g_max_clients; i++)
  3227.  
  3228. if(IsPlayer(i) && is_user_alive(i))
  3229. {
  3230. switch(cs_get_user_team(i))
  3231. {
  3232. case CS_TEAM_T:
  3233. {
  3234. fm_strip_user_weapons(i)
  3235. fm_give_item(i,"weapon_m4a1")
  3236. fm_give_item(i,"weapon_deagle")
  3237.  
  3238. cs_set_user_bpammo(i, CSW_M4A1, 250)
  3239. cs_set_user_bpammo(i, CSW_DEAGLE, 250)
  3240. }
  3241. case CS_TEAM_CT:
  3242. {
  3243. fm_set_user_health(i, t * 100)
  3244. fm_strip_user_weapons(i)
  3245. fm_give_item(i,"weapon_knife")
  3246. fm_set_user_noclip(i, 1)
  3247. }
  3248. }
  3249. }
  3250. set_hudmessage(0, 255, 0, 0.08, -1.0, 1, 6.0, 18.0)
  3251. show_hudmessage(0, "It is Shark Day !!^nJust kill each other !")
  3252. }
  3253. ActionFree()
  3254. {
  3255. rar = 60
  3256. set_task(1.0, "ShowTimer")
  3257. set_task(0.1, "AutoOpen")
  3258. for(new i = 0; i < g_max_clients; i++)
  3259. if(IsPlayer(i) && is_user_alive(i))
  3260. {
  3261. switch(cs_get_user_team(i))
  3262. {
  3263. case CS_TEAM_T:
  3264. {
  3265. fm_set_user_health(i, 100)
  3266. fm_set_user_godmode(i, 1)
  3267. }
  3268. case CS_TEAM_CT:
  3269. {
  3270. fm_strip_user_weapons(i)
  3271. fm_give_item(i,"weapon_m4a1")
  3272. fm_give_item(i,"weapon_deagle")
  3273. fm_give_item(i, "weapon_smokegrenade")
  3274. fm_set_user_godmode(i, 1)
  3275.  
  3276. cs_set_user_bpammo(i, CSW_SMOKEGRENADE, 4)
  3277. cs_set_user_bpammo(i, CSW_M4A1, 120)
  3278. cs_set_user_bpammo(i, CSW_DEAGLE, 70)
  3279. fm_set_user_health(i, 100)
  3280. }
  3281. }
  3282. }
  3283. set_hudmessage(0, 255, 0, 0.08, -1.0, 1, 6.0, 18.0)
  3284. show_hudmessage(0, "Its a free day !!^nRules:^n all the terrorist allow to play in the map + get weapos.^n the CT Not Do Anything^n Every Body Have Godmode ! When Time Is Over The Round Is Over Automatically")
  3285. }
  3286. ActionNightCrawler()
  3287. {
  3288. set_task(0.1, "AutoOpen")
  3289.  
  3290. new players[ 32 ], num, ct, t;
  3291. get_players( players, num );
  3292.  
  3293. TeamCount( ct, t );
  3294.  
  3295. for(new i = 0; i < g_max_clients; i++)
  3296.  
  3297. if(IsPlayer(i) && is_user_alive(i))
  3298. {
  3299. switch(cs_get_user_team(i))
  3300. {
  3301. case CS_TEAM_T:
  3302. {
  3303. fm_strip_user_weapons(i)
  3304. fm_give_item(i, "weapon_m4a1")
  3305. fm_give_item(i, "weapon_deagle")
  3306.  
  3307. cs_set_user_bpammo(i, CSW_M4A1, 999)
  3308. cs_set_user_bpammo(i, CSW_DEAGLE, 999)
  3309. }
  3310. case CS_TEAM_CT:
  3311. {
  3312. fm_strip_user_weapons(i)
  3313. fm_give_item(i, "weapon_knife")
  3314. fm_set_user_rendering(i, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 0)
  3315. fm_set_user_health(i, t * 70)
  3316. }
  3317. }
  3318. }
  3319. set_hudmessage(0, 255, 0, 0.08, -1.0, 1, 6.0, 18.0)
  3320. show_hudmessage(0, "It is NightCrawler Day !!^nJust Kill The CT. !")
  3321. }
  3322. ActionBoxDay()
  3323. {
  3324. set_task(0.1, "AutoOpen")
  3325. for(new i = 0; i < g_max_clients; i++)
  3326. if(IsPlayer(i) && is_user_alive(i))
  3327. {
  3328. switch(cs_get_user_team(i))
  3329. {
  3330. case CS_TEAM_T:
  3331. {
  3332. fm_strip_user_weapons(i)
  3333. fm_give_item(i, "weapon_knife")
  3334. fm_set_user_health(i, 250)
  3335. }
  3336. case CS_TEAM_CT:
  3337. {
  3338. fm_strip_user_weapons(i)
  3339. fm_set_user_godmode(i, 1)
  3340. }
  3341. }
  3342. }
  3343. set_hudmessage(0, 255, 0, 0.08, -1.0, 1, 6.0, 18.0)
  3344. show_hudmessage(0, "It is Box Day !!^n T Need To Kill His Friends ^n CT With Godmode. !")
  3345. server_cmd("mp_friendlyfire 1")
  3346.  
  3347. }
  3348. ActionRunAwayDay()
  3349. {
  3350. rar = 20
  3351. set_task(1.0, "ShowTimer")
  3352. set_task(0.1, "AutoOpen")
  3353. for(new i = 0; i < g_max_clients; i++)
  3354. if(IsPlayer(i) && is_user_alive(i))
  3355. {
  3356. switch(cs_get_user_team(i))
  3357. {
  3358. case CS_TEAM_T:
  3359. {
  3360. fm_strip_user_weapons(i)
  3361. fm_set_user_godmode(i, 1)
  3362. fm_set_user_health(i, 50000000)
  3363. }
  3364. case CS_TEAM_CT:
  3365. {
  3366. fm_strip_user_weapons(i)
  3367. fm_give_item(i, "weapon_scout")
  3368. cs_set_user_bpammo(i, CSW_SCOUT, 999)
  3369. fm_set_user_godmode(i, 1)
  3370. set_task(0.5, "ShowBlind",_,_,_, "b")
  3371. set_pev(i, pev_flags, pev( i, pev_flags) | FL_FROZEN )
  3372. }
  3373. }
  3374. }
  3375. set_hudmessage(0, 255, 0, 0.08, -1.0, 1, 6.0, 18.0)
  3376. show_hudmessage(0, "It is RunAway Day !!^n T Need To Hide ^n CT Need To Kill Teror. !")
  3377. server_cmd("mp_friendlyfire 1")
  3378.  
  3379. }
  3380. Actionspartanday()
  3381. {
  3382. set_task(0.1, "AutoOpen")
  3383. new players[ 32 ], num, ct, t;
  3384. get_players( players, num );
  3385.  
  3386. TeamCount( ct, t );
  3387.  
  3388. for(new i = 0; i < g_max_clients; i++)
  3389.  
  3390. if(IsPlayer(i) && is_user_alive(i))
  3391. {
  3392. switch(cs_get_user_team(i))
  3393. {
  3394. case CS_TEAM_T:
  3395. {
  3396. fm_strip_user_weapons(i)
  3397. fm_set_user_health(i, 300)
  3398. fm_give_item(i, "weapon_shield")
  3399. fm_give_item(i, "weapon_deagle")
  3400.  
  3401. cs_set_user_bpammo(i, CSW_DEAGLE, 999)
  3402. }
  3403. case CS_TEAM_CT:
  3404. {
  3405. fm_set_user_health(i, t * 300)
  3406. fm_strip_user_weapons(i)
  3407. fm_give_item(i, "weapon_deagle")
  3408. fm_give_item(i, "weapon_m4a1")
  3409.  
  3410. cs_set_user_bpammo(i, CSW_DEAGLE, 999)
  3411. cs_set_user_bpammo(i, CSW_M4A1, 9999)
  3412. }
  3413. }
  3414. }
  3415. set_hudmessage(0, 255, 0, 0.08, -1.0, 1, 6.0, 18.0)
  3416. show_hudmessage(0, "It is Spartan Day !!^nT - With 300 HP^nJust kill The CT.!")
  3417. }
  3418.  
  3419. ActionWarday()
  3420. {
  3421. set_task(0.1, "AutoOpen")
  3422. new players[ 32 ], num, ct, t;
  3423. get_players( players, num );
  3424.  
  3425. TeamCount( ct, t );
  3426.  
  3427. for(new i = 0; i < g_max_clients; i++)
  3428. {
  3429. if(IsPlayer(i) && is_user_alive(i))
  3430. {
  3431. fm_strip_user_weapons(i)
  3432. switch(cs_get_user_team(i))
  3433. {
  3434. case CS_TEAM_CT:
  3435. {
  3436. fm_give_item(i, "weapon_m4a1")
  3437. fm_give_item(i, "weapon_hegrenade")
  3438.  
  3439. cs_set_user_bpammo(i, CSW_M4A1, 999)
  3440. cs_set_user_bpammo(i, CSW_HEGRENADE, 999)
  3441.  
  3442. fm_set_user_health(i, t * 120)
  3443. }
  3444. case CS_TEAM_T: fm_give_item(i, "weapon_ak47") && cs_set_user_bpammo(i, CSW_AK47, 999)
  3445. }
  3446. fm_give_item(i, "weapon_deagle") && cs_set_user_bpammo(i, CSW_DEAGLE, 999)
  3447. fm_set_user_health(i, 100)
  3448. fm_give_item(i, "weapon_knife")
  3449. }
  3450. }
  3451. set_hudmessage(0, 255, 0, 0.08, -1.0, 1, 6.0, 18.0)
  3452. show_hudmessage(0, "It is War Day !!^nEveryall - Have Guns^nJust kill The CT.!")
  3453. }
  3454.  
  3455. ActionDeathmatch()
  3456. {
  3457. set_task(0.1, "AutoOpen")
  3458. for(new i = 0; i < g_max_clients; i++)
  3459. {
  3460. if(IsPlayer(i) && is_user_alive(i))
  3461. {
  3462. fm_strip_user_weapons(i)
  3463. if(cs_get_user_team(i) == CS_TEAM_CT)
  3464. fm_set_user_godmode(i, 1)
  3465. fm_set_user_health(i, 100)
  3466. fm_give_item(i, "weapon_knife")
  3467. }
  3468. }
  3469. set_hudmessage(0, 255, 0, 0.08, -1.0, 1, 6.0, 18.0)
  3470. show_hudmessage(0, "It is Deathmatch !!^nT - Just freekill.!^nCT - no kill !")
  3471. server_cmd("mp_friendlyfire 1")
  3472. }
  3473. ActionKnifeDM()
  3474. {
  3475. set_task(0.1, "AutoOpen")
  3476. for(new i = 0; i < g_max_clients; i++)
  3477. {
  3478. if(IsPlayer(i) && is_user_alive(i))
  3479. {
  3480. fm_strip_user_weapons(i)
  3481. if(cs_get_user_team(i) == CS_TEAM_CT)
  3482. fm_set_user_godmode(i, 1)
  3483. fm_set_user_health(i, 100)
  3484. fm_give_item(i, "weapon_knife")
  3485. }
  3486. }
  3487. set_hudmessage(0, 255, 0, 0.08, -1.0, 1, 6.0, 18.0)
  3488. show_hudmessage(0, "It is KnifeDM !!^nT - Just freekill.!^nCT - no kill !^nT Cant Have Weapons!!!!")
  3489. server_cmd("mp_friendlyfire 1")
  3490. }
  3491.  
  3492. ActionBirthDay()
  3493. {
  3494. set_task(0.1, "AutoOpen")
  3495. for(new i = 0; i < g_max_clients; i++)
  3496. {
  3497. if(IsPlayer(i) && is_user_alive(i))
  3498. {
  3499. switch(cs_get_user_team(i))
  3500. {
  3501. case CS_TEAM_CT: fm_set_user_godmode(i, 1) && fm_set_user_rendering(i, kRenderFxGlowShell, 0, 0, 250, kRenderNormal, 20)
  3502. case CS_TEAM_T: fm_strip_user_weapons(i) && fm_set_user_rendering(i, kRenderFxGlowShell, 250, 0, 0, kRenderNormal, 20)
  3503. }
  3504. fm_set_user_health(i, 100)
  3505. fm_give_item(i, "weapon_knife")
  3506. }
  3507. }
  3508. set_hudmessage(0, 255, 0, 0.08, -1.0, 1, 6.0, 18.0)
  3509. show_hudmessage(0, "It is Birth Day !!^nIn 5 seconds automatically chooses^nprisoner who had a birthday.!")
  3510. }
  3511.  
  3512. ActionKnifeDay()
  3513. {
  3514. set_task(0.1, "AutoOpen")
  3515. new players[ 32 ], num, ct, t;
  3516. get_players( players, num );
  3517.  
  3518. TeamCount( ct, t );
  3519.  
  3520. for(new i = 0; i < g_max_clients; i++)
  3521. {
  3522. if(IsPlayer(i) && is_user_alive(i))
  3523. {
  3524. fm_strip_user_weapons(i)
  3525. switch(cs_get_user_team(i))
  3526. {
  3527. case CS_TEAM_CT: fm_set_user_health(i, t * 200)
  3528. case CS_TEAM_T: fm_set_user_health(i, 200)
  3529. }
  3530. fm_give_item(i, "weapon_knife")
  3531. }
  3532. }
  3533. set_hudmessage(0, 255, 0, 0.08, -1.0, 1, 6.0, 18.0)
  3534. show_hudmessage(0, "It is Knife Day !!^nCT - with 2000 HP^nT - with 200 HP^nJust Knife only.!")
  3535. }
  3536.  
  3537. ActionGrenadeDay()
  3538. {
  3539. set_task(0.1, "AutoOpen")
  3540. new players[ 32 ], num, ct, t;
  3541. get_players( players, num );
  3542.  
  3543. TeamCount( ct, t );
  3544.  
  3545. for(new i = 0; i < g_max_clients; i++)
  3546. {
  3547. if(IsPlayer(i) && is_user_alive(i))
  3548. {
  3549. fm_strip_user_weapons(i)
  3550. switch(cs_get_user_team(i))
  3551. {
  3552. case CS_TEAM_CT: fm_give_item(i, "weapon_hegrenade") && cs_set_user_bpammo(i, CSW_HEGRENADE, 999) && fm_set_user_health(i, t * 250)
  3553. case CS_TEAM_T: fm_give_item(i, "weapon_hegrenade") && cs_set_user_bpammo(i, CSW_HEGRENADE, 999) && fm_set_user_health(i, 250)
  3554. }
  3555.  
  3556. }
  3557. }
  3558. set_hudmessage(0, 255, 0, 0.08, -1.0, 1, 6.0, 18.0)
  3559. show_hudmessage(0, "It is Grenade Day !!^nT - with 250 HP^n CT - with %i HP^n Come war!!!!!!.. :D", t * 250)
  3560. }
  3561.  
  3562. ActionNorDealgeDay()
  3563. {
  3564. set_task(0.1, "AutoOpen")
  3565. new players[ 32 ], num, ct, t;
  3566. get_players( players, num );
  3567.  
  3568. TeamCount( ct, t );
  3569.  
  3570. for(new i = 0; i < g_max_clients; i++)
  3571. {
  3572. if(IsPlayer(i) && is_user_alive(i))
  3573. {
  3574. fm_strip_user_weapons(i)
  3575. switch(cs_get_user_team(i))
  3576. {
  3577. case CS_TEAM_CT: fm_give_item(i, "weapon_deagle") && cs_set_user_bpammo(i, CSW_DEAGLE, 999) && fm_set_user_health(i, t * 250)
  3578. case CS_TEAM_T: fm_give_item(i, "weapon_deagle") && cs_set_user_bpammo(i, CSW_DEAGLE, 999) && fm_set_user_health(i, 250)
  3579. }
  3580.  
  3581. }
  3582. }
  3583. set_hudmessage(0, 255, 0, 0.08, -1.0, 1, 6.0, 18.0)
  3584. show_hudmessage(0, "It is Deagle Day !!^nT - with 250 HP^nFire Now.!")
  3585. }
  3586. ActionRamboDay()
  3587. {
  3588. set_task(0.1, "AutoOpen")
  3589. new players[ 32 ], num, ct, t;
  3590. get_players( players, num );
  3591.  
  3592. TeamCount( ct, t );
  3593.  
  3594. for(new i = 0; i < g_max_clients; i++)
  3595. {
  3596. if(IsPlayer(i) && is_user_alive(i))
  3597. {
  3598. fm_strip_user_weapons(i)
  3599. switch(cs_get_user_team(i))
  3600. {
  3601. case CS_TEAM_CT: fm_give_item(i, "weapon_m249") && cs_set_user_bpammo(i, CSW_M249, 999) && fm_set_user_health(i, t * 110)
  3602. case CS_TEAM_T: fm_give_item(i, "weapon_m249") && cs_set_user_bpammo(i, CSW_M249, 999) && fm_set_user_health(i, 100)
  3603. }
  3604.  
  3605. }
  3606. }
  3607. set_hudmessage(0, 255, 0, 0.08, -1.0, 1, 6.0, 18.0)
  3608. show_hudmessage(0, "It is Rambo Day !!^nT - with 100 HP^nFire Now.!")
  3609. }
  3610. ActionFireDay()
  3611. {
  3612. server_cmd("amx_fire @ct")
  3613. set_task(0.1, "AutoOpen")
  3614. new players[ 32 ], num, ct, t;
  3615. get_players( players, num );
  3616.  
  3617. TeamCount( ct, t );
  3618.  
  3619. for(new i = 0; i < g_max_clients; i++)
  3620. {
  3621. if(IsPlayer(i) && is_user_alive(i))
  3622. {
  3623. fm_strip_user_weapons(i)
  3624. switch(cs_get_user_team(i))
  3625. {
  3626. case CS_TEAM_CT: fm_strip_user_weapons(i) && fm_set_user_health(i, t * 250)
  3627. case CS_TEAM_T: fm_strip_user_weapons(i) && fm_set_user_health(i, 100)
  3628. }
  3629.  
  3630. }
  3631. }
  3632. set_hudmessage(0, 255, 0, 0.08, -1.0, 1, 6.0, 18.0)
  3633. show_hudmessage(0, "It is Fire Day !!^nCT Touch The T^nFire Now.!")
  3634. }
  3635. ActionJumpDay()
  3636. {
  3637. set_task(0.1, "AutoOpen")
  3638. for(new i = 0; i < g_max_clients; i++)
  3639. {
  3640. if(IsPlayer(i) && is_user_alive(i))
  3641. {
  3642. switch(cs_get_user_team(i))
  3643. {
  3644. case CS_TEAM_CT: fm_set_user_godmode(i, 1)
  3645. case CS_TEAM_T: fm_set_user_health(i, 100) && fm_strip_user_weapons(i)
  3646. }
  3647.  
  3648. }
  3649. }
  3650. set_hudmessage(0, 255, 0, 0.08, -1.0, 1, 6.0, 18.0)
  3651. show_hudmessage(0, "It is Jump Day !!^nCT - with Godmode^nT - with 100 HP^nJump Jump Jump Jump Jump !! :D")
  3652. }
  3653.  
  3654.  
  3655. public ActionRandomDay()
  3656. {
  3657. actiondays = true
  3658. switch(random_num(1,14))
  3659. {
  3660. case 1:
  3661. {
  3662. ColorChat(0, "start^4 Zombie day !^1 (By Random Day)")
  3663. ActionZombie()
  3664. zombieday = true
  3665. }
  3666. case 2:
  3667. {
  3668. ColorChat(0, "start^4 hide'n'seek !^1 (By Random Day)")
  3669. hns = true
  3670. ActionHns()
  3671. }
  3672. case 3:
  3673. {
  3674. ColorChat(0, "start^4 Shark day !^1 (By Random Day)")
  3675. ActionShark()
  3676. }
  3677. case 4:
  3678. {
  3679. ColorChat(0, "start^4 Free day !^1 (By Random Day)")
  3680. fd = true
  3681. ActionFree()
  3682. }
  3683. case 5:
  3684. {
  3685. ColorChat(0, "start^4 NightCrawler Day !^1 (By Random Day)")
  3686. ActionNightCrawler()
  3687. nightcrawler = true
  3688. }
  3689. case 6:
  3690. {
  3691. ColorChat(0, "start^4 RunAway Day !^1 (By Random Day)")
  3692. ActionRunAwayDay()
  3693. RunAwayDay = true
  3694. }
  3695. case 7:
  3696. {
  3697. ColorChat(0, "start^4 Box Day !^1 (By Random Day)")
  3698. ActionBoxDay()
  3699. BoxDay = true
  3700. }
  3701. case 8:
  3702. {
  3703. ColorChat(0, "start^4 Spartan Day !^1 (By Random Day)")
  3704. Actionspartanday()
  3705. }
  3706. case 9:
  3707. {
  3708. ColorChat(0, "start^4 War Day !^1 (By Random Day)")
  3709. ActionWarday()
  3710. }
  3711. case 10:
  3712. {
  3713. ColorChat(0, "start^4 Birth Day !^1 (By Random Day)")
  3714. ActionBirthDay()
  3715. set_task(5.0, "GetRandomPlayer")
  3716. }
  3717. case 11:
  3718. {
  3719. ColorChat(0, "start^4 Knife Day !^1 (By Random Day)")
  3720. ActionKnifeDay()
  3721. knifeday = true
  3722. }
  3723. case 12:
  3724. {
  3725. ColorChat(0, "start^4 Grenade Day !^1 (By Random Day)")
  3726. ActionGrenadeDay()
  3727. grenadeday = true
  3728. }
  3729. case 13:
  3730. {
  3731. ColorChat(0, "start^4 Deagle Day !^1 (By Random Day)")
  3732. ActionNorDealgeDay()
  3733. nordeagleday = true
  3734. }
  3735. case 14:
  3736. {
  3737. ColorChat(0, "start^4 Rambo Day !^1 (By Random Day)")
  3738. ActionRamboDay()
  3739. }
  3740. case 15:
  3741. {
  3742. ColorChat(0, "start^4 Fire Day !^1 (By Random Day)")
  3743. ActionFireDay()
  3744. fire = true
  3745. }
  3746. }
  3747. }
  3748.  
  3749. public fdexec(id)
  3750. {
  3751. if(cs_get_user_team(id) == CS_TEAM_CT || is_user_admin(id) || get_vip[id]) {
  3752. if(is_user_alive(id)) {
  3753. new rname[32]
  3754. get_user_name(id, rname, 33)
  3755. ColorChat(0, "^4%s ^1started Random Players freeday", rname)
  3756. set_task(5.0, "GetRandomPlayer")
  3757. }
  3758. }
  3759. }
  3760.  
  3761. public GetRandomPlayer()
  3762. {
  3763. new vPlayers[32], vPlayerNum, vName[32]
  3764. get_players(vPlayers, vPlayerNum, "ac")
  3765.  
  3766. if(vPlayerNum)
  3767. {
  3768. new g_iVIPid = 0
  3769. g_iVIPid = vPlayers[(vPlayerNum > 1) ? random(vPlayerNum) : 0]
  3770. get_user_name(g_iVIPid, vName, charsmax(vName))
  3771. if(cs_get_user_team(g_iVIPid) == CS_TEAM_CT || !is_user_alive(g_iVIPid))
  3772. set_task(1.0, "GetRandomPlayer")
  3773. else {
  3774. ColorChat(0, "^4%s ^1is selected for a freeday", vName)
  3775. fm_set_user_rendering(g_iVIPid, kRenderFxGlowShell, 0, 250, 0, kRenderNormal, 255)
  3776. client_cmd(0, "spk ^"%s^"", appmusic)
  3777.  
  3778. set_hudmessage(255, 0, 0, -1.0, 0.69, 2, 6.0, 18.0)
  3779. show_hudmessage(0, "^%s ^1is selected", vName)
  3780. }
  3781. }
  3782. }
  3783.  
  3784. public RandomCT(id)
  3785. {
  3786. if(!is_user_admin(id))
  3787. return
  3788. new vPlayers[32], vPlayerNum, vName[32]
  3789. get_players(vPlayers, vPlayerNum)
  3790.  
  3791. if(vPlayerNum) {
  3792. new g_iVIPid = 0
  3793. g_iVIPid = vPlayers[(vPlayerNum > 1) ? random(vPlayerNum) : 0]
  3794. get_user_name(g_iVIPid, vName, charsmax(vName))
  3795. if(cs_get_user_team(g_iVIPid) == CS_TEAM_CT)
  3796. set_task(1.0, "RandomCT")
  3797. else {
  3798. ColorChat(0, "^4%s ^1is selected for a Random CT", vName)
  3799. cs_set_user_team(g_iVIPid, CS_TEAM_CT)
  3800. ExecuteHamB(Ham_CS_RoundRespawn, g_iVIPid)
  3801. client_cmd(0, "spk ^"%s^"", appmusic)
  3802.  
  3803. set_hudmessage(255, 0, 0, -1.0, 0.69, 2, 6.0, 18.0)
  3804. show_hudmessage(0, "^%s is selected for a Random CT", vName)
  3805. }
  3806. }
  3807. }
  3808. /*
  3809. public _ShowTimer(id)
  3810. --cashtimer[ id ]
  3811. }
  3812. public ShowCashTimer(id)
  3813. {
  3814. if(cashtimer[ id ] = 0)
  3815. {
  3816. playerpoints[ id ] + 2500
  3817. cashtimer[id] = 30
  3818. set_task(60.0, "ShowCashTimer", id)
  3819. } else {
  3820. _ShowTimer(id)
  3821. set_task(60.0, "ShowCashTimer", id)
  3822. }
  3823. public ShowCashTimeLeft(id)
  3824. {
  3825. ColorChat(id, "^3 You Have More ^4%d ^3minutes To Get 2500 Cash", cashtimer[ id ])
  3826. }
  3827. */
  3828. public ShowTimer(id)
  3829. {
  3830. rar--
  3831. if(rar <= 0) {
  3832. if(hns) {
  3833. client_cmd(0, "spk ^"%s^"", bellmusic)
  3834. set_hudmessage(255, 0, 0, -1.0, 0.69, 2, 6.0, 18.0)
  3835. show_hudmessage(0, "The Time is Over!^nCT- go to find the terrorist and kill them")
  3836. ShowTimerHns()
  3837. set_task(5.0, "removetask")
  3838. } else if(fd) {
  3839. client_cmd(0, "spk ^"%s^"", bellmusic)
  3840. set_hudmessage(255, 0, 0, -1.0, 0.69, 2, 6.0, 18.0)
  3841. show_hudmessage(0, "FreeDay is Over!^nRestart!")
  3842. server_cmd("sv_restart 1")
  3843. remove_task
  3844. } else if(zombieday) {
  3845. ShowTimerZM()
  3846. client_cmd(0, "spk ^"%s^"", bellmusic)
  3847. set_hudmessage(255, 0, 0, -1.0, 0.69, 2, 6.0, 18.0)
  3848. show_hudmessage(0, "The Time is Over! Ct Go To Kill The Terorist")
  3849. remove_task
  3850. } else if(RunAwayDay)
  3851. ShowTimerRA()
  3852. set_hudmessage(255, 0, 0, -1.0, 0.69, 2, 6.0, 18.0)
  3853. show_hudmessage(0, "The Time is Over! Ct Go To Kill The Terorist")
  3854. remove_task
  3855. } if(rar >= 0 && fd) {
  3856. set_hudmessage(0, 255, 0, 0.0, 0.4, 0, 0.5, 0.5)
  3857. show_hudmessage(0, "TimeLeft To Freeday: %d", rar)
  3858. set_task(1.0, "ShowTimer")
  3859. } else if(rar >= 0 && zombieday) {
  3860. set_hudmessage(0, 255, 0, 0.0, 0.4, 0, 0.5, 0.5)
  3861. show_hudmessage(0, "TimeLeft To ZombieDay: %d", rar)
  3862. set_task(1.0, "ShowTimer")
  3863. } else if(rar >= 0 && hns) {
  3864. set_hudmessage(0, 255, 0, 0.0, 0.4, 0, 0.5, 0.5)
  3865. show_hudmessage(0, "TimeLeft To Hns: %d", rar)
  3866. set_task(1.0, "ShowTimer")
  3867. } else if(rar >= 0 && RunAwayDay) {
  3868. set_hudmessage(0, 255, 0, 0.0, 0.4, 0, 0.5, 0.5)
  3869. show_hudmessage(0, "TimeLeft To RunAwayDay: %d", rar)
  3870. set_task(1.0, "ShowTimer")
  3871. } if(rar >= 10) {
  3872. new SecVoice[21]
  3873. num_to_word(timer, SecVoice, 20)
  3874. client_cmd(0, "spk ^"BeatTheB-Jail/%s^"", SecVoice)
  3875. }
  3876. }
  3877. public removetask()
  3878. {
  3879. remove_task
  3880. }
  3881. ShowTimerRA()
  3882. {
  3883. for(new i = 0; i < g_max_clients; i++)
  3884. if(IsPlayer(i) && is_user_alive(i))
  3885. {
  3886. switch(cs_get_user_team(i))
  3887. {
  3888. case CS_TEAM_T:
  3889. {
  3890. fm_set_user_godmode(i, 0)
  3891. }
  3892. case CS_TEAM_CT:
  3893. {
  3894. fm_set_user_godmode(i, 1)
  3895. set_pev( i, pev_flags, pev( i, pev_flags ) & ~ FL_FROZEN);
  3896. }
  3897. }
  3898. }
  3899. }
  3900. ShowTimerZM()
  3901. {
  3902. client_cmd(0, "spk ^"%s^"", bellmusic)
  3903. set_hudmessage(255, 0, 0, -1.0, 0.69, 2, 6.0, 18.0)
  3904. show_hudmessage(0, "The Time is Over!^nCT- Godmode 0^nCT- go to find the terrorist and kill them")
  3905. remove_task
  3906. for(new i = 0; i < g_max_clients; i++)
  3907. if(IsPlayer(i) && is_user_alive(i))
  3908. {
  3909. switch(cs_get_user_team(i))
  3910. {
  3911. case CS_TEAM_T:
  3912. {
  3913. fm_give_item(i,"weapon_knife")
  3914. fm_set_user_health(i, 100)
  3915. fm_set_user_godmode(i, 0)
  3916.  
  3917. fm_give_item(i,"weapon_elite") && fm_give_item(i,"weapon_fiveseven") && fm_give_item(i,"weapon_m3") && fm_give_item(i,"weapon_xm1014")
  3918. fm_give_item(i,"weapon_tmp") && fm_give_item(i,"weapon_mac10") && fm_give_item(i,"weapon_mp5navy") && fm_give_item(i,"weapon_p228")
  3919. fm_give_item(i,"weapon_aug") && fm_give_item(i,"weapon_scout") && fm_give_item(i,"weapon_sg550") && fm_give_item(i,"weapon_awp")
  3920. fm_give_item(i,"weapon_g3sg1") && fm_give_item(i,"weapon_p90") && fm_give_item(i,"weapon_ump45") && fm_give_item(i,"weapon_famas")
  3921. fm_give_item(i,"weapon_galil") && fm_give_item(i,"weapon_ak47") && fm_give_item(i,"weapon_m4a1") && fm_give_item(i,"weapon_deagle")
  3922. fm_give_item(i,"weapon_sg552") && fm_give_item(i,"weapon_usp") && fm_give_item(i,"weapon_glock18") && fm_give_item(i,"weapon_m249")
  3923.  
  3924. cs_set_user_bpammo(i, CSW_AK47, 25000000000000000000000) && cs_set_user_bpammo(i, CSW_M3, 250000000000000000000000000) && cs_set_user_bpammo(i, CSW_M4A1, 25000000000000000000000000)
  3925. cs_set_user_bpammo(i, CSW_ELITE, 250000000000000000000000000000000) && cs_set_user_bpammo(i, CSW_ELITE, 25000000000000000) && cs_set_user_bpammo(i, CSW_XM1014, 25000000000000000000000000)
  3926. cs_set_user_bpammo(i, CSW_TMP, 25000000000000000000000000) && cs_set_user_bpammo(i, CSW_MAC10, 25000000000000000) && cs_set_user_bpammo(i, CSW_MP5NAVY, 25000000000000000000000000)
  3927. cs_set_user_bpammo(i, CSW_P228, 250000000000000000000000000000000000) && cs_set_user_bpammo(i, CSW_AUG, 25000000000000000000000000) && cs_set_user_bpammo(i, CSW_SCOUT, 25000000000000000000000000)
  3928. cs_set_user_bpammo(i, CSW_SG550, 2500000000000000000000000) && cs_set_user_bpammo(i, CSW_AWP, 25000000000000000000000000000000) && cs_set_user_bpammo(i, CSW_G3SG1, 25000000000000000000000000)
  3929. cs_set_user_bpammo(i, CSW_P90, 25000000000000000000000000000) && cs_set_user_bpammo(i, CSW_UMP45, 25000000000000000000000) && cs_set_user_bpammo(i, CSW_FAMAS, 25000000000000000000000000)
  3930. cs_set_user_bpammo(i, CSW_GALIL, 2500000000000000000000000000000) && cs_set_user_bpammo(i, CSW_AK47, 250000000000000000000000000) && cs_set_user_bpammo(i, CSW_SG552, 25000000000000000000000000)
  3931. cs_set_user_bpammo(i, CSW_USP, 25000000000000000000000000000000000) && cs_set_user_bpammo(i, CSW_DEAGLE, 2500000000000000000000) && cs_set_user_bpammo(i, CSW_GLOCK18, 25000000000000000000000000) && cs_set_user_bpammo(i, CSW_M249, 25000000000000000000000000)
  3932. }
  3933. case CS_TEAM_CT:
  3934. {
  3935. fm_strip_user_weapons(i)
  3936. fm_give_item(i,"weapon_knife")
  3937. fm_set_user_godmode(i, 0)
  3938. fm_set_user_health(i, 30000)
  3939. set_pev( i, pev_flags, pev( i, pev_flags ) & ~ FL_FROZEN);
  3940. set_task(1.0, "ShowClassMenu", i)
  3941. }
  3942. }
  3943. }
  3944. }
  3945. ShowTimerHns()
  3946. {
  3947. client_cmd(0, "spk ^"%s^"", bellmusic)
  3948. set_hudmessage(255, 0, 0, -1.0, 0.69, 2, 6.0, 18.0)
  3949. show_hudmessage(0, "The Time is Over!^nCT- Godmode 0^nCT- go to find the terrorist and kill them")
  3950. remove_task
  3951. for(new i = 0; i < g_max_clients; i++)
  3952. if(IsPlayer(i) && is_user_alive(i))
  3953. {
  3954. switch(cs_get_user_team(i))
  3955. {
  3956. case CS_TEAM_T:
  3957. {
  3958. fm_strip_user_weapons(i)
  3959. fm_set_user_godmode(i, 0)
  3960. }
  3961. case CS_TEAM_CT:
  3962. {
  3963. set_task(0.1, "HideNsike",_,_,_, "b")
  3964. fm_strip_user_weapons(i)
  3965. fm_give_item(i, "weapon_knife")
  3966. fm_set_user_health(i, 100)
  3967. fm_set_user_godmode(i, 1)
  3968. set_pev( i, pev_flags, pev( i, pev_flags ) & ~ FL_FROZEN);
  3969. }
  3970. }
  3971. }
  3972. }
  3973. public OnSecondaryAttack()
  3974. return HAM_SUPERCEDE
  3975. public HideNsike()
  3976. {
  3977. for(new i = 0; i < g_max_clients; i++)
  3978. if(IsPlayer(i) && is_user_alive(i))
  3979. {
  3980. switch(cs_get_user_team(i))
  3981. {
  3982. case CS_TEAM_T:
  3983. {
  3984. }
  3985. case CS_TEAM_CT:
  3986. {
  3987. fm_give_item(i, "weapon_knife")
  3988. fm_set_user_godmode(i, 1)
  3989. }
  3990. }
  3991. }
  3992. }
  3993. public Zombie()
  3994. {
  3995. for(new i = 0; i < g_max_clients; i++)
  3996. if(IsPlayer(i) && is_user_alive(i))
  3997. {
  3998. switch(cs_get_user_team(i))
  3999. {
  4000. case CS_TEAM_T:
  4001. {
  4002. }
  4003. case CS_TEAM_CT:
  4004. {
  4005. fm_give_item(i, "weapon_knife")
  4006. fm_set_user_godmode(i, 1)
  4007. }
  4008. }
  4009. }
  4010. }
  4011. public cmdBox( id ) {
  4012. if(!is_user_connected(id) || !is_user_alive(id) || cs_get_user_team(id) != CS_TEAM_CT)
  4013. ColorChat(id, "^4You ar Not CT Team & You ar Death")
  4014. else {
  4015. new ffname[32]
  4016. get_user_name(id, ffname, 31)
  4017. switch(iHandler) {
  4018. case 0: {
  4019. for(new i = 0; i < g_max_clients; i++)
  4020. if(IsPlayer(i) && is_user_alive(i) && cs_get_user_team(i) == CS_TEAM_T)
  4021. fm_set_user_health(i, 100)
  4022. server_cmd("mp_friendlyfire 1")
  4023. set_hudmessage(0, 255, 0, -1.0, -1.0, 0, 6.0, 12.0)
  4024. show_hudmessage(0, "Box Activated!^n By %s", ffname)
  4025. ColorChat(0, "^3Box^4 Activated!^1 By %s", ffname)
  4026. }
  4027. case 1: {
  4028. server_cmd("mp_friendlyfire 0")
  4029. set_hudmessage(255, 0, 0, -1.0, -1.0, 0, 6.0, 12.0)
  4030. show_hudmessage(0, "Box Deactivated!^n By %s", ffname)
  4031. ColorChat(0, "^3Box^3 Deactivated!^1 By %s", ffname)
  4032. }
  4033. }
  4034. iHandler = !iHandler
  4035. }
  4036. }
  4037. public EventCurWeapon2(id) {
  4038. if(knifeday)
  4039. engclient_cmd(id, "weapon_knife")
  4040. else if(grenadeday && get_user_weapon(id) != CSW_HEGRENADE) {
  4041. fm_strip_user_weapons(id)
  4042. fm_give_item(id, "weapon_hegrenade")
  4043. cs_set_user_bpammo(id, CSW_HEGRENADE, 999)
  4044. engclient_cmd(id, "weapon_hegrenade")
  4045. }
  4046. else if(BoxDay && cs_get_user_team(id) == CS_TEAM_CT) {
  4047. fm_strip_user_weapons(id)
  4048. }
  4049. else if(BoxDay && cs_get_user_team(id) == CS_TEAM_T) {
  4050. fm_strip_user_weapons(id)
  4051. fm_give_item(id, "weapon_knife")
  4052. engclient_cmd(id, "weapon_knife")
  4053. }
  4054. else if(nordeagleday && get_user_weapon(id) != CSW_DEAGLE) {
  4055. fm_strip_user_weapons(id)
  4056. fm_give_item(id, "weapon_deagle")
  4057. cs_set_user_bpammo(id, CSW_DEAGLE, 999)
  4058. engclient_cmd(id, "weapon_deagle")
  4059. }
  4060. else if(knifematchday)
  4061. engclient_cmd(id, "weapon_knife")
  4062. else if(zombieday && get_user_weapon(id) != CSW_KNIFE && cs_get_user_team(id) == CS_TEAM_CT) {
  4063. fm_strip_user_weapons(id)
  4064. fm_give_item(id, "weapon_knife")
  4065. engclient_cmd(id, "weapon_knife")
  4066. }
  4067. else if(hns && cs_get_user_team(id) == CS_TEAM_CT && get_user_weapon(id) != CSW_KNIFE)
  4068. engclient_cmd(id, "weapon_knife")
  4069. else if(zombieday && get_user_weapon(id) != CSW_KNIFE && cs_get_user_team(id) == CS_TEAM_CT) {
  4070. fm_strip_user_weapons(id)
  4071. fm_give_item(id, "weapon_knife")
  4072. engclient_cmd(id, "weapon_knife")
  4073. }
  4074. else if(RunAwayDay && cs_get_user_team(id) == CS_TEAM_T)
  4075. fm_strip_user_weapons(id)
  4076. else if(RunAwayDay && cs_get_user_team(id) == CS_TEAM_CT && get_user_weapon(id) != CSW_SCOUT) {
  4077. fm_strip_user_weapons(id)
  4078. fm_give_item(id, "weapon_scout")
  4079. cs_set_user_bpammo(id, CSW_SCOUT, 999)
  4080. engclient_cmd(id, "weapon_scout")
  4081. }
  4082. else if(fire && cs_get_user_team(id) == CS_TEAM_CT) {
  4083. fm_strip_user_weapons(id)
  4084. }
  4085. else if(fire && cs_get_user_team(id) == CS_TEAM_T && get_user_weapon(id) != CSW_M249) {
  4086. fm_strip_user_weapons(id)
  4087. }
  4088. }
  4089. public GetPlayerDisco()
  4090. {
  4091. new players[32], num
  4092. get_players(players,num,"ah")
  4093. for(new i=0;i<num;i++)
  4094. {
  4095. new num1 = random_num(0,255)
  4096. new num2 = random_num(0,255)
  4097. new num3 = random_num(0,255)
  4098. new alpha = random_num(40,65)
  4099. message_begin(MSG_ONE,get_user_msgid("ScreenFade"),{0,0,0},players[i])
  4100. write_short(~0)
  4101. write_short(~0)
  4102. write_short(1<<12)
  4103. write_byte(num1)
  4104. write_byte(num2)
  4105. write_byte(num3)
  4106. write_byte(alpha)
  4107. message_end()
  4108. }
  4109. }
  4110. public ShowBlind(id)
  4111. {
  4112. if(cs_get_user_team(id) == CS_TEAM_CT) {
  4113. ShowRealBlind()
  4114. }
  4115. }
  4116. public ShowRealBlind()
  4117. {
  4118. new players[32], pnum, tempid
  4119. get_players(players, pnum)
  4120. for(new i; i<pnum; i++)
  4121. {
  4122. tempid = players[i]
  4123.  
  4124. message_begin(MSG_ONE, get_user_msgid("ScreenFade"), {0,0,0}, tempid)
  4125. write_short(4096*1) // Duration
  4126. write_short(4096*1) // Hold time
  4127. write_short(4096) // Fade type
  4128. write_byte(0) // Red
  4129. write_byte(0) // Green
  4130. write_byte(0) // Blue
  4131. write_byte(255) // Alpha
  4132. message_end()
  4133. }
  4134. }
  4135. public ShowSpecialHook()
  4136. {
  4137. new players[32], pnum, tempid
  4138. get_players(players, pnum)
  4139. for(new i; i<pnum; i++)
  4140. {
  4141. tempid = players[i]
  4142.  
  4143. message_begin(MSG_ONE, get_user_msgid("ScreenFade"), {0,0,0}, tempid)
  4144. write_short(4096*1) // Duration
  4145. write_short(4096*1) // Hold time
  4146. write_short(4096) // Fade type
  4147. write_byte(0) // Red
  4148. write_byte(0) // Green
  4149. write_byte(0) // Blue
  4150. write_byte(255) // Alpha
  4151. message_end()
  4152. }
  4153. }
  4154.  
  4155. public GiveVIP(id)
  4156. {
  4157. if(get_user_flags(id) & ADMIN_RCON) {
  4158. new givevipmenu = menu_create("\r[\w BeatTheB Jail \r]\y Give VIP Menu", "ActionGiveVIP")
  4159.  
  4160. new players[32], pnum, tempid
  4161. new szName[32], szTempid[10]
  4162.  
  4163. get_players(players, pnum)
  4164. for(new i; i<pnum; i++)
  4165. {
  4166. tempid = players[i]
  4167.  
  4168. get_user_name(tempid, szName, 31)
  4169. num_to_str(tempid, szTempid, 9)
  4170. menu_additem(givevipmenu, szName, szTempid)
  4171. }
  4172.  
  4173. menu_display(id, givevipmenu)
  4174. } else
  4175. ColorChat(id, "^4You have no access to this")
  4176. }
  4177.  
  4178. public ActionGiveVIP(id, givevipmenu, item)
  4179. {
  4180. new data[6], iName[64]
  4181. new _access, callback
  4182. menu_item_getinfo(givevipmenu, item, _access, data,5, iName, 63, callback)
  4183.  
  4184. new tempid = str_to_num(data)
  4185. new szName[32], szName2[32]
  4186. get_user_name(id, szName, 31)
  4187. get_user_name(tempid, szName2, 31)
  4188. if(get_vip[tempid] || is_user_admin(tempid))
  4189. ColorChat(0, "^4%s ar Already VIP", szName2)
  4190. else {
  4191. ColorChat(0, "^4%s ^3Give VIP to ^4%s", szName, szName2)
  4192. get_vip[tempid] = true
  4193. }
  4194. menu_destroy(givevipmenu)
  4195. }
  4196.  
  4197. /* ---------------------------------------------------
  4198. * --------------- SEND POINTS SYSTEM ----------------*/
  4199.  
  4200. public MainMenuSend(id)
  4201. {
  4202. if(send_delay[id] != 0)
  4203. console_print(id, "Ex SEND: Please wait ^4%d^1 Seconds to SEND", send_delay[id])
  4204. else {
  4205. new target[32], amount[21]
  4206.  
  4207. read_argv(1, target, 31)
  4208. read_argv(2, amount, 20)
  4209.  
  4210. new player = cmd_target(id, target, 8)
  4211. new admin_name[32], player_name[32]
  4212. get_user_name(id, admin_name, 31)
  4213. get_user_name(player, player_name, 31)
  4214.  
  4215. new pointnum = str_to_num(amount)
  4216.  
  4217. if(equal(target, "") || equal(amount, ""))
  4218. console_print(id, "Ex SEND: Use ^"send NAME POINTS^" to send. Example: ^"send yosi 15^"")
  4219. else if(id == player)
  4220. console_print(id, "Ex SEND: You can not send yourself a point")
  4221. else if(!player)
  4222. console_print(id, "Ex SEND: Player Not Found !")
  4223. else if(!is_str_num(amount))
  4224. console_print(id, "Ex SEND: you most to write only numbers")
  4225. else if(playerpoints[id] < pointnum)
  4226. console_print(id, "Ex SEND: you dont have enough points")
  4227. else if(pointnum > 0) {
  4228. playerpoints[player] += pointnum
  4229. playerpoints[id] -= pointnum
  4230. ColorChat(0, "^3%s ^4Give ^3%i^4 Points to ^3%s", admin_name, pointnum, player_name)
  4231. } else
  4232. console_print(id, "Ex SEND: you dont have enough points")
  4233. send_delay[id] = 5
  4234. set_task(1.0,"_ShowDelay", id, "", 0, "a", 5)
  4235. }
  4236. return PLUGIN_HANDLED
  4237. }
  4238.  
  4239. public MenuCallback()
  4240. return ITEM_DISABLED
  4241.  
  4242. /* ---------------------------------------------------
  4243. * ------------- GIVE ACCESS TO SPEACH --------------*/
  4244. public AccessSpeachMenu(id)
  4245. {
  4246. if(get_user_flags(id) & ADMIN_CVAR) {
  4247. new speachmenu = menu_create("\r[\w BeatTheB Jail \r]\y access to Speach Menu", "ActionAccessSpeachMenu")
  4248. new callback = menu_makecallback("MenuCallbackSpeach")
  4249.  
  4250. menu_additem(speachmenu, "\yGive Access", "1")
  4251. menu_additem(speachmenu, "\yRemove Access^n", "2")
  4252. menu_additem(speachmenu, "\rGive Access to CT Team", "3",_, callback)
  4253. menu_additem(speachmenu, "\rRemove Access to CT Team", "4")
  4254.  
  4255. menu_display(id, speachmenu)
  4256. } else
  4257. ColorChat(id, "^4You have no access to that command")
  4258. }
  4259.  
  4260. public MenuCallbackSpeach()
  4261. return mutect ? ITEM_ENABLED : ITEM_DISABLED
  4262. public ActionAccessSpeachMenu(id, speachmenu, item)
  4263. {
  4264. if(item == MENU_EXIT) {
  4265. menu_destroy(speachmenu)
  4266. return
  4267. }
  4268. new Data[7], Name[64], Access, Callback
  4269. menu_item_getinfo(speachmenu, item, Access, Data,5, Name, 63, Callback)
  4270.  
  4271. new Key = str_to_num(Data)
  4272. switch(Key)
  4273. {
  4274. case 1:
  4275. {
  4276. new speach_give = menu_create("\r[\w BeatTheB Jail \r]\y Give access to Speach Menu", "ActionGiveSpeach")
  4277.  
  4278. new players[32], pnum, tempid, szName[32], szTempid[10]
  4279. get_players(players, pnum)
  4280.  
  4281. for(new i; i<pnum; i++)
  4282. {
  4283. tempid = players[i]
  4284.  
  4285. if(!is_user_connected(tempid) || get_user_flags(tempid) & ADMIN_MENU || get_bit(g_PlayerVoice, tempid))
  4286. continue
  4287.  
  4288. get_user_name(tempid, szName, 31)
  4289. num_to_str(tempid, szTempid, 9)
  4290. menu_additem(speach_give, szName, szTempid)
  4291. }
  4292. menu_display(id, speach_give)
  4293. }
  4294. case 2:
  4295. {
  4296. new speach_remove = menu_create("\r[\w BeatTheB Jail \r]\y Remove access to Speach Menu", "ActionRemoveSpeach")
  4297.  
  4298. new players[32], pnum, tempid, szName[32], szTempid[10]
  4299. get_players(players, pnum)
  4300. for(new i; i<pnum; i++)
  4301. {
  4302. tempid = players[i]
  4303.  
  4304. if(!is_user_connected(tempid) || get_user_flags(tempid) & ADMIN_MENU || !(get_bit(g_PlayerVoice, tempid)))
  4305. continue
  4306.  
  4307. get_user_name(tempid, szName, 31)
  4308. num_to_str(tempid, szTempid, 9)
  4309. menu_additem(speach_remove, szName, szTempid)
  4310. }
  4311. menu_display(id, speach_remove)
  4312. }
  4313. case 3:
  4314. {
  4315. new name[33]
  4316. get_user_name(id, name, 32)
  4317. mutect = false
  4318. ColorChat(0, "^3%s ^4Give Speach Access to all^3 CT Team", name)
  4319. }
  4320. case 4:
  4321. {
  4322. new name[33]
  4323. get_user_name(id, name, 32)
  4324. mutect = true
  4325. ColorChat(0, "^3%s ^4Remove Speach Access to all^3 CT Team", name)
  4326. }
  4327. }
  4328. menu_destroy(speachmenu)
  4329. }
  4330.  
  4331. public ActionGiveSpeach(id, speach_give, item)
  4332. {
  4333. if(item == MENU_EXIT) {
  4334. AccessSpeachMenu(id)
  4335. return
  4336. }
  4337. new data[6], iName[64]
  4338. new _access, callback
  4339. menu_item_getinfo(speach_give, item, _access, data,5, iName, 63, callback)
  4340.  
  4341. new tempid = str_to_num(data)
  4342. new szName[32], szName2[32]
  4343. get_user_name(id, szName, 31)
  4344. get_user_name(tempid, szName2, 31)
  4345. set_bit(g_PlayerVoice, tempid)
  4346. ColorChat(0, "^3%s ^4Give Speach Access to ^3%s", szName, szName2)
  4347. menu_destroy(speach_give)
  4348. }
  4349.  
  4350. public ActionRemoveSpeach(id, speach_remove, item)
  4351. {
  4352. if(item == MENU_EXIT) {
  4353. AccessSpeachMenu(id)
  4354. return
  4355. }
  4356. new data[6], iName[64]
  4357. new _access, callback
  4358. menu_item_getinfo(speach_remove, item, _access, data,5, iName, 63, callback)
  4359.  
  4360. new tempid = str_to_num(data)
  4361. new szName[32], szName2[32]
  4362. get_user_name(id, szName, 31)
  4363. get_user_name(tempid, szName2, 31)
  4364. clear_bit(g_PlayerVoice, tempid)
  4365. ColorChat(0, "^3%s ^4Remove Speach Access to ^3%s", szName, szName2)
  4366. menu_destroy(speach_remove)
  4367. }
  4368.  
  4369. public DropCMD(id)
  4370. {
  4371. if(is_user_alive(id)) {
  4372. new weapon,clip,ammo,Float:velo[3]
  4373. weapon = get_user_weapon(id,clip,ammo)
  4374. if(weapon == CSW_KNIFE) {
  4375. if(playerpoints[id] < 50)
  4376. return PLUGIN_CONTINUE
  4377. playerpoints[id] -= 50
  4378. can_pickup[id] = false
  4379. set_task(0.3,"reset_pick",id)
  4380. new start_velo = 10 * 15
  4381. new end_velo = 10 * 50
  4382. velocity_by_aim(id,random_num(start_velo,end_velo),velo)
  4383. make_money(id,velo)
  4384. }
  4385. else if(actiondays) {
  4386. EventCurWeapon2(id)
  4387. }
  4388. }
  4389. return nordeagleday ? PLUGIN_HANDLED : PLUGIN_CONTINUE
  4390. }
  4391. public EventSpray( )
  4392. {
  4393. new iPlayer = read_data(2), iOrigin[3]
  4394. iOrigin[0] = read_data(3)
  4395. iOrigin[1] = read_data(4)
  4396. iOrigin[2] = read_data(5)
  4397. new Float:vecOrigin[3]
  4398. IVecFVec(iOrigin, vecOrigin)
  4399.  
  4400. new Float:vecDirection[3]
  4401. velocity_by_aim(iPlayer, 5, vecDirection)
  4402.  
  4403. new Float:vecStop[3]
  4404. xs_vec_add(vecOrigin, vecDirection, vecStop)
  4405. xs_vec_mul_scalar(vecDirection, -1.0, vecDirection)
  4406. new Float:vecStart[3]
  4407. xs_vec_add( vecOrigin, vecDirection, vecStart)
  4408. engfunc(EngFunc_TraceLine, vecStart, vecStop, IGNORE_MONSTERS, -1, 0)
  4409. get_tr2(0, TR_vecPlaneNormal, vecDirection)
  4410. vecDirection[2] = 0.0
  4411. xs_vec_normalize( vecDirection, vecDirection)
  4412. xs_vec_mul_scalar( vecDirection, 5.0, vecDirection)
  4413. xs_vec_add(vecOrigin, vecDirection, vecStart)
  4414. xs_vec_copy(vecStart, vecStop)
  4415. vecStop[2] -= 9999.0
  4416. engfunc(EngFunc_TraceLine, vecStart, vecStop, IGNORE_MONSTERS, -1, 0)
  4417. get_tr2(0, TR_vecEndPos, vecStop)
  4418. new szName[32]
  4419. get_user_name(iPlayer, szName, charsmax( szName))
  4420. if(g_iSprayMessages)
  4421. ColorChat(0, "^4%s sprayed^4 %.1f units^1 above the^3 ground", szName, (vecStart[2] - vecStop[2]))
  4422. else
  4423. ColorChat(iPlayer, "You have sprayed^4 %.1f units^1 above the^3 ground", (vecStart[2] - vecStop[2]))
  4424.  
  4425. }
  4426.  
  4427. public ShowFiveSeconds(id)
  4428. {
  4429. new SecVoice[21], name[33]
  4430. num_to_word(timer, SecVoice, 20)
  4431.  
  4432. client_cmd(0, "spk ^"vox/%s seconds^"", SecVoice)
  4433. get_user_name(id, name, 32)
  4434. set_hudmessage(0, 255, 0, -1.0, 0.42, 0, 0.5, 0.5)
  4435. if(Show_Choose > 0)
  4436. show_hudmessage(0, "The 50:50 will started in %d seccond^nBy %s", timer, name)
  4437. else
  4438. show_hudmessage(0, "The First writes will started in %d seccond^nBy %s", timer, name)
  4439. timer--
  4440. }
  4441. /* ---------------------------------------------------
  4442. * ------------------ TASKS -------------------------*/
  4443. public advert180() {
  4444. set_dhudmessage(0, 255, 255, -1.0, 0.25, 2, 6.0, 3.0, 0.1, 1.5)
  4445. show_dhudmessage(0, "BeatTheB JailBreak # Game-Serv.Co.iL")
  4446. client_cmd(0, "echo ^"BeatTheB JailBreak # Game-Serv.Co.iL^";echo ^"BeatTheB JailBreak # Game-Serv.Co.iL^";echo ^"BeatTheB JailBreak # Game-Serv.Co.iL^"")
  4447. }
  4448. public advert150() ColorChat(0, "^x04Roze server^x04 | ^x01Skype:haim.gameserv^x01 | ^x04Telephone:0542027038^x04 | ^x01Tkashro ahshav^x01!!!")
  4449.  
  4450. public make_money(id,Float:velo[]) {
  4451. new Float:origin[3]
  4452. new Float:angles[3]
  4453. new Float:mins[3] = {-2.79, -0.0, -6.14}
  4454. new Float:maxs[3] = {2.42, 1.99, 6.35}
  4455. new newent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString,"info_target"))
  4456.  
  4457. if(!is_user_alive(id)) {
  4458. velo[0] = random_float(1.0,150.0)
  4459. velo[1] = random_float(1.0,150.0)
  4460. velo[2] = random_float(1.0,150.0)
  4461. } else
  4462. velo[2] += 100
  4463. pev(newent,pev_angles,angles)
  4464. angles[1] += random_num(1,360)
  4465. pev(id,pev_origin,origin)
  4466. set_pev(newent, pev_origin, origin)
  4467. set_pev(newent, pev_classname, "pdm_money")
  4468. engfunc(EngFunc_SetModel, newent, model)
  4469. engfunc(EngFunc_SetSize,newent,mins,maxs)
  4470. set_pev(newent,pev_angles,angles)
  4471. set_pev(newent, pev_solid, SOLID_TRIGGER)
  4472. set_pev(newent,pev_movetype,MOVETYPE_TOSS)
  4473. set_pev(newent, pev_velocity,velo)
  4474. engfunc(EngFunc_DropToFloor,newent)
  4475.  
  4476. moneybox[newent]=50
  4477. return FMRES_IGNORED
  4478. }
  4479.  
  4480. public player_Touch(touched, toucher) {
  4481.  
  4482. if(pev_valid(touched) && is_user_alive(toucher) && can_pickup[toucher])
  4483. {
  4484. new classname[32]
  4485. pev(touched, pev_classname, classname, sizeof classname - 1)
  4486. if(equali(classname, "pdm_money")) {
  4487. playerpoints[toucher] += moneybox[touched]
  4488. client_cmd(toucher,"spk %s",money_sound1)
  4489. if(pev_valid(touched))
  4490. engfunc(EngFunc_RemoveEntity,touched)
  4491. screen_fade(toucher)
  4492. }
  4493. }
  4494. return FMRES_IGNORED
  4495. }
  4496.  
  4497. public screen_fade(id) {
  4498. message_begin(MSG_ONE, g_MsgScreenFade, {0,0,0}, id)
  4499. write_short(1<<12)
  4500. write_short(1<<12)
  4501. write_short(1<<12)
  4502. write_byte(0)
  4503. write_byte(200)
  4504. write_byte(0)
  4505. write_byte(20)
  4506. message_end()
  4507. }
  4508.  
  4509. public EventStatusValue(const id) {
  4510. new iType = read_data(1), iData = read_data(2)
  4511. switch(iType) {
  4512. case 1: g_bFriend = bool:(iData == 1)
  4513. case 2: {
  4514. new szMessage[99]
  4515. formatex(szMessage, 98, g_bFriend ? "1 %%c1: %%p2 - %%h: %%i3%%%% - points: %i%s" : "1 %%c1: %%p2 - points: %i%s", playerpoints[iData], is_user_admin(iData) ? " (VIP)" : "")
  4516.  
  4517. message_begin(MSG_ONE_UNRELIABLE, g_iMsgStatusText, _, id)
  4518. write_byte(0)
  4519. write_string(szMessage)
  4520. message_end()
  4521. }
  4522. }
  4523. }
  4524.  
  4525. public CmdSayMsg( client )
  4526. {
  4527. new szMsg[ 10 ];
  4528.  
  4529. read_argv( 1, szMsg, charsmax( szMsg ) );
  4530.  
  4531. new szCmd[ 10 ], szArg[ 6 ];
  4532.  
  4533. parse( szMsg, szCmd, charsmax( szCmd ), szArg, charsmax( szArg ) );
  4534.  
  4535. if( equali( szCmd, "/gamble" ) )
  4536. {
  4537. if( equali( szArg, "" ) )
  4538. {
  4539. client_print( client, print_chat, "You must type amount to gamble !" );
  4540.  
  4541. return 1;
  4542. }
  4543.  
  4544. if( !is_str_num( szArg ) )
  4545. {
  4546. client_print( client, print_chat, "You can't use symbols, please type a new value." );
  4547.  
  4548. return 1;
  4549. }
  4550.  
  4551. new num = str_to_num( szArg );
  4552.  
  4553. if( num < 200 )
  4554. {
  4555. client_print( client, print_chat, "You must gamble at least on 200 cash !" );
  4556.  
  4557. return 1;
  4558. }
  4559.  
  4560. if( playerpoints[ client ] < num )
  4561. {
  4562. client_print( client, print_chat, "You have no enough cash." );
  4563.  
  4564. return 1;
  4565. }
  4566.  
  4567. make_gamble( client, num );
  4568. }
  4569.  
  4570. return 0;
  4571. }
  4572.  
  4573. /* ---------------------------------------------------
  4574. * ------------------ STOCK --------------------------*/
  4575.  
  4576. stock make_gamble( client, num )
  4577. {
  4578. new name[ 32 ], bool:IsWinner;
  4579.  
  4580. get_user_name( client, name, charsmax( name ) );
  4581.  
  4582. switch( random( 9 ) )
  4583. {
  4584. case 0,1,2,3,4:
  4585. {
  4586. IsWinner = true;
  4587. }
  4588. }
  4589.  
  4590. client_print( 0, print_chat, "%s, just gambled on %i cash and %s! [ 50 % ]", name, num, IsWinner? "won":"lost" );
  4591.  
  4592. if( IsWinner )
  4593. {
  4594. playerpoints[ client ] += ( num*2 );
  4595.  
  4596. return 1;
  4597. }
  4598.  
  4599. playerpoints[ client ] -= num;
  4600.  
  4601. return 1;
  4602. }
  4603. stock SaveData(index)
  4604. {
  4605. if(playerpoints[index] <= 1000000) {
  4606. gVault = nvault_open("JailBreak-Wows_shop")
  4607.  
  4608. if(gVault == INVALID_HANDLE)
  4609. set_fail_state("[ BeatTheB Jail ] nValut ERROR: =-> Invalid-Handle")
  4610. new gID[33]
  4611. get_user_authid(index, gID, 32)
  4612.  
  4613. formatex(vKey, charsmax(vKey), "%sPOINTS", gID)
  4614.  
  4615. formatex(vData, charsmax(vData), "%d", playerpoints[index])
  4616. nvault_set(gVault, vKey, vData)
  4617. nvault_close(gVault)
  4618. } else {
  4619. gVault = nvault_open("JailBreak-Wows_shop")
  4620.  
  4621. if(gVault == INVALID_HANDLE)
  4622. set_fail_state("[ BeatTheB-Jail ] nValut ERROR: =-> Invalid-Handle")
  4623. new gID[33]
  4624. get_user_authid(index, gID, 32)
  4625.  
  4626. formatex(vKey, charsmax(vKey), "%sPOINTS", gID)
  4627.  
  4628. formatex(vData, charsmax(vData), "1000000")
  4629. nvault_set(gVault, vKey, vData)
  4630. nvault_close(gVault)
  4631. }
  4632. }
  4633. stock LoadData(index)
  4634. {
  4635. gVault = nvault_open("JailBreak-Wows_shop")
  4636.  
  4637. if(gVault == INVALID_HANDLE)
  4638. set_fail_state("[ BeatTheB-Jail ] nValut ERROR: =-> Invalid-Handle")
  4639. new gID[33]
  4640. get_user_authid(index, gID, 32)
  4641.  
  4642. formatex(vKey, charsmax(vKey), "%sPOINTS", gID)
  4643. playerpoints[index] = nvault_get(gVault, vKey)
  4644. nvault_close(gVault)
  4645. }
  4646. /*
  4647. public savebits(id)
  4648. {
  4649. new steamID[35];
  4650. get_user_authid( id , steamID , charsmax( steamID ) );
  4651.  
  4652. new data[64];
  4653. formatex(data, charsmax(data), "%d %d %d %d %d %d %d %d %d",
  4654. !!get_bit(g_Knife1, id),
  4655. !!get_bit(g_Knife2, id),
  4656. !!get_bit(g_Knife3, id),
  4657. !!get_bit(g_Knife4, id),
  4658. !!get_bit(g_Knife5, id),
  4659. !!get_bit(g_Knife6, id),
  4660. !!get_bit(g_Knife7, id),
  4661. !!get_bit(g_Knife8, id),
  4662. !!get_bit(g_Knife9, id)
  4663. );
  4664. nvault_set(bitvault, steamID, data);
  4665. }
  4666.  
  4667. public loadbits(id)
  4668. {
  4669. new steamID[35];
  4670. get_user_authid( id , steamID , charsmax( steamID ) );
  4671.  
  4672. new data[64];
  4673. new bits[27][2];
  4674. new timestamp;
  4675. if(nvault_lookup(bitvault, steamID, data, charsmax(data), timestamp))
  4676. {
  4677. parse(data,
  4678. bits[0], charsmax(bits[]),
  4679. bits[1], charsmax(bits[]),
  4680. bits[2], charsmax(bits[]),
  4681. bits[3], charsmax(bits[]),
  4682. bits[4], charsmax(bits[]),
  4683. bits[5], charsmax(bits[]),
  4684. bits[6], charsmax(bits[]),
  4685. bits[7], charsmax(bits[]),
  4686. bits[8], charsmax(bits[]),
  4687. bits[9], charsmax(bits[]),
  4688. );
  4689. if(bits[0][0] == '1') set_bit(g_Knife0, id);
  4690. if(bits[1][0] == '1') set_bit(g_Knife1, id);
  4691. if(bits[2][0] == '1') set_bit(g_Knife2, id);
  4692. if(bits[3][0] == '1') set_bit(g_Knife3, id);
  4693. if(bits[4][0] == '1') set_bit(g_Knife4, id);
  4694. if(bits[5][0] == '1') set_bit(g_Knife5, id);
  4695. if(bits[6][0] == '1') set_bit(g_Knife6, id);
  4696. if(bits[7][0] == '1') set_bit(g_Knife7, id);
  4697. if(bits[8][0] == '1') set_bit(g_Knife8, id);
  4698. if(bits[9][0] == '1') set_bit(g_Knife9, id);
  4699. }
  4700. }
  4701. */
  4702. stock Punch_View(id, Float:ViewAngle[3])
  4703. entity_set_vector(id, EV_VEC_punchangle, ViewAngle)
  4704. public RemoveCam(id) {
  4705. cs_reset_user_model(id)
  4706. ColorChat(id, "You're ^3Model^4 is now reset.")
  4707. }
  4708. public RemoveSpeed(id) {
  4709. ResetMaxspeed(id)
  4710. ColorChat(id, "You're ^3Speed^4 is now normal.")
  4711. }
  4712. public RemoveGravity(id) {
  4713. entity_set_float(id, EV_FL_gravity, 1.0)
  4714. ColorChat(id, "You're ^3Gravity^4 is now normal.")
  4715. }
  4716. public RemoveStealth(id) {
  4717. fm_set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 255)
  4718. ColorChat(id, "You are now^3 visible.")
  4719. }
  4720. public RemoveGodmode(id) {
  4721. fm_set_user_godmode(id)
  4722. ColorChat(id, "You're ^3Godmode^4 is now 0.")
  4723. }
  4724. public RemoveNoclip(id) {
  4725. fm_set_user_noclip(id)
  4726. ColorChat(id, "You're ^3Noclip^4 is now 0.")
  4727. }
  4728. public RemoveFootsteps(id) {
  4729. footstep[id] = false
  4730. ColorChat(id, "Now Hear your ^3footsteps^1.")
  4731. }
  4732. public ShowSong(id) client_cmd(id, "mp3 play sound/Extreme-Jail/JB_Connecting.mp3" )
  4733. public spksecond() client_cmd(0, "spk ^"vox/seconds^"")
  4734. public reset_pick(id) can_pickup[id] = true
  4735. public _ShowDelay(id) --send_delay[id]
  4736.  
  4737. stock ColorChat(index, const Msg[], {Float, Sql, Result,_}:...) {
  4738. new Buffer[190], Buffer2[192]
  4739. formatex(Buffer2, sizeof(Buffer2)-1, "^3[^1 ליי'ג ^3]^1 %s", Msg)
  4740. vformat(Buffer, sizeof(Buffer)-1, Buffer2, 3)
  4741. if(!index) {
  4742. for (new i = 1; i <= g_max_clients; i++) {
  4743. if(!is_user_connected(i)) continue
  4744. message_begin(MSG_ONE_UNRELIABLE, g_iMsgSayText,_, i)
  4745. write_byte(i)
  4746. write_string(Buffer)
  4747. message_end()
  4748. }
  4749. } else {
  4750. if(!is_user_connected(index)) return
  4751. message_begin(MSG_ONE_UNRELIABLE, g_iMsgSayText,_, index)
  4752. write_byte(index)
  4753. write_string(Buffer)
  4754. message_end()
  4755. }
  4756. }
  4757. stock bool:check_points(index,amount)
  4758. return playerpoints[index] >= amount ? true:false;
  4759.  
  4760. print_message(id, msg[]) {
  4761. message_begin(MSG_ONE, g_iMsgSayText, {0,0,0}, id)
  4762. write_byte(id)
  4763. write_string(msg)
  4764. message_end()
  4765. }
  4766. public TeamCount(&ct, &t)
  4767. {
  4768. for(new id=1; id <= g_max_clients; id++) {
  4769. if(!is_user_connected(id) || !is_user_alive(id))
  4770. continue
  4771. if(cs_get_user_team(id) == CS_TEAM_T)
  4772. t++
  4773. else if(cs_get_user_team(id) == CS_TEAM_CT)
  4774. ct++
  4775. }
  4776. }
  4777. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
  4778. *{\\ rtf1\\ fbidis\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil\\ fcharset0 Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ ltrpar\\ lang14337\\ f0\\ fs16 \n\\ par }
  4779. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement