P1xeL

Untitled

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