Skocz do zawartości

Nowy szablon forum

mygo.pl

Stworzyliśmy dla Was nowy wygląd forum. Z pewnością znajdziesz rzeczy, które wg Ciebie mogą zostać zmienione - wspomnij o tym w specjalnym wątku.

Czytaj więcej

Jak założyć własną sieć

serwerów CS

Zastanawiasz się nad prowadzeniem własnej sieci serwerów? Przeczytaj podstawowe informacje, na które należy zwrócić uwagę, przy takim projekcie.

Czytaj więcej

Tworzymy spis sieci

dodaj swoją

Dodaj sieć do której należysz, pozwoli to na promocję i budowę ogólnopolskiej bazy sieci CS.

Czytaj więcej

MYGO.pl

RSSy
  • Postów

    28408
  • Dołączył

  • Ostatnia wizyta

    nigdy
  • Wygrane w rankingu

    11

Ostatnia wygrana MYGO.pl w dniu 12 Lipca 2019

Użytkownicy przyznają MYGO.pl punkty reputacji!

O MYGO.pl

  • Urodziny 06.07.2016

Informacje o mnie

  • Imię
    RSS Plugins
  • Skąd
    RSS Plugins
  • Płeć
    Mężczyzna
  • Zawód
    RSS Plugins

Kontakt

Ostatnie wizyty

18845 wyświetleń profilu

Osiągnięcia MYGO.pl

Nowicjusz

Nowicjusz (1/14)

51

Reputacja

  1. Description:Place up to 30 slot machines on the map for players to play.Admin can type !sm to use the slot machine install menu.2 sp file for EN and CN language.I learned enum sturct and arraylist,so i did this project for practise...It took me about a month to complete this project.(I need work daytime:cry:) Feature list:Custom Models by me and Sounds (you may need download zip to watch them)Press E use.HP -1 each time used.Reward HP when 2 or 3 same Icons appear.Slot machine config file is saved in path "addons/sourcemod/data/slotmachines/"mapname".txt"Config will auto load when round start. Install:Download the zip and Unzip. Put the vpk file into the addons folder.Don't forget install the plugin. Media: Attachment 204429 Video: https://www.youtube.com/watch?v=Q4HqfW_maeM Reward list: 🍒 * 2: 1HP, * 3: 5HP 🍏 * 2: 2HP, * 3: 6HP 🍋 * 2: 3HP, * 3: 7HP 🍊 * 2: 4HP, * 3: 8HP 🍇 * 2: 5HP, * 3: 9HP ⭐ * 2: 6HP, * 3: 10HP 💎 * 2: 7HP, * 3: 11HP 7 * 2: 10HP, * 3: 20HP Changelog: Quote: 2024-05-24 (v1.2.1) * Plugin Release Attached Thumbnails Attached Files Get Plugin or Get Source (kzSMachine1.2.1CN.sp - 41.3 KB) Get Plugin or Get Source (kzSMachine1.2.1EN.sp - 40.0 KB) Model&Sound.zip (234.0 KB) Wyświetl pełny artykuł
  2. Hello! I wanna ask that does anyone know any type of Multi-Lingual advertiser or chat auto-responder? Like if the player has set their lang to "EN" it should show english advertisements, but if its something else, it should show that language's advertisements I would appreciate it! Przeczytaj cały wpis
  3. MYGO.pl

    RSS-del-

    Accidentally posted twice! Sorry! Przeczytaj cały wpis
  4. I'll pay via PayPal to anyone who can create a menu to handle this plugin like the amx_super-menu from the AMX-Super-5.0.2 project. PHP Code: #pragma semicolon 1 #include <amxmodx> #include <reapi> enum eActions { ACTION_HEAL, ACTION_ARMOR, ACTION_WEAPON, ACTION_SPEED, ACTION_GODMODE, ACTION_NOCLIP, ACTION_UNAMMO, ACTION_FIRE, ACTION_INVISIBLE, ACTION_MULTIJUMP, ACTION_FREEZE, ACTION_SLAY2, ACTION_BURY, ACTION_UNBURY, ACTION_DISARM, ACTION_ROCKET, ACTION_REVIVE, ACTION_QUIT, ACTION_FLASH, ACTION_DRUG, ACTION_GLOW, ACTION_TELEPORT, ACTION_GIVEMONEY, ACTION_TAKEMONEY, ACTION_UBERSLAP, ACTION_USERORIGIN, ACTION_HRESPAWN, ACTION_TEAM, ACTION_SWAP, ACTION_PASS, ACTION_NOPASS, ACTION_EXTEND, ACTION_GLOWCOLORS, ACTION_TEAMSWAP, ACTION_ALLTALK, ACTION_GRAVITY }; enum eFeatures { cmd[32], neededargs, eActions:action, action_access, description[128], }; new const g_Actions[][eFeatures] = { {"amx_heal", 3, ACTION_HEAL, ADMIN_LEVEL_A, "<nick, #userid, authid or @team> <HP to give>"}, {"amx_armor", 3, ACTION_ARMOR, ADMIN_LEVEL_A, "<nick, #userid, authid or @team> <ARMOR to give>"}, {"amx_weapon", 3, ACTION_WEAPON, ADMIN_LEVEL_C, "<nick, #userid, authid or @team> <Weapon #>"}, {"amx_speed", 3, ACTION_SPEED, ADMIN_LEVEL_C, "<nick, #userid, authid or @team> [Speed #]"}, {"amx_godmode", 3, ACTION_GODMODE, ADMIN_LEVEL_C, "<nick, #userid, authid or @team> [0|1]"}, {"amx_noclip", 3, ACTION_NOCLIP, ADMIN_LEVEL_C, "<nick, #userid, authid or @team> [0|1]"}, {"amx_unammo", 3, ACTION_UNAMMO, ADMIN_LEVEL_C, "<nick, #userid, authid or @team> [0|1]"}, {"amx_fire", 3, ACTION_FIRE, ADMIN_LEVEL_A, "<nick, #userid, authid or @team> [0|1]"}, {"amx_invisible", 3, ACTION_INVISIBLE, ADMIN_LEVEL_A, "<nick, #userid, authid or @team> [0|1]"}, {"amx_multijump", 3, ACTION_MULTIJUMP, ADMIN_LEVEL_A, "<nick, #userid, authid or @team> [0|1]"}, {"amx_doublejump", 3, ACTION_MULTIJUMP, ADMIN_LEVEL_A, "<nick, #userid, authid or @team> [0|1]"}, {"amx_freeze", 3, ACTION_FREEZE, ADMIN_LEVEL_A, "<nick, #userid, authid or @team> [0|1]"}, {"amx_slay2", 2, ACTION_SLAY2, ADMIN_LEVEL_A, "<nick, #userid, authid or @team> [2-Blood|3-Explode]"}, {"amx_bury", 2, ACTION_BURY, ADMIN_LEVEL_B, "<nick, #userid, authid or @team>"}, {"amx_unbury", 2, ACTION_UNBURY, ADMIN_LEVEL_A, "<nick, #userid, authid or @team>"}, {"amx_disarm", 2, ACTION_DISARM, ADMIN_LEVEL_A, "<nick, #userid, authid or @team>"}, {"amx_rocket", 2, ACTION_ROCKET, ADMIN_LEVEL_A, "<nick, #userid, authid or @team>"}, {"amx_revive", 2, ACTION_REVIVE, ADMIN_LEVEL_A, "<nick, #userid, authid or @team>"}, {"amx_quit", 2, ACTION_QUIT, ADMIN_LEVEL_A, "<nick, #userid, authid or @team>"}, {"amx_flash", 2, ACTION_FLASH, ADMIN_LEVEL_A, "<nick, #userid, authid or @team>"}, {"amx_drug", 2, ACTION_DRUG, ADMIN_LEVEL_A, "<nick, #userid, authid or @team>"}, {"amx_glow", 3, ACTION_GLOW, ADMIN_LEVEL_A, "<nick, #userid, authid or @team> <color> (or) <rrr> <ggg> <bbb> <aaa>"}, {"amx_teleport", 2, ACTION_TELEPORT, ADMIN_LEVEL_A, "<nick, #userid or authid> [x] [y] [z]"}, {"amx_givemoney", 3, ACTION_GIVEMONEY, ADMIN_LEVEL_C, "<nick, #userid or authid> <amount>"}, {"amx_takemoney", 3, ACTION_TAKEMONEY, ADMIN_LEVEL_C, "<nick, #userid or authid> <amount>"}, {"amx_uberslap", 2, ACTION_UBERSLAP, ADMIN_LEVEL_A, "<nick, #userid or authid>"}, {"amx_userorigin", 2, ACTION_USERORIGIN, ADMIN_LEVEL_A, "<nick, #userid or authid>"}, {"amx_hrespawn", 2, ACTION_HRESPAWN, ADMIN_LEVEL_A, "<nick, #userid or authid>"}, {"amx_team", 3, ACTION_TEAM, ADMIN_LEVEL_A, "<name> <CT/T/Spec>"}, {"amx_transfer", 3, ACTION_TEAM, ADMIN_LEVEL_A, "<name> <CT/T/Spec>"}, {"amx_swap", 3, ACTION_SWAP, ADMIN_LEVEL_A, "<name 1> <name 2>"}, {"amx_pass", 2, ACTION_PASS, ADMIN_LEVEL_A, "<server password> - Sets the server password"}, {"amx_nopass", 1, ACTION_NOPASS, ADMIN_LEVEL_A, "Removes the server password"}, {"amx_extend", 2, ACTION_EXTEND, ADMIN_LEVEL_A, "<added time to extend>"}, {"amx_glowcolors", 1, ACTION_GLOWCOLORS, ADMIN_LEVEL_A, "shows a list of colors for amx_glow and amx_glow2"}, {"amx_teamswap", 1, ACTION_TEAMSWAP, ADMIN_LEVEL_A, "Swaps 2 teams with each other"}, {"amx_alltalk", 2, ACTION_ALLTALK, ADMIN_LEVEL_A, "<alltalk #>"}, {"amx_gravity", 2, ACTION_GRAVITY, ADMIN_LEVEL_A, "<gravity #>"} }; enum _:eVariables { ScreenFade, SetFOV, Damage, DeathMsg, ScoreInfo, Hudsync, sv_gravity, sv_password, mp_timelimit, sv_alltalk, steam1, blueflare2, white, lgtning, muzzleflash, zbeam5, additional_jumps, dj_trail_life, dj_trail_size, dj_trail_brightness, extendmax, extendtime, Float:auto_double_jump_velocity, Float:flTrailTime[MAX_CLIENTS + 1], PlayerJump[MAX_CLIENTS + 1], PlayerCatch[MAX_CLIENTS + 1], PlayerIceCube[MAX_CLIENTS + 1], Speed[MAX_CLIENTS + 1], modelindex } new g_iVariables[eVariables]; enum _:eBoolVariables { flashsound, bulletdamage, reviveafterteamswap, revdefaultweapon, allowcatchfire, auto_double_jump, dj_trail, dj_trail_effect, Unammo[MAX_CLIENTS + 1], Fire[MAX_CLIENTS + 1], DoubleJump[MAX_CLIENTS + 1], Trail[MAX_CLIENTS + 1] } new bool:g_blVariables[eBoolVariables]; enum _:eSounds { thunder_clap, rocketfire1, headshot2, rocket1, flashbang2, flameburst, scream07 }; new const g_szSounds[eSounds][] = { "ambience/thunder_clap.wav", "weapons/rocketfire1.wav", "weapons/headshot2.wav", "weapons/rocket1.wav", "weapons/flashbang-2.wav", "ambience/flameburst1.wav", "scientist/scream07.wav" }; const MAX_COLORS = 30; new const Float:g_flColors[MAX_COLORS][] = { {255.0,0.0,0.0},{255.0,190.0,190.0},{165.0,0.0,0.0},{255.0,100.0,100.0},{0.0,0.0,255.0},{0.0,0.0,136.0},{95.0,200.0,255.0},{0.0,150.0,255.0}, {0.0,255.0,0.0},{180.0,255.0,175.0},{0.0,155.0,0.0},{150.0,63.0,0.0},{205.0,123.0,64.0},{255.0,255.0,255.0},{255.0,255.0,0.0},{189.0,182.0,0.0}, {255.0,255.0,109.0},{255.0,150.0,0.0},{255.0,190.0,90.0},{222.0,110.0,0.0},{243.0,138.0,255.0},{255.0,0.0,255.0},{150.0,0.0,150.0},{100.0,0.0,100.0}, {200.0,0.0,0.0},{220.0,220.0,0.0},{192.0,192.0,192.0},{190.0,100.0,10.0},{114.0,114.0,114.0},{0.0,0.0,0.0} }; new const g_szColors[MAX_COLORS][] = { "red","pink","darkred","lightred","blue","darkblue","lightblue","aqua", "green","lightgreen","darkgreen","brown","lightbrown","white","yellow","darkyellow", "lightyellow","orange","lightorange","darkorange","lightpurple","purple","darkpurple","violet", "maroon","gold","silver","bronze","grey","off" }; enum _:eTaskId { TASKID_FIRE1, TASKID_FIRE2, TASKID_TRAIL }; new const g_szIceModel[] = "models/ras_freezemodel.mdl"; new Float:flHRespawn_Origin[MAX_CLIENTS + 1][3], Float:g_flSavedOrigin[MAX_CLIENTS + 1][3]; public plugin_init() { register_plugin("ReAmx_Super", "1.8", "PurposeLess"); register_dictionary("reamx_super.txt"); register_clcmd("say /admin", "@clcmd_admin"); register_clcmd("say /admins", "@clcmd_admin"); for(new iAction = 0; iAction < sizeof(g_Actions); iAction++) { register_concmd(g_Actions[iAction][cmd], "@call_function", g_Actions[iAction][action], g_Actions[iAction][description], .FlagManager = 0); } register_event("CurWeapon", "@event_curweapon", "be", "1=1", "3=1"); RegisterHookChain(RG_CBasePlayer_Spawn, "@CBasePlayer_Spawn_Post", .post=true); RegisterHookChain(RG_CBasePlayer_Killed, "@CBasePlayer_Killed_Post", .post=true); RegisterHookChain(RG_CBasePlayer_TakeDamage, "@CBasePlayer_TakeDamage_Post", .post=true); RegisterHookChain(RG_CBasePlayer_ResetMaxSpeed, "@CBasePlayer_ResetMaxSpeed_Pre", .post=false); RegisterHookChain(RG_CBasePlayer_Jump, "@CBasePlayer_Jump_Pre", .post=false); bind_pcvar_num(create_cvar("reamx_super_extendmax", "9"), g_blVariables[extendmax]); bind_pcvar_num(create_cvar("reamx_super_extendtime", "15"), g_blVariables[extendtime]); bind_pcvar_num(create_cvar("reamx_super_flashsound", "1", _, _, true, 0.0, true, 1.0), g_blVariables[flashsound]); bind_pcvar_num(create_cvar("reamx_super_bulletdamage", "1", _, _, true, 0.0, true, 1.0), g_blVariables[bulletdamage]); bind_pcvar_num(create_cvar("reamx_super_reviveafterteamswap", "1", _, _, true, 0.0, true, 1.0), g_blVariables[reviveafterteamswap]); bind_pcvar_num(create_cvar("reamx_super_revdefaultweapon", "1", _, _, true, 0.0, true, 1.0), g_blVariables[revdefaultweapon]); bind_pcvar_num(create_cvar("reamx_super_allowcatchfire", "1", _, _, true, 0.0, true, 1.0), g_blVariables[allowcatchfire]); bind_pcvar_num(create_cvar("reamx_super_additional_jumps", "1"), g_iVariables[additional_jumps]); bind_pcvar_num(create_cvar("reamx_super_auto_double_jump", "0", _, _, true, 0.0, true, 1.0), g_blVariables[auto_double_jump]); bind_pcvar_num(create_cvar("reamx_super_dj_trail", "0", _, _, true, 0.0, true, 1.0), g_blVariables[dj_trail]); bind_pcvar_num(create_cvar("reamx_super_dj_trail_effect", "1", _, _, true, 0.0, true, 1.0), g_blVariables[dj_trail_effect]); bind_pcvar_num(create_cvar("reamx_super_dj_trail_life", "2"), g_iVariables[dj_trail_life]); bind_pcvar_num(create_cvar("reamx_super_dj_trail_size", "2"), g_iVariables[dj_trail_size]); bind_pcvar_num(create_cvar("reamx_super_dj_trail_brightness", "150"), g_iVariables[dj_trail_brightness]); bind_pcvar_float(create_cvar("reamx_super_auto_double_jump_velocity", "350.0"), g_iVariables[auto_double_jump_velocity]); set_pcvar_num(get_cvar_pointer("sv_maxspeed"), 2000); g_iVariables[ScreenFade] = get_user_msgid("ScreenFade"); g_iVariables[SetFOV] = get_user_msgid("SetFOV"); g_iVariables[Damage] = get_user_msgid("Damage"); g_iVariables[DeathMsg] = get_user_msgid("DeathMsg"); g_iVariables[ScoreInfo] = get_user_msgid("ScoreInfo"); g_iVariables[Hudsync] = CreateHudSyncObj(); g_iVariables[sv_gravity] = get_cvar_pointer("sv_gravity"); g_iVariables[sv_password] = get_cvar_pointer("sv_password"); g_iVariables[mp_timelimit] = get_cvar_pointer("mp_timelimit"); g_iVariables[sv_alltalk] = get_cvar_pointer("sv_alltalk"); } public plugin_precache() { g_iVariables[steam1] = precache_model("sprites/steam1.spr"); g_iVariables[blueflare2] = precache_model("sprites/blueflare2.spr"); g_iVariables[white] = precache_model("sprites/white.spr"); g_iVariables[lgtning] = precache_model("sprites/lgtning.spr"); g_iVariables[muzzleflash] = precache_model("sprites/muzzleflash.spr"); g_iVariables[zbeam5] = precache_model("sprites/zbeam5.spr"); g_iVariables[modelindex] = precache_model(g_szIceModel); for(new i = 0; i < sizeof(g_szSounds); i++) { precache_sound(g_szSounds[i]); } } public client_disconnected(pPlayer) { g_iVariables[PlayerJump][pPlayer] = 0; g_blVariables[Fire][pPlayer] = false; g_blVariables[DoubleJump][pPlayer] = false; g_blVariables[PlayerCatch][pPlayer] = false; g_iVariables[Speed][pPlayer] = 0; remove_task(pPlayer); remove_task(pPlayer + TASKID_FIRE1); remove_task(pPlayer + TASKID_FIRE2); if(g_blVariables[dj_trail]) { remove_task(pPlayer + TASKID_TRAIL); g_blVariables[Trail][pPlayer] = false; } if(!is_nullent(g_iVariables[PlayerIceCube][pPlayer])) { set_entvar(g_iVariables[PlayerIceCube][pPlayer], var_flags, FL_KILLME); } } @call_function(const pPlayer, const eActions:iAction, const iCid) { if(~get_user_flags(pPlayer) & g_Actions[iAction][action_access]) { console_print(pPlayer, "%L", LANG_PLAYER, "NO_ACC_COM"); return PLUGIN_HANDLED; } if(read_argc() < g_Actions[iAction][neededargs]) { console_print(pPlayer, "%L: %s %s", LANG_PLAYER, "USAGE", g_Actions[iAction][cmd], g_Actions[iAction][description]); return PLUGIN_HANDLED; } enum VariableDescription { VD_TEAM, VD_PLAYER, VD_ONLYALIVE, VD_IMMUNITY, VD_IGNORESTEAM, VD_MORENEGATIVE, VD_MOREZERO, VD_ONLYONOFF_ARG, VD_ONLYONOFF_ARG2 }; new bool:iVariables[VariableDescription]; switch(iAction) { case ACTION_HEAL, ACTION_ARMOR, ACTION_WEAPON: { iVariables[VD_TEAM] = true; iVariables[VD_PLAYER] = true; iVariables[VD_ONLYALIVE] = true; iVariables[VD_MOREZERO] = true; } case ACTION_GODMODE, ACTION_NOCLIP, ACTION_UNAMMO, ACTION_INVISIBLE, ACTION_MULTIJUMP, ACTION_FREEZE: { iVariables[VD_TEAM] = true; iVariables[VD_PLAYER] = true; iVariables[VD_ONLYALIVE] = true; iVariables[VD_ONLYONOFF_ARG2] = true; } case ACTION_DRUG, ACTION_GLOW: { iVariables[VD_TEAM] = true; iVariables[VD_PLAYER] = true; iVariables[VD_ONLYALIVE] = true; } case ACTION_GIVEMONEY, ACTION_TAKEMONEY: { iVariables[VD_TEAM] = true; iVariables[VD_PLAYER] = true; iVariables[VD_MOREZERO] = true; } case ACTION_FIRE: { iVariables[VD_TEAM] = true; iVariables[VD_PLAYER] = true; iVariables[VD_ONLYALIVE] = true; iVariables[VD_IMMUNITY] = true; iVariables[VD_ONLYONOFF_ARG2] = true; } case ACTION_BURY, ACTION_UNBURY, ACTION_DISARM, ACTION_SLAY2, ACTION_ROCKET, ACTION_FLASH, ACTION_TELEPORT: { iVariables[VD_TEAM] = true; iVariables[VD_PLAYER] = true; iVariables[VD_ONLYALIVE] = true; iVariables[VD_IMMUNITY] = true; } case ACTION_REVIVE: { iVariables[VD_TEAM] = true; iVariables[VD_PLAYER] = true; iVariables[VD_IMMUNITY] = true; } case ACTION_USERORIGIN, ACTION_UBERSLAP: { iVariables[VD_PLAYER] = true; iVariables[VD_ONLYALIVE] = true; iVariables[VD_IMMUNITY] = true; } case ACTION_QUIT: { iVariables[VD_PLAYER] = true; iVariables[VD_ONLYALIVE] = true; iVariables[VD_IMMUNITY] = true; iVariables[VD_IGNORESTEAM] = true; } case ACTION_TEAM, ACTION_SWAP, ACTION_HRESPAWN: { iVariables[VD_PLAYER] = true; } case ACTION_SPEED: { iVariables[VD_TEAM] = true; iVariables[VD_PLAYER] = true; iVariables[VD_ONLYALIVE] = true; iVariables[VD_MORENEGATIVE] = true; } case ACTION_ALLTALK: { iVariables[VD_ONLYONOFF_ARG] = true; } } new szArg[32], szArg2[32], iArg, iArg2; read_argv(1, szArg, charsmax(szArg)); read_argv(2, szArg2, charsmax(szArg2)); iArg = str_to_num(szArg); iArg2 = str_to_num(szArg2); if(iVariables[VD_MORENEGATIVE] && iArg2 < 0) { console_print(pPlayer, "%L", LANG_PLAYER, "REAMX_SUPER_AMOUNT_GREATER"); return PLUGIN_HANDLED; } if(iVariables[VD_MOREZERO] && iArg2 <= 0) { console_print(pPlayer, "%L", LANG_PLAYER, "REAMX_SUPER_AMOUNT_GREATER"); return PLUGIN_HANDLED; } if(iVariables[VD_ONLYONOFF_ARG]) { iArg = clamp(iArg, 0, 1); } if(iVariables[VD_ONLYONOFF_ARG2]) { iArg2 = clamp(iArg2, 0, 1); } if(iVariables[VD_TEAM]) { if(szArg[0] == '@' && !szArg[4]) { new iPlayers[MAX_CLIENTS], szFlags[3], iNum; switch(szArg[1]) { case 'T','t': { szFlags = iVariables[VD_ONLYALIVE] ? "ae" : "e"; copy(szArg[1], charsmax(szArg), "TERRORIST"); } case 'C','c': { szFlags = iVariables[VD_ONLYALIVE] ? "ae" : "e"; } case 'A','a': { szFlags = iVariables[VD_ONLYALIVE] ? "a" : ""; } } get_players(iPlayers, iNum, szFlags, szArg[1]); if(!iNum) { console_print(pPlayer, "%L", LANG_PLAYER, "REAMX_SUPER_NO_PLAYERS"); return PLUGIN_HANDLED; } for(new i = 0, pId; i < iNum; i++) { pId = iPlayers[i]; if(iVariables[VD_IMMUNITY] && (get_user_flags(pId) & ADMIN_IMMUNITY && pPlayer != pId)) { continue; } @call_function_handler(iAction, pPlayer, pId, szArg, szArg2, iArg, iArg2, true, false); return PLUGIN_HANDLED; } } } if(iVariables[VD_PLAYER]) { new pId = cmd_target(pPlayer, szArg, bool:iVariables[VD_ONLYALIVE], bool:iVariables[VD_IMMUNITY]); if(!pId) { return PLUGIN_HANDLED; } if(iVariables[VD_IGNORESTEAM] && is_user_steam(pId)) { console_print(pPlayer, "%L", LANG_PLAYER, "REAMX_SUPER_NO_KICK_STEAM"); return PLUGIN_HANDLED; } @call_function_handler(iAction, pPlayer, pId, szArg, szArg2, iArg, iArg2, false, true); return PLUGIN_HANDLED; } @call_function_handler(iAction, pPlayer, 0, szArg, szArg2, iArg, iArg2, false, false); return PLUGIN_HANDLED; } @call_function_handler(const eActions:iAction, const pPlayer, const pId, const szArg[], const szArg2[], const iArg, const iArg2, const bool:blTeam, const bool:blNoArg2) { switch(iAction) { case ACTION_HEAL: { set_entvar(pId, var_health, Float:get_entvar(pId, var_health) + float(iArg2)); send_print_arg(pPlayer, pId, szArg, iArg2, blTeam, "REAMX_SUPER_HEAL_TEAM_P", "REAMX_SUPER_HEAL_TEAM_C", "REAMX_SUPER_HEAL_PLAYER_P", "REAMX_SUPER_HEAL_PLAYER_C"); } case ACTION_ARMOR: { set_entvar(pId, var_armorvalue, Float:get_entvar(pId, var_armorvalue) + float(iArg2)); send_print_arg(pPlayer, pId, szArg, iArg2, blTeam, "REAMX_SUPER_ARMOR_TEAM_P", "REAMX_SUPER_ARMOR_TEAM_C", "REAMX_SUPER_ARMOR_PLAYER_P", "REAMX_SUPER_ARMOR_PLAYER_C"); } case ACTION_WEAPON: { rg_give_weapon(pId, iArg2); send_print_arg(pPlayer, pId, szArg, iArg2, blTeam, "REAMX_SUPER_WEAPON_TEAM_P", "REAMX_SUPER_WEAPON_TEAM_C", "REAMX_SUPER_WEAPON_PLAYER_P", "REAMX_SUPER_WEAPON_PLAYER_C"); } case ACTION_GODMODE: { set_entvar(pId, var_takedamage, iArg2 ? DAMAGE_NO : DAMAGE_AIM); send_print_arg(pPlayer, pId, szArg, iArg2, blTeam, "REAMX_SUPER_GODMODE_TEAM_P", "REAMX_SUPER_GODMODE_TEAM_C", "REAMX_SUPER_GODMODE_PLAYER_P", "REAMX_SUPER_GODMODE_PLAYER_C"); } case ACTION_NOCLIP: { set_entvar(pId, var_movetype, iArg2 ? MOVETYPE_NOCLIP : MOVETYPE_WALK); send_print_arg(pPlayer, pId, szArg, iArg2, blTeam, "REAMX_SUPER_NOCLIP_TEAM_P", "REAMX_SUPER_NOCLIP_TEAM_C", "REAMX_SUPER_NOCLIP_PLAYER_P", "REAMX_SUPER_NOCLIP_PLAYER_C"); } case ACTION_SPEED: { g_iVariables[Speed][pPlayer] = iArg2; if(!iArg2) { rg_reset_maxspeed(pPlayer); } else { new Float:flSpeed = 250.0 + (50.0 * float(iArg2)); set_entvar(pPlayer, var_maxspeed, flSpeed); } send_print_arg(pPlayer, pId, szArg, iArg2, blTeam, "REAMX_SUPER_SPEED_TEAM_P", "REAMX_SUPER_SPEED_TEAM_C", "REAMX_SUPER_SPEED_PLAYER_P", "REAMX_SUPER_SPEED_PLAYER_C"); } case ACTION_GIVEMONEY: { rg_add_account(pId, iArg2, AS_ADD); send_print_arg(pPlayer, pId, szArg, iArg2, blTeam, "REAMX_SUPER_GIVEMONEY_TEAM_P", "REAMX_SUPER_GIVEMONEY_TEAM_C", "REAMX_SUPER_GIVEMONEY_PLAYER_P", "REAMX_SUPER_GIVEMONEY_PLAYER_C"); } case ACTION_TAKEMONEY: { rg_add_account(pId, -iArg2, AS_ADD); send_print_arg(pPlayer, pId, szArg, iArg2, blTeam, "REAMX_SUPER_TAKEMONEY_TEAM_P", "REAMX_SUPER_TAKEMONEY_TEAM_C", "REAMX_SUPER_TAKEMONEY_PLAYER_P", "REAMX_SUPER_TAKEMONEY_PLAYER_C"); } case ACTION_UNAMMO: { g_blVariables[Unammo][pId] = bool:iArg2; send_print_arg(pPlayer, pId, szArg, iArg2, blTeam, "REAMX_SUPER_UNAMMO_TEAM_P", "REAMX_SUPER_UNAMMO_TEAM_C", "REAMX_SUPER_UNAMMO_PLAYER_P", "REAMX_SUPER_UNAMMO_PLAYER_C"); } case ACTION_ALLTALK: { set_pcvar_num(g_iVariables[sv_alltalk], iArg); send_print_onlypc(pPlayer, iArg, "REAMX_SUPER_ALLTALK_P", "REAMX_SUPER_ALLTALK_C"); } case ACTION_GRAVITY: { set_pcvar_num(g_iVariables[sv_gravity], iArg); send_print_onlypc(pPlayer, iArg, "REAMX_SUPER_GRAVITY_P", "REAMX_SUPER_GRAVITY_C"); } case ACTION_BURY: { rg_bury_player(pId); send_print_onlynames(pPlayer, pId, szArg, blTeam, "REAMX_SUPER_BURY_TEAM_P", "REAMX_SUPER_BURY_TEAM_C", "REAMX_SUPER_BURY_PLAYER_P", "REAMX_SUPER_BURY_PLAYER_C"); } case ACTION_UNBURY: { rg_unbury_player(pId); send_print_onlynames(pPlayer, pId, szArg, blTeam, "REAMX_SUPER_UNBURY_TEAM_P", "REAMX_SUPER_UNBURY_TEAM_C", "REAMX_SUPER_UNBURY_PLAYER_P", "REAMX_SUPER_UNBURY_PLAYER_C"); } case ACTION_DISARM: { rg_remove_all_items(pId); rg_give_item(pId, "weapon_knife"); send_print_onlynames(pPlayer, pId, szArg, blTeam, "REAMX_SUPER_DISARM_TEAM_P", "REAMX_SUPER_DISARM_TEAM_C", "REAMX_SUPER_DISARM_PLAYER_P", "REAMX_SUPER_DISARM_PLAYER_C"); } case ACTION_SLAY2: { slay_player(pId, iArg2); send_print_onlynames(pPlayer, pId, szArg, blTeam, "REAMX_SUPER_SLAY2_TEAM_P", "REAMX_SUPER_SLAY2_TEAM_C", "REAMX_SUPER_SLAY2_PLAYER_P", "REAMX_SUPER_SLAY2_PLAYER_C"); } case ACTION_ROCKET: { rg_rocket_player(pId); send_print_onlynames(pPlayer, pId, szArg, blTeam, "REAMX_SUPER_ROCKET_TEAM_P", "REAMX_SUPER_ROCKET_TEAM_C", "REAMX_SUPER_ROCKET_PLAYER_P", "REAMX_SUPER_ROCKET_PLAYER_C"); } case ACTION_UBERSLAP: { set_task(0.1, "@uberslap_player", pId, .flags = "a", .repeat = 99); send_print_onlynames(pPlayer, pId, szArg, blTeam, "REAMX_SUPER_UBERSLAP_TEAM_P", "REAMX_SUPER_UBERSLAP_TEAM_C", "REAMX_SUPER_UBERSLAP_PLAYER_P", "REAMX_SUPER_UBERSLAP_PLAYER_C"); } case ACTION_REVIVE: { rg_give_default_items_func(pId); send_print_onlynames(pPlayer, pId, szArg, blTeam, "REAMX_SUPER_REVIVE_TEAM_P", "REAMX_SUPER_REVIVE_TEAM_C", "REAMX_SUPER_REVIVE_PLAYER_P", "REAMX_SUPER_REVIVE_PLAYER_C"); } case ACTION_QUIT: { client_cmd(pId, "quit"); rg_send_audio(0, g_szSounds[thunder_clap]); send_print_onlynames(pPlayer, pId, szArg, blTeam, "", "", "REAMX_SUPER_QUIT_PLAYER_P", "REAMX_SUPER_QUIT_PLAYER_C"); } case ACTION_DRUG: { rg_drug_player(pId); send_print_onlynames(pPlayer, pId, szArg, blTeam, "REAMX_SUPER_DRUG_TEAM_P", "REAMX_SUPER_DRUG_TEAM_C", "REAMX_SUPER_DRUG_PLAYER_P", "REAMX_SUPER_DRUG_PLAYER_C"); } case ACTION_FLASH: { flash_player(pId); send_print_onlynames(pPlayer, pId, szArg, blTeam, "REAMX_SUPER_FLASH_TEAM_P", "REAMX_SUPER_FLASH_TEAM_C", "REAMX_SUPER_FLASH_PLAYER_P", "REAMX_SUPER_FLASH_PLAYER_C"); } case ACTION_FREEZE: { if(iArg2) { freeze_player(pId); send_print_onlynames(pPlayer, pId, szArg, blTeam, "REAMX_SUPER_FREEZE_TEAM_P", "REAMX_SUPER_FREEZE_TEAM_C", "REAMX_SUPER_FREEZE_PLAYER_P", "REAMX_SUPER_FREEZE_PLAYER_C"); } else { unfreeze_player(pId); send_print_onlynames(pPlayer, pId, szArg, blTeam, "REAMX_SUPER_UNFREEZE_TEAM_P", "REAMX_SUPER_UNFREEZE_TEAM_C", "REAMX_SUPER_UNFREEZE_PLAYER_P", "REAMX_SUPER_UNFREEZE_PLAYER_C"); } } case ACTION_USERORIGIN: { get_entvar(pPlayer, var_origin, g_flSavedOrigin[pPlayer]); console_print(pPlayer, "%L", LANG_PLAYER, "REAMX_SUPER_USERORIGIN", pId, g_flSavedOrigin[pPlayer][0], g_flSavedOrigin[pPlayer][1], g_flSavedOrigin[pPlayer][2]); } case ACTION_TELEPORT: { if(read_argc() > 2) { new szY[8], szZ[8]; read_argv(3, szY, charsmax(szY)); read_argv(4, szZ, charsmax(szZ)); g_flSavedOrigin[pPlayer][0] = float(iArg2); g_flSavedOrigin[pPlayer][1] = str_to_float(szY); g_flSavedOrigin[pPlayer][2] = str_to_float(szZ); } set_entvar(pId, var_origin, g_flSavedOrigin[pPlayer]); send_print_onlynames(pPlayer, pId, szArg, blTeam, "REAMX_SUPER_TELEPORT_TEAM_P", "REAMX_SUPER_TELEPORT_TEAM_C", "REAMX_SUPER_TELEPORT_PLAYER_P", "REAMX_SUPER_TELEPORT_PLAYER_C"); } case ACTION_PASS: { set_pcvar_string(g_iVariables[sv_password], szArg); send_print_onlypc(pPlayer, iArg2, "REAMX_SUPER_SET_PASSWORD_P", "REAMX_SUPER_SET_PASSWORD_C"); } case ACTION_NOPASS: { set_pcvar_string(g_iVariables[sv_password], ""); send_print_onlypc(pPlayer, iArg2, "REAMX_SUPER_REMOVE_PASSWORD_P", "REAMX_SUPER_REMOVE_PASSWORD_C"); } case ACTION_TEAM: { admin_transfer(pPlayer, pId, szArg2); } case ACTION_SWAP: { admin_swap(pPlayer, pId, szArg2); } case ACTION_EXTEND: { admin_extend(pPlayer, iArg); } case ACTION_GLOWCOLORS: { admin_glowcolors(pPlayer); } case ACTION_GLOW: { if(is_str_num(szArg2)) { new szArg3[32], szArg4[32], szArg5[32], Float:flColor[3], Float:flAmount; read_argv(3, szArg3, charsmax(szArg3)); read_argv(4, szArg4, charsmax(szArg4)); read_argv(5, szArg5, charsmax(szArg5)); flColor[0] = str_to_float(szArg2); flColor[1] = str_to_float(szArg3); flColor[2] = str_to_float(szArg4); flAmount = (szArg5[0] == EOS ? 255.0 : str_to_float(szArg5)); admin_glow(pPlayer, pId, blTeam, szArg, szArg2, true, flColor, flAmount); console_print(pPlayer, "YES [%f][%f][%f]", flColor[0], flColor[1], flColor[2]); } else { admin_glow(pPlayer, pId, blTeam, szArg, szArg2, false, {0.0,0.0,0.0}, 0.0); } } case ACTION_INVISIBLE: { set_entvar(pPlayer, var_effects, iArg2 ? get_entvar(pPlayer, var_effects) | EF_NODRAW : get_entvar(pPlayer, var_effects) & ~EF_NODRAW); send_print_arg(pPlayer, pId, szArg, iArg2, blTeam, "REAMX_SUPER_INVISIBLE_TEAM_P", "REAMX_SUPER_INVISIBLE_TEAM_C", "REAMX_SUPER_INVISIBLE_PLAYER_P", "REAMX_SUPER_INVISIBLE_PLAYER_C"); } case ACTION_FIRE: { admin_fire(pId, iArg2); send_print_fire(pPlayer, pId, szArg, iArg2, blTeam, "REAMX_SUPER_FIRE_TEAM_P", "REAMX_SUPER_FIRE_TEAM_C", "REAMX_SUPER_FIRE_PLAYER_P", "REAMX_SUPER_FIRE_PLAYER_C"); } case ACTION_MULTIJUMP: { g_blVariables[DoubleJump][pId] = bool:iArg2; send_print_arg(pPlayer, pId, szArg, iArg2, blTeam, "REAMX_SUPER_DOUBLEJUMP_TEAM_P", "REAMX_SUPER_DOUBLEJUMP_TEAM_C", "REAMX_SUPER_DOUBLEJUMP_PLAYER_P", "REAMX_SUPER_DOUBLEJUMP_PLAYER_C"); } case ACTION_TEAMSWAP: { rg_swap_all_players(); rg_respawn_all_players(); client_print_color(0, 0, "%L", LANG_PLAYER, "REAMX_SUPER_TEAMSWAP_P", pPlayer); console_print(pPlayer, "%L", LANG_PLAYER, "REAMX_SUPER_TEAMSWAP_C"); } case ACTION_HRESPAWN: { if(is_user_alive(pId)) { console_print(pPlayer, "%L", LANG_PLAYER, "REAMX_SUPER_HRESPAWN_NO_ALIVE"); return; } rg_give_default_items_func(pId); set_entvar(pId, var_origin, flHRespawn_Origin[pId]); send_print_onlynames(pPlayer, pId, szArg, blTeam, "", "", "REAMX_SUPER_HRESPAWN_PLAYER_P", "REAMX_SUPER_HRESPAWN_PLAYER_C"); } } } rg_give_weapon(const pPlayer, const iWeapon) { switch(iWeapon) { case 1: { rg_give_item(pPlayer, "weapon_knife"); } case 11: { rg_give_user_weapon(pPlayer, WEAPON_GLOCK18, "weapon_glock18"); } case 12: { rg_give_user_weapon(pPlayer, WEAPON_USP, "weapon_usp"); } case 13: { rg_give_user_weapon(pPlayer, WEAPON_P228, "weapon_p228"); } case 14: { rg_give_user_weapon(pPlayer, WEAPON_DEAGLE, "weapon_deagle"); } case 15: { rg_give_user_weapon(pPlayer, WEAPON_FIVESEVEN, "weapon_fiveseven"); } case 16: { rg_give_user_weapon(pPlayer, WEAPON_ELITE, "weapon_elite"); } case 17: { rg_give_user_weapon(pPlayer, WEAPON_GLOCK18, "weapon_glock18"); rg_give_user_weapon(pPlayer, WEAPON_USP, "weapon_usp"); rg_give_user_weapon(pPlayer, WEAPON_P228, "weapon_p228"); rg_give_user_weapon(pPlayer, WEAPON_DEAGLE, "weapon_deagle"); rg_give_user_weapon(pPlayer, WEAPON_FIVESEVEN, "weapon_fiveseven"); rg_give_user_weapon(pPlayer, WEAPON_ELITE, "weapon_elite"); } case 21: { rg_give_user_weapon(pPlayer, WEAPON_M3, "weapon_m3"); } case 22: { rg_give_user_weapon(pPlayer, WEAPON_XM1014, "weapon_xm1014"); } case 31: { rg_give_user_weapon(pPlayer, WEAPON_TMP, "weapon_tmp"); } case 32: { rg_give_user_weapon(pPlayer, WEAPON_MAC10, "weapon_mac10"); } case 33: { rg_give_user_weapon(pPlayer, WEAPON_MP5N, "weapon_mp5navy"); } case 34: { rg_give_user_weapon(pPlayer, WEAPON_P90, "weapon_p90"); } case 35: { rg_give_user_weapon(pPlayer, WEAPON_UMP45, "weapon_ump45"); } case 40: { rg_give_user_weapon(pPlayer, WEAPON_FAMAS, "weapon_famas"); } case 41: { rg_give_user_weapon(pPlayer, WEAPON_GALIL, "weapon_galil"); } case 42: { rg_give_user_weapon(pPlayer, WEAPON_AK47, "weapon_ak47"); } case 43: { rg_give_user_weapon(pPlayer, WEAPON_M4A1, "weapon_m4a1"); } case 44: { rg_give_user_weapon(pPlayer, WEAPON_SG552, "weapon_sg552"); } case 45: { rg_give_user_weapon(pPlayer, WEAPON_AUG, "weapon_aug"); } case 46: { rg_give_user_weapon(pPlayer, WEAPON_SCOUT, "weapon_scout"); } case 47: { rg_give_user_weapon(pPlayer, WEAPON_SG550, "weapon_sg550"); } case 48: { rg_give_user_weapon(pPlayer, WEAPON_AWP, "weapon_awp"); } case 49: { rg_give_user_weapon(pPlayer, WEAPON_G3SG1, "weapon_g3sg1"); } case 51: { rg_give_user_weapon(pPlayer, WEAPON_M249, "weapon_m249"); } case 60: { rg_give_shield(pPlayer); rg_give_item(pPlayer, "item_assaultsuit"); rg_give_user_weapon(pPlayer, WEAPON_GLOCK, "weapon_glock"); rg_give_user_weapon(pPlayer, WEAPON_FLASHBANG, "weapon_flashbang"); rg_give_user_weapon(pPlayer, WEAPON_HEGRENADE, "weapon_hegrenade"); } case 61: { rg_give_shield(pPlayer); rg_give_item(pPlayer, "item_assaultsuit"); rg_give_user_weapon(pPlayer, WEAPON_GLOCK, "weapon_usp"); rg_give_user_weapon(pPlayer, WEAPON_FLASHBANG, "weapon_flashbang"); rg_give_user_weapon(pPlayer, WEAPON_HEGRENADE, "weapon_hegrenade"); } case 62: { rg_give_shield(pPlayer); rg_give_item(pPlayer, "item_assaultsuit"); rg_give_user_weapon(pPlayer, WEAPON_DEAGLE, "weapon_deagle"); rg_give_user_weapon(pPlayer, WEAPON_FLASHBANG, "weapon_flashbang"); rg_give_user_weapon(pPlayer, WEAPON_HEGRENADE, "weapon_hegrenade"); } case 63: { rg_give_shield(pPlayer); rg_give_item(pPlayer, "item_assaultsuit"); rg_give_user_weapon(pPlayer, WEAPON_FIVESEVEN, "weapon_fiveseven"); rg_give_user_weapon(pPlayer, WEAPON_FLASHBANG, "weapon_flashbang"); rg_give_user_weapon(pPlayer, WEAPON_HEGRENADE, "weapon_hegrenade"); } case 81:{ rg_give_item(pPlayer, "item_kevlar"); } case 82:{ rg_give_item(pPlayer, "item_assaultsuit"); } case 83:{ rg_give_user_weapon(pPlayer, WEAPON_HEGRENADE, "weapon_hegrenade"); } case 84:{ rg_give_user_weapon(pPlayer, WEAPON_FLASHBANG, "weapon_flashbang"); } case 85:{ rg_give_user_weapon(pPlayer, WEAPON_SMOKEGRENADE, "weapon_smokegrenade"); } case 86:{ rg_give_item(pPlayer, "item_thighpack"); } case 87:{ rg_give_shield(pPlayer); } case 88:{ for(new InventorySlotType:i = PRIMARY_WEAPON_SLOT, iWeapon; i < C4_SLOT; i++) { iWeapon = get_member(pPlayer, m_rgpPlayerItems, i); if(is_nullent(iWeapon)) { continue; } rg_set_user_bpammo(pPlayer, get_member(iWeapon, m_iId), rg_get_iteminfo(iWeapon, ItemInfo_iMaxAmmo1)); } } case 89:{ rg_give_user_weapon(pPlayer, WEAPON_HEGRENADE, "weapon_hegrenade"); rg_give_user_weapon(pPlayer, WEAPON_FLASHBANG, "weapon_flashbang"); rg_give_user_weapon(pPlayer, WEAPON_SMOKEGRENADE, "weapon_smokegrenade"); } case 91:{ rg_give_item(pPlayer, "weapon_c4"); } case 100:{ rg_give_item(pPlayer, "item_assaultsuit"); rg_give_user_weapon(pPlayer, WEAPON_AWP, "weapon_awp"); rg_give_user_weapon(pPlayer, WEAPON_DEAGLE, "weapon_deagle"); rg_give_user_weapon(pPlayer, WEAPON_HEGRENADE, "weapon_hegrenade"); rg_give_user_weapon(pPlayer, WEAPON_FLASHBANG, "weapon_flashbang"); rg_give_user_weapon(pPlayer, WEAPON_SMOKEGRENADE, "weapon_smokegrenade"); } } } rg_give_user_weapon(const pPlayer, const WeaponIdType:iNum, const szWeaponName[]) { if(rg_has_item_by_name(pPlayer, szWeaponName)) { new iWeapon = rg_find_weapon_bpack_by_name(pPlayer, szWeaponName); rg_set_user_bpammo(pPlayer, iNum, rg_get_iteminfo(iWeapon, ItemInfo_iMaxAmmo1)); } else { rg_set_user_bpammo(pPlayer, iNum, rg_get_iteminfo(rg_give_item(pPlayer, szWeaponName), ItemInfo_iMaxAmmo1)); } } rg_bury_player(const pPlayer) { new Float:flOrigin[3]; get_entvar(pPlayer, var_origin, flOrigin); flOrigin[2] -= 35.0; set_entvar(pPlayer, var_origin, flOrigin); } rg_unbury_player(const pPlayer) { new Float:flOrigin[3]; get_entvar(pPlayer, var_origin, flOrigin); flOrigin[2] += 35.0; set_entvar(pPlayer, var_origin, flOrigin); } rg_rocket_player(const pPlayer) { rh_emit_sound2(pPlayer, 0, CHAN_WEAPON, g_szSounds[rocketfire1]); set_entvar(pPlayer, var_maxspeed, 0.01); set_task(1.2, "@rocket_liftoff", pPlayer); } slay_player(const pPlayer, const iType) { new Float:flOrigin[3], Float:flOrigin2[3]; get_entvar(pPlayer, var_origin, flOrigin); flOrigin[2] -= 26.0; flOrigin2[0] = flOrigin[0] + 15.0; flOrigin2[1] = flOrigin[1] + 150.0; flOrigin2[2] = flOrigin[2] + 400.0; switch(iType) { case 1: { lightning(flOrigin2, flOrigin); rh_emit_sound2(pPlayer, 0, CHAN_ITEM, g_szSounds[thunder_clap]); } case 2:{ blood(flOrigin); rh_emit_sound2(pPlayer, 0, CHAN_ITEM, g_szSounds[headshot2]); } case 3: { explode(flOrigin); } } user_kill(pPlayer, 1); } lightning(const Float:iVec[3], const Float:iVec2[3]) { message_begin_f(MSG_BROADCAST, SVC_TEMPENTITY); { write_byte(0); write_coord_f(iVec[0]); write_coord_f(iVec[1]); write_coord_f(iVec[2]); write_coord_f(iVec2[0]); write_coord_f(iVec2[1]); write_coord_f(iVec2[2]); write_short(g_iVariables[lgtning]); write_byte(1); write_byte(5); write_byte(2); write_byte(20); write_byte(30); write_byte(200); write_byte(200); write_byte(200); write_byte(200); write_byte(200); } message_end(); message_begin_f(MSG_PVS, SVC_TEMPENTITY, iVec2); { write_byte(9); write_coord_f(iVec2[0]); write_coord_f(iVec2[1]); write_coord_f(iVec2[2]); } message_end(); message_begin_f(MSG_BROADCAST, SVC_TEMPENTITY, iVec2); { write_byte(5); write_coord_f(iVec2[0]); write_coord_f(iVec2[1]); write_coord_f(iVec2[2]); write_short(g_iVariables[steam1]); write_byte(10); write_byte(10); } message_end(); } blood(const Float:iVec[3]) { message_begin_f(MSG_BROADCAST,SVC_TEMPENTITY); write_byte(10); write_coord_f(iVec[0]); write_coord_f(iVec[1]); write_coord_f(iVec[2]); message_end(); } explode(const Float:iVec[3]) { message_begin_f(MSG_BROADCAST, SVC_TEMPENTITY, iVec); { write_byte(21); write_coord_f(iVec[0]); write_coord_f(iVec[1]); write_coord_f(iVec[2] + 16); write_coord_f(iVec[0]); write_coord_f(iVec[1]); write_coord_f(iVec[2] + 1936); write_short(g_iVariables[white]); write_byte(0); write_byte(0); write_byte(2); write_byte(16); write_byte(0); write_byte(188); write_byte(220); write_byte(255); write_byte(255); write_byte(0); } message_end(); message_begin_f(MSG_BROADCAST, SVC_TEMPENTITY); { write_byte(12); write_coord_f(iVec[0]); write_coord_f(iVec[1]); write_coord_f(iVec[2]); write_byte(188); write_byte(10); } message_end(); message_begin_f(MSG_BROADCAST, SVC_TEMPENTITY, iVec); { write_byte(5); write_coord_f(iVec[0]); write_coord_f(iVec[1]); write_coord_f(iVec[2]); write_short(g_iVariables[steam1]); write_byte(2); write_byte(10); } message_end(); } @rocket_liftoff(const pPlayer) { set_entvar(pPlayer, var_gravity, -0.50); client_cmd(pPlayer, "+jump;wait;wait;-jump"); rh_emit_sound2(pPlayer, 0, CHAN_VOICE, g_szSounds[rocket1]); @rocket_effects(pPlayer); } @rocket_effects(const pPlayer) { if(!is_user_alive(pPlayer)) { remove_task(pPlayer); return; } static Float:flOrigin[3]; get_entvar(pPlayer, var_origin, flOrigin); message_begin_f(MSG_ONE, g_iVariables[Damage], .player = pPlayer); { write_byte(30); write_byte(30); write_long(1<<16); write_coord_f(flOrigin[0]); write_coord_f(flOrigin[1]); write_coord_f(flOrigin[2]); } message_end(); static Float:flPlayerOrigin[MAX_CLIENTS + 1]; if(flPlayerOrigin[pPlayer] == flOrigin[2]) { rocket_explode(pPlayer); } flPlayerOrigin[pPlayer] = flOrigin[2]; message_begin_f(MSG_BROADCAST, SVC_TEMPENTITY); { write_byte(15); write_coord_f(flOrigin[0]); write_coord_f(flOrigin[1]); write_coord_f(flOrigin[2]); write_coord_f(flOrigin[0]); write_coord_f(flOrigin[1]); write_coord_f(flOrigin[2] - 30); write_short(g_iVariables[blueflare2]); write_byte(5); write_byte(1); write_byte(1); write_byte(10); write_byte(5); } message_end(); message_begin_f(MSG_BROADCAST,SVC_TEMPENTITY); { write_byte(17); write_coord_f(flOrigin[0]); write_coord_f(flOrigin[1]); write_coord_f(flOrigin[2] - 30); write_short(g_iVariables[muzzleflash]); write_byte(15); write_byte(255); } message_end(); set_task(0.2, "@rocket_effects", pPlayer); } rocket_explode(const pPlayer) { static Float:flOrigin[3]; get_entvar(pPlayer, var_origin, flOrigin); message_begin_f(MSG_BROADCAST, SVC_TEMPENTITY, flOrigin); { write_byte(21); write_coord_f(flOrigin[0]); write_coord_f(flOrigin[1]); write_coord_f(flOrigin[2] - 10); write_coord_f(flOrigin[0]); write_coord_f(flOrigin[1]); write_coord_f(flOrigin[2] + 1910); write_short(g_iVariables[white]); write_byte(0); write_byte(0); write_byte(2); write_byte(16); write_byte(0); write_byte(188); write_byte(220); write_byte(255); write_byte(255); write_byte(0); } message_end(); message_begin_f(MSG_BROADCAST, SVC_TEMPENTITY); { write_byte(12); write_coord_f(flOrigin[0]); write_coord_f(flOrigin[1]); write_coord_f(flOrigin[2]); write_byte(188); write_byte(10); } message_end(); message_begin_f(MSG_BROADCAST, SVC_TEMPENTITY, flOrigin); { write_byte(5); write_coord_f(flOrigin[0]); write_coord_f(flOrigin[1]); write_coord_f(flOrigin[2]); write_short(g_iVariables[steam1]); write_byte(2); write_byte(10); } message_end(); user_kill(pPlayer, 1); rh_emit_sound2(pPlayer, 0, CHAN_VOICE, g_szSounds[rocket1], 0.0, 0.0, (1<<5)); set_entvar(pPlayer, var_maxspeed, 1.0); set_entvar(pPlayer, var_gravity, 1.00); } @uberslap_player(const pPlayer) { user_slap(pPlayer, (get_entvar(pPlayer, var_health) > 1.0) ? 1 : 0); } rg_give_default_items_func(const pPlayer) { rg_round_respawn(pPlayer); if(g_blVariables[revdefaultweapon]) { rg_give_default_items(pPlayer); } } rg_drug_player(const pPlayer) { message_begin(MSG_ONE, g_iVariables[SetFOV], .player = pPlayer); write_byte(180); message_end(); } flash_player(const pPlayer) { message_begin(MSG_ONE, g_iVariables[ScreenFade], .player = pPlayer); { write_short(1<<15); write_short(1<<10); write_short(1<<12); write_byte(255); write_byte(255); write_byte(255); write_byte(255); } message_end(); if(g_blVariables[flashsound]) { rh_emit_sound2(pPlayer, 0, CHAN_BODY, g_szSounds[flashbang2], 1.0, ATTN_NORM, 0, PITCH_HIGH); } } freeze_player(const pPlayer) { new iFlags = get_entvar(pPlayer, var_flags); if(~iFlags & FL_FROZEN) { set_entvar(pPlayer, var_flags, iFlags | FL_FROZEN); new iEnt = g_iVariables[PlayerIceCube][pPlayer]; if(is_nullent(iEnt)) { iEnt = g_iVariables[PlayerIceCube][pPlayer] = rg_create_entity("info_target"); set_entvar(iEnt, var_body, 1); set_entvar(iEnt, var_owner, pPlayer); set_entvar(iEnt, var_solid, SOLID_BBOX); set_entvar(iEnt, var_modelindex, g_iVariables[modelindex]); rg_set_user_rendering(iEnt, kRenderFxNone, {255.0, 255.0, 255.0}, kRenderTransAdd, 60.0); } else { set_entvar(iEnt, var_effects, get_entvar(iEnt, var_effects) & ~EF_NODRAW); } new Float:flOrigin[3]; get_entvar(pPlayer, var_origin, flOrigin); flOrigin[2] -= 25.0; set_entvar(iEnt, var_origin, flOrigin); } } unfreeze_player(const pPlayer) { new iFlags = get_entvar(pPlayer, var_flags); if(iFlags & FL_FROZEN) { set_entvar(pPlayer, var_flags, iFlags & ~FL_FROZEN); set_entvar(g_iVariables[PlayerIceCube][pPlayer], var_effects, EF_NODRAW); } } admin_transfer(const pPlayer, const pId, const szArg[]) { new szTeamName[32]; switch(szArg[0]) { case 'T','t': { rg_set_user_team(pId, TEAM_TERRORIST); szTeamName = "Terrorists"; rg_give_default_items_func(pId); } case 'C','c': { rg_set_user_team(pId, TEAM_CT); szTeamName = "Counter-Terrorists"; rg_give_default_items_func(pId); } case 'S','s': { user_silentkill(pId); rg_set_user_team(pId, TEAM_SPECTATOR); szTeamName = "Spectator"; } default: { console_print(pPlayer, "[AMX_TEAM] %L", pPlayer, "REAMX_SUPER_TEAM_INVALID"); return; } } client_print_color(0, 0, "%L", LANG_PLAYER, "REAMX_SUPER_TEAM_P", pPlayer, pId, szTeamName); console_print(pPlayer, "[AMX_TEAM] %L", pPlayer, "REAMX_SUPER_TEAM_C", pId, szTeamName); } admin_swap(const pPlayer, const pId, const arg[]) { new pId2 = cmd_target(pPlayer, arg, false, false); if(!pId2) { return; } new TeamName:iTeam1 = get_member(pId, m_iTeam); new TeamName:iTeam2 = get_member(pId2, m_iTeam); if(iTeam1 == iTeam2) { console_print(pPlayer, "[AMX_SWAP] %L", pPlayer, "REAMX_SUPER_SWAP_ERROR1"); return; } if(iTeam1 == TEAM_UNASSIGNED || iTeam2 == TEAM_UNASSIGNED) { console_print(pPlayer, "[AMX_SWAP] %L", pPlayer, "REAMX_SUPER_SWAP_ERROR2"); return; } if(iTeam1 == TEAM_SPECTATOR) { user_silentkill(pId2); } else if(iTeam2 == TEAM_SPECTATOR) { user_silentkill(pId); } rg_set_user_team(pId, iTeam2); rg_set_user_team(pId2, iTeam1); if(iTeam2 != TEAM_SPECTATOR) { rg_give_default_items_func(pId); } if(iTeam1 != TEAM_SPECTATOR) { rg_give_default_items_func(pId2); } client_print_color(0, 0, "%L", LANG_PLAYER, "REAMX_SUPER_SWAP_P", pPlayer, pId, pId2); console_print(pPlayer, "[AMX_SWAP] %L", pPlayer, "REAMX_SUPER_SWAP_C", pId, pId2); } admin_extend(const pPlayer, const iLimit) { if(iLimit <= 0) { console_print(pPlayer, "[AMX_EXTEND] %L", pPlayer, "REAMX_SUPER_AMOUNT_GREATER"); return; } static iExtended = 0; if(iExtended >= g_blVariables[extendmax]) { console_print(pPlayer, "[AMX_EXTEND] %L", pPlayer, "REAMX_SUPER_EXTEND_ERROR1", iExtended); return; } if(iLimit > g_blVariables[extendtime]) { console_print(pPlayer, "[AMX_EXTEND] %L", pPlayer, "REAMX_SUPER_EXTEND_ERROR2", g_blVariables[extendtime]); return; } set_pcvar_float(g_iVariables[mp_timelimit], get_pcvar_float(g_iVariables[mp_timelimit]) + iLimit); ++iExtended; client_print_color(0, 0, "%L", LANG_PLAYER, "REAMX_SUPER_EXTEND_P", pPlayer, iLimit); console_print(pPlayer, "[AMX_EXTEND] %L", pPlayer, "REAMX_SUPER_EXTEND_C", iLimit); } admin_glowcolors(const pPlayer) { console_print(pPlayer, "Colors:"); for(new i=0; i < MAX_COLORS; i++) { console_print(pPlayer, "%i %s", i + 1, g_szColors[i]); } console_print(pPlayer, "[AMX_GLOW] Example: amx_glow ^"PurposeLess^" ^"red^""); } admin_glow(const pPlayer, const pId, const bool:blTeam, const szArg[], const szArg2[], const bool:blCustom, {Float,_}:flColor[3], Float:flAmount) { new bool:blOff; if(!blCustom) { new bool:blValid = false; for(new i = 0; i < MAX_COLORS; i++) { if(equali(szArg2, g_szColors[i])) { if(equali(szArg2, "off")) { blOff = true; } flColor[0] = g_flColors[i][0]; flColor[1] = g_flColors[i][1]; flColor[2] = g_flColors[i][2]; flAmount = 255.0; blValid = true; break; } } if(!blValid) { console_print(pPlayer, "[AMX_GLOW] %L", pPlayer, "REAMX_SUPER_GLOW_INVALID"); return; } } else { flColor[0] = floatclamp(flColor[0], 0.0, 255.0); flColor[1] = floatclamp(flColor[1], 0.0, 255.0); flColor[2] = floatclamp(flColor[2], 0.0, 255.0); flAmount = floatclamp(flAmount, 0.0, 255.0); if(flColor[0] == 0.0 && flColor[1] == 0.0 && flColor[2] == 0.0 && flAmount == 255.0) { blOff = true; } } rg_set_user_rendering(pId, kRenderFxGlowShell, flColor, kRenderTransAlpha, flAmount); if(!blOff) { send_print_onlynames(pPlayer, pId, szArg, blTeam, "REAMX_SUPER_GLOW_TEAM_P", "REAMX_SUPER_GLOW_TEAM_C", "REAMX_SUPER_GLOW_PLAYER_P", "REAMX_SUPER_GLOW_PLAYER_C"); } else { send_print_onlynames(pPlayer, pId, szArg, blTeam, "REAMX_SUPER_UNGLOW_TEAM_P", "REAMX_SUPER_UNGLOW_TEAM_C", "REAMX_SUPER_UNGLOW_PLAYER_P", "REAMX_SUPER_UNGLOW_PLAYER_C"); } } rg_set_user_rendering(const pPlayer, const iFx, const {Float,_}:flColor[3], const iRender, const Float:flAmount) { set_entvar(pPlayer, var_renderfx, iFx); set_entvar(pPlayer, var_rendercolor, flColor); set_entvar(pPlayer, var_rendermode, iRender); set_entvar(pPlayer, var_renderamt, flAmount); } @event_curweapon(const pPlayer) { if(!g_blVariables[Unammo][pPlayer]) { return; } new iWeapon = read_data(2); set_member(get_member(pPlayer, m_pActiveItem), m_Weapon_iClip, rg_get_weapon_info(iWeapon, WI_GUN_CLIP_SIZE) + 1); } @CBasePlayer_ResetMaxSpeed_Pre(const pPlayer) { if(g_iVariables[Speed][pPlayer] > 0) { new Float:flSpeed = 250.0 + (50.0 * g_iVariables[Speed][pPlayer]); set_entvar(pPlayer, var_maxspeed, flSpeed); return HC_SUPERCEDE; } return HC_CONTINUE; } @CBasePlayer_Spawn_Post(const pPlayer) { if(get_member(pPlayer, m_bJustConnected)) { return; } g_iVariables[PlayerJump][pPlayer] = 0; g_blVariables[Fire][pPlayer] = false; g_blVariables[DoubleJump][pPlayer] = false; g_blVariables[PlayerCatch][pPlayer] = false; g_iVariables[Speed][pPlayer] = 0; remove_task(pPlayer); remove_task(pPlayer + TASKID_FIRE1); remove_task(pPlayer + TASKID_FIRE2); get_entvar(pPlayer, var_origin, flHRespawn_Origin[pPlayer]); set_entvar(g_iVariables[PlayerIceCube][pPlayer], var_effects, EF_NODRAW); } @CBasePlayer_Killed_Post(const pVictim, pAttacker, iGib) { g_iVariables[PlayerJump][pVictim] = 0; g_blVariables[Fire][pVictim] = false; g_blVariables[DoubleJump][pVictim] = false; g_blVariables[PlayerCatch][pVictim] = false; g_iVariables[Speed][pVictim] = 0; remove_task(pVictim); remove_task(pVictim + TASKID_FIRE1); remove_task(pVictim + TASKID_FIRE2); unfreeze_player(pVictim); get_entvar(pVictim, var_origin, flHRespawn_Origin[pVictim]); } @CBasePlayer_TakeDamage_Post(const pVictim, pInflictor, pAttacker, Float:flDamage, bitsDamageType) { if(g_blVariables[bulletdamage]) { if(!is_user_connected(pAttacker) || pVictim == pAttacker || !rg_is_player_can_takedamage(pVictim, pAttacker)) { return; } set_hudmessage(0, 100, 200, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, -1); ShowSyncHudMsg(pAttacker, g_iVariables[Hudsync], "%0.f^n", flDamage); } } send_print_arg(const pPlayer, const pId, const szArg[], const iNum, const bool:blTeam, const TEAM_P[], const TEAM_C[], const PLAYER_P[], const PLAYER_C[]) { if(blTeam) { client_print_color(0, 0, "%L", LANG_PLAYER, TEAM_P, pPlayer, iNum, get_teamname(szArg)); console_print(pPlayer, "%L", LANG_PLAYER, TEAM_C, iNum, get_teamname(szArg)); } else { client_print_color(0, 0, "%L", LANG_PLAYER, PLAYER_P, pPlayer, iNum, pId); console_print(pPlayer, "%L", LANG_PLAYER, PLAYER_C, iNum, pId); } } send_print_onlypc(const pPlayer, const iNum, const P[], const C[]) { client_print_color(0, 0, "%L", LANG_PLAYER, P, pPlayer, iNum); console_print(pPlayer, "%L", LANG_PLAYER, C, iNum); } send_print_onlynames(const pPlayer, const pId, const szArg[], const bool:blTeam, const TEAM_P[], const TEAM_C[], const PLAYER_P[], const PLAYER_C[]) { if(blTeam) { client_print_color(0, 0, "%L", LANG_PLAYER, TEAM_P, pPlayer, get_teamname(szArg)); console_print(pPlayer, "%L", LANG_PLAYER, TEAM_C, get_teamname(szArg)); } else { client_print_color(0, 0, "%L", LANG_PLAYER, PLAYER_P, pPlayer, pId); console_print(pPlayer, "%L", LANG_PLAYER, PLAYER_C, pId); } } send_print_fire(const pPlayer, const pId, const szArg[], const iArg2, const bool:blTeam, const TEAM_P[], const TEAM_C[], const PLAYER_P[], const PLAYER_C[]) { new szFire[20]; formatex(szFire, charsmax(szFire), "%L", LANG_PLAYER, iArg2 ? "REAMX_SUPER_FIRE" : "REAMX_SUPER_UNFIRE"); if(blTeam) { client_print_color(0, 0, "%L", LANG_PLAYER, TEAM_P, pPlayer, szFire, get_teamname(szArg)); console_print(pPlayer, "%L", LANG_PLAYER, TEAM_C, szFire, get_teamname(szArg)); } else { client_print_color(0, 0, "%L", LANG_PLAYER, PLAYER_P, pPlayer, szFire, pId); console_print(pPlayer, "%L", LANG_PLAYER, PLAYER_C, szFire, pId); } } get_teamname(const szArg[]) { new szTeamName[18]; switch(szArg[1]) { case 't','T': { szTeamName = "Terrorist"; } case 'c','C': { szTeamName = "Counter-Terrorist"; } default: { szTeamName = "all"; } } return szTeamName; } cmd_target(const pPlayer, const szArg[], const bool:blOnlyAlive, const bool:blImmunity) { new pId = find_player("bl", szArg); if(pId) { if(pId != find_player("blj", szArg)) { console_print(pPlayer, "%L", LANG_PLAYER, "MORE_CL_MATCHT"); return 0; } } else if((pId = find_player("c", szArg)) == 0 && szArg[0] == '#' && szArg[1]) { pId = find_player("k", str_to_num(szArg[1])); } if(!pId) { console_print(pPlayer, "%L", LANG_PLAYER, "CL_NOT_FOUND"); return 0; } if(blOnlyAlive && !is_user_alive(pPlayer)) { new szName[MAX_NAME_LENGTH]; get_user_name(pId, szName, charsmax(szName)); console_print(pPlayer, "%L", LANG_PLAYER, "CANT_PERF_DEAD", szName); return 0; } if(blImmunity && (get_user_flags(pId) & ADMIN_IMMUNITY && pPlayer != pId)) { new szName[MAX_NAME_LENGTH]; get_user_name(pId, szName, charsmax(szName)); console_print(pPlayer, "%L", LANG_PLAYER, "CLIENT_IMM", szName); return 0; } return pId; } @clcmd_admin(const pPlayer) { new szAdminNames[MAX_CLIENTS + 1][MAX_NAME_LENGTH]; new szMessage[MAX_DIRECTOR_CMD_STRING]; new iCount, iLen; for(new id = 1; id <= MaxClients; id++) { if(is_user_connected(id) && get_user_flags(id) & ADMIN_KICK) { get_user_name(id, szAdminNames[iCount++], charsmax(szAdminNames[])); } } iLen = formatex(szMessage, charsmax(szMessage), "^4ADMINS ONLINE^1: "); if(iCount > 0) { for(new x = 0 ; x < iCount ; x++) { iLen += formatex(szMessage[iLen], charsmax(szMessage) - iLen, "^3%s%s ", szAdminNames[x], x < (iCount-1) ? "^4, " : ""); if(iLen > 96) { client_print_color(pPlayer, pPlayer, szMessage); iLen = formatex(szMessage, charsmax(szMessage), "^4 "); } } client_print_color(pPlayer, pPlayer, szMessage); } else { iLen += formatex(szMessage[iLen], charsmax(szMessage)-iLen, "^3No admins online."); client_print_color(pPlayer, pPlayer, szMessage); } return PLUGIN_HANDLED; } admin_fire(const pPlayer, const iNum) { if(iNum) { g_iVariables[PlayerCatch][pPlayer] = 0; g_blVariables[Fire][pPlayer] = true; set_task(0.2, "@ignite_effects", pPlayer + TASKID_FIRE1, .flags = "b"); set_task(1.0, "@ignite_player", pPlayer + TASKID_FIRE2, .flags = "b"); rh_emit_sound2(pPlayer, 0, CHAN_WEAPON, g_szSounds[scream07], 1.0, ATTN_NORM, 0, PITCH_HIGH); } else { g_blVariables[Fire][pPlayer] = false; remove_task(pPlayer + TASKID_FIRE1); remove_task(pPlayer + TASKID_FIRE2); } } @ignite_effects(TaskId) { static pPlayer; pPlayer = TaskId - TASKID_FIRE1; static Float:flOrigin[3]; get_entvar(pPlayer, var_origin, flOrigin); message_begin_f(MSG_BROADCAST, SVC_TEMPENTITY); write_byte(17); write_coord_f(flOrigin[0]); write_coord_f(flOrigin[1]); write_coord_f(flOrigin[2]); write_short(g_iVariables[muzzleflash]); write_byte(20); write_byte(200); message_end(); message_begin_f(MSG_BROADCAST,SVC_TEMPENTITY, flOrigin); write_byte(5); write_coord_f(flOrigin[0]); write_coord_f(flOrigin[1]); write_coord_f(flOrigin[2]); write_short(g_iVariables[steam1]); write_byte(20); write_byte(15); message_end(); } @ignite_player(TaskId) { new pPlayer = TaskId - TASKID_FIRE2; new Float:flOrigin[3]; get_entvar(pPlayer, var_origin, flOrigin); if(get_entvar(pPlayer, var_health) - 10.0 <= 0.0) { admin_fire(pPlayer, 0); rg_user_silentkill(pPlayer, g_iVariables[PlayerCatch][pPlayer]); return; } set_entvar(pPlayer, var_health, Float:get_entvar(pPlayer, var_health) - 10.0); message_begin_f(MSG_ONE, g_iVariables[Damage], .player = pPlayer); write_byte(30); write_byte(30); write_long(1<<21); write_coord_f(flOrigin[0]); write_coord_f(flOrigin[1]); write_coord_f(flOrigin[2]); message_end(); rh_emit_sound2(pPlayer, 0, CHAN_ITEM, g_szSounds[flameburst], 0.6, ATTN_NORM, 0, PITCH_LOW); if(g_blVariables[allowcatchfire]) { for(new pId = 1, Float:flOrigin2[3]; pId <= MaxClients; pId++) { if(!is_user_alive(pId) || g_blVariables[Fire][pId] || pPlayer == pId) { continue; } get_entvar(pId, var_origin, flOrigin2); if(get_distance_f(flOrigin, flOrigin2) < 100.0) { rh_emit_sound2(pId, 0, CHAN_WEAPON, g_szSounds[scream07], 1.0, ATTN_NORM, 0, PITCH_HIGH); client_print_color(0, 0, "%L", LANG_PLAYER, "REAMX_SUPER_CATCH_FIRE", pPlayer, pId); admin_fire(pId, 1); g_iVariables[PlayerCatch][pId] = pPlayer; } } } } rg_user_silentkill(const pVictim, const pAttacker) { if(!is_user_connected(pAttacker)) { user_kill(pVictim); return; } user_silentkill(pVictim); message_begin(MSG_BROADCAST, g_iVariables[DeathMsg], .player = pVictim); write_byte(pAttacker); write_byte(pVictim); write_byte(0); message_end(); new Float:flFrags = get_entvar(pAttacker, var_frags); set_entvar(pAttacker, var_frags, flFrags + 1.0); message_begin(MSG_BROADCAST, g_iVariables[ScoreInfo]); write_byte(pAttacker); write_short(floatround(flFrags)); write_short(get_member(pAttacker, m_iDeaths)); write_short(0); write_short(get_member(pAttacker, m_iTeam)); message_end(); } @CBasePlayer_Jump_Pre(const pPlayer) { if(!g_blVariables[DoubleJump][pPlayer]) { return HC_CONTINUE; } new iFlags = get_entvar(pPlayer, var_flags); if(g_blVariables[auto_double_jump]) { if((!(get_entvar(pPlayer, var_oldbuttons) & IN_JUMP)) && iFlags & FL_ONGROUND) { new Float:flVelocity[3]; get_entvar(pPlayer, var_velocity, flVelocity); flVelocity[2] = g_iVariables[auto_double_jump_velocity]; set_entvar(pPlayer, var_velocity, flVelocity); } } static Float:flJumpTime[MAX_CLIENTS + 1]; if(g_iVariables[PlayerJump][pPlayer] && (iFlags & FL_ONGROUND)) { g_iVariables[PlayerJump][pPlayer] = 0; flJumpTime[pPlayer] = get_gametime(); return HC_CONTINUE; } static Float:flGameTime; if((get_entvar(pPlayer, var_oldbuttons) & IN_JUMP || iFlags & FL_ONGROUND) || ((flGameTime = get_gametime()) - flJumpTime[pPlayer]) < 0.2) { return HC_CONTINUE; } if(g_iVariables[PlayerJump][pPlayer] >= g_iVariables[additional_jumps]) { return HC_CONTINUE; } flJumpTime[pPlayer] = flGameTime; new Float:flVelocity[3]; get_entvar(pPlayer, var_velocity, flVelocity); flVelocity[2] = random_float(265.0, 285.0); set_entvar(pPlayer, var_velocity, flVelocity); g_iVariables[PlayerJump][pPlayer]++; if(g_blVariables[dj_trail]) { func_TrailMessage(pPlayer); g_iVariables[flTrailTime][pPlayer] = get_gametime(); } return HC_CONTINUE; } func_TrailMessage(const pPlayer) { if(g_blVariables[Trail][pPlayer]) { return PLUGIN_CONTINUE; } static iColor[3]; enum { RED = 0, GREEN, BLUE }; if(!g_blVariables[dj_trail_effect]) { iColor[RED] = random_num(0, 255); iColor[GREEN] = random_num(0, 255); iColor[BLUE] = random_num(0, 255); } else { static TeamName:team; team = get_member(pPlayer, m_iTeam); switch(team) { case TEAM_TERRORIST: iColor = { 255, 0, 0 }; case TEAM_CT: iColor = { 0, 0, 255 }; } } g_blVariables[Trail][pPlayer] = true; message_begin(MSG_BROADCAST, SVC_TEMPENTITY); write_byte(TE_BEAMFOLLOW); write_short(pPlayer); write_short(g_iVariables[zbeam5]); write_byte(g_iVariables[dj_trail_life] * 10); write_byte(g_iVariables[dj_trail_size]); write_byte(iColor[RED]); write_byte(iColor[GREEN]); write_byte(iColor[BLUE]); write_byte(g_iVariables[dj_trail_brightness]); message_end(); g_iVariables[flTrailTime][pPlayer] = get_gametime(); set_task(1.0, "@task_RemoveTrail", pPlayer + TASKID_TRAIL, .flags = "a", .repeat = 1); return PLUGIN_CONTINUE; } @task_RemoveTrail(TaskId) { new pPlayer = TaskId - TASKID_TRAIL; if(!g_blVariables[DoubleJump][pPlayer]) { remove_task(pPlayer + TASKID_TRAIL); return; } new Float:flGameTime = get_gametime(); if(flGameTime - g_iVariables[flTrailTime][pPlayer] < 1.35) { remove_task(pPlayer + TASKID_TRAIL); set_task(1.0, "@task_RemoveTrail", pPlayer + TASKID_TRAIL, .flags = "a", .repeat = 1); } else { g_blVariables[Trail][pPlayer] = false; message_begin(MSG_BROADCAST, SVC_TEMPENTITY); write_byte(TE_KILLBEAM); write_short(pPlayer); message_end(); } } rg_respawn_all_players() { if(g_blVariables[reviveafterteamswap]) { for(new pPlayer = 1; pPlayer <= MaxClients; pPlayer++) { if(is_user_connected(pPlayer) && (TEAM_UNASSIGNED < get_member(pPlayer, m_iTeam) < TEAM_SPECTATOR)) { rg_round_respawn(pPlayer); if(g_blVariables[revdefaultweapon]) { rg_remove_item(pPlayer, "weapon_glock18"); rg_remove_item(pPlayer, "weapon_usp"); rg_give_default_items(pPlayer); } } } } } Przeczytaj cały wpis
  5. I've been trying to make (Not make but instead combine two skin system because one of them used mysql which was bad, and the other one used nvault which is good) a save system that whenever a map changes or the player leaves the server, the selected skins he chose would remain. Like if he chose a skin and the map changes or he leaves and rejoins, that skin would be selected and not the default ones... Could someone help? Code; #include <amxmodx> #include <engine> #include <fakemeta> #include <cstrike> #include <nvault> #pragma tabsize 0 #define PLUGIN "New Plug-In" #define VERSION "1.0" #define AUTHOR "Author" #define KILL_POINT 2 #define HEADSHOT_POINT 5 #define TULAJ ADMIN_LEVEL_G #define FOADMIN ADMIN_LEVEL_B #define ADMIN ADMIN_LEVEL_C #define VIP ADMIN_LEVEL_H enum _:Rangs { Szint[32], Xp[8] }; enum _:GunDatas { M4A1, AK47, AWP, DEAGLE, KNIFE, } new g_SelectedGun[GunDatas][33], g_uPoints[GunDatas][33], g_Wpn[33] new oles[33]; new hudkibe[33]; new const PREFIX[] = "\r-[NME]-" new const C_Perfix[] = "-[NME]-" new vault enum _:DATA { GunName[64], ModelName[128], Points[8], AnimType[8] } new const WeaponM4A1[][DATA] = { {"M4A1 | Alap", "models/v_m4a1.mdl", 0, -1}, {"M4A1 | Neo-Noir", "models/NMESkinek/M4a1/v_m4a1_6.mdl", 0, -1}, {"M4A1 | Nuclear Leak", "models/NMESkinek/M4a1/v_m4a1_7.mdl", 0, -1}, {"M4A1 | Decimator", "models/NMESkinek/M4a1/v_m4a1_9.mdl", 0, -1}, {"M4A1 | White Printstream", "models/NMESkinek/M4a1/v_m4a1_12printfix.mdl", 0, -1}, {"M4A1 | Anime", "models/NMESkinek/M4a1/v_m4a1anime.mdl", 0, -1}, {"M4A1 | Black Printstream", "models/NMESkinek/M4a1/v_m4a1bps.mdl", 0, -1}, {"M4A1 | Purple Attack", "models/NMESkinek/M4a1/m4purpleattack.mdl", 0, -1}, {"M4A1 | Black & Purple", "models/NMESkinek/M4a1/m4a1blackpurple.mdl", 0, -1}, {"M4A1 | Nightmare", "models/NMESkinek/M4a1/v_m4a115.mdl", 0, -1}, {"M4A1 | Galaxy", "models/NMESkinek/M4a1/v_m4a1galaxy.mdl", 0, -1}, {"M4A1 | Desolate Space", "models/NMESkinek/M4a1/v_m4a1desolate.mdl", 0, -1}, {"M4A1 | Icarus Fell", "models/NMESkinek/M4a1/v_m4a1icarus.mdl", 0, -1}, {"M4A1 | Hyper Beast", "models/NMESkinek/M4a1/v_m4a113.mdl", 0, -1} } new const WeaponAK47[][DATA] = { {"AK47 | Alap", "models/v_ak47.mdl", 0, -1}, {"AK47 | Blood Sport", "models/NMESkinek/Ak47/v_ak47_13.mdl", 0, -1}, {"AK47 | Redline", "models/NMESkinek/Ak47/v_ak47_15.mdl", 0, -1}, {"AK47 | Blue Came", "models/NMESkinek/Ak47/v_ak47_16.mdl", 0, -1}, {"AK47 | White Printstream", "models/NMESkinek/Ak47/v_ak47_print.mdl", 0, -1}, {"AK47 | Anime", "models/NMESkinek/Ak47/v_akanime.mdl", 0, -1}, {"AK47 | Bubblegum", "models/NMESkinek/Ak47/v_ak47bubblegum.mdl", 0, -1}, {"AK47 | Black Printstream", "models/NMESkinek/Ak47/v_ak47_18.mdl", 0, -1}, {"AK47 | Inheritance", "models/NMESkinek/Ak47/v_ak47_20.mdl", 0, -1}, {"AK47 | Koi", "models/NMESkinek/Ak47/v_ak47_21.mdl", 0, -1}, {"AK47 | Eyes", "models/NMESkinek/Ak47/v_ak47_19.mdl", 0, -1} } new const WeaponAWP[][DATA] = { {"Awp | Alap", "models/v_awp.mdl", 0, -1}, {"AWP | Dragon Lore", "models/NMESkinek/Awp/v_awp_1.mdl", 0, -1}, {"AWP | Asiimov", "models/NMESkinek/Awp/v_awp_2.mdl", 0, -1}, {"AWP | Dexpota", "models/NMESkinek/Awp/v_awp_3.mdl", 0, -1}, {"AWP | Graphite", "models/NMESkinek/Awp/v_awp_4.mdl", 0, -1}, {"AWP | Raptor", "models/NMESkinek/Awp/v_awp_5.mdl", 0, -1}, {"AWP | Artistic", "models/NMESkinek/Awp/v_awp_6.mdl", 0, -1}, {"AWP | Hyper Beast", "models/NMESkinek/Awp/v_awp_7.mdl", 0, -1}, {"AWP | Fever Dream", "models/NMESkinek/Awp/v_awp_8.mdl", 0, -1}, {"AWP | Tiger Tooth", "models/NMESkinek/Awp/v_awp_9.mdl", 0, -1}, {"AWP | Cyrex", "models/NMESkinek/Awp/v_awp_10.mdl", 0, -1}, {"AWP | Rainbow", "models/NMESkinek/Awp/v_awp_11.mdl", 0, -1}, {"AWP | Southeast Tiger", "models/NMESkinek/Awp/v_awp_12.mdl", 0, -1}, {"AWP | Red Destin", "models/NMESkinek/Awp/v_awp_13.mdl", 0, -1} } new const WeaponDEAGLE[][DATA] = { {"Deagle | Alap", "models/v_deagle.mdl", 0, -1}, {"Deagle | Asiimov", "models/NMESkinek/Deagle/v_deagle_1.mdl", 0, -1}, {"Deagle | Blue Crystal", "models/NMESkinek/Deagle/v_deagle_2.mdl", 0, -1}, {"Deagle | Dragon Lore", "models/NMESkinek/Deagle/v_deagle_3.mdl", 0, -1}, {"Deagle | Fade", "models/NMESkinek/Deagle/v_deagle_4.mdl", 0, -1}, {"Deagle | Ghost", "models/NMESkinek/Deagle/v_deagle_5.mdl", 0, -1}, {"Deagle | Chromatic", "models/NMESkinek/Deagle/v_deagle_6.mdl", 0, -1}, {"Deagle | IDN Paint", "models/NMESkinek/Deagle/v_deagle_7.mdl", 0, -1}, {"Deagle | Pink Haze", "models/NMESkinek/Deagle/v_deagle_8.mdl", 0, -1}, {"Deagle | Rainbow", "models/NMESkinek/Deagle/v_deagle_9.mdl", 0, -1} } new const WeaponKNIFE[][DATA] = { {"Knife | Alap", "models/v_knife.mdl", 0, -1}, {"Karambit | Doppler Phase 3", "models/NMESkinek/kes/v_knife5.mdl", 0, -1}, {"Karambit | Fade", "models/NMESkinek/kes/v_knife4.mdl", 0, -1}, {"Karambit | Eletric Hive", "models/NMESkinek/kes/v_knife3.mdl", 0, -1}, {"Karambit | Psychedelic", "models/NMESkinek/kes/v_knife2.mdl", 0, -1}, {"Bayonet | Prohibition", "models/NMESkinek/kes/v_knife6.mdl", 0, -1}, {"Bayonet | Nathlose", "models/NMESkinek/kes/v_knife7.mdl", 0, -1}, {"Bayonet | Redux", "models/NMESkinek/kes/v_knife8.mdl", 0, -1}, {"Bayonet | Echotek", "models/NMESkinek/kes/v_knife9.mdl", 0, -1}, {"Bayonet | Dystopia", "models/NMESkinek/kes/v_knife10.mdl", 0, -1}, {"M9 Bayonet | Redux", "models/NMESkinek/kes/v_knife11.mdl", 0, -1}, {"M9 Bayonet | Reptilleupted", "models/NMESkinek/kes/v_knife12.mdl", 0, -1}, {"M9 Bayonet | Trojan Horse", "models/NMESkinek/kes/v_knife13.mdl", 0, -1}, {"M9 Bayonet | Diva Knife", "models/NMESkinek/kes/v_knife14.mdl", 0, -1}, {"M9 Bayonet | Polymer", "models/NMESkinek/kes/v_knife15.mdl", 0, -1}, {"Butterfly | Neo Assasin", "models/NMESkinek/kes/v_knife16.mdl", 0, -1}, {"Butterfly | Space", "models/NMESkinek/kes/v_knife17.mdl", 0, -1} } new const MainStrings[][] = { "\yM4A1\w Skins", "\yAK47\w Skins", "\yAWP\w Skins", "\yDeagle\w Skins", "\yKnife\w Skins", } public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_clcmd("say /menu", "openMainMenu") register_clcmd("nme_skinmenu", "openMainMenu") register_clcmd("say /add", "Addolas") register_event("DeathMsg","Halal","a") register_event("DeathMsg","Halals","a") register_event("CurWeapon", "evChangeWeapon", "be", "1=1") register_impulse(100, "cmdInspectWeap"); register_clcmd("say", "sayhook"); set_task(1.0, "hudrendszer",_,_,_,"b"); vault = nvault_open("Fegyverskin"); } public hudrendszer(id){ if(is_user_alive(id) && hudkibe[id]) { } else { return } } public hudkibekapcs(id) { if(hudkibe[id]) { client_print_color(id, print_team_default, "^4[%s] ^1Kikapcsoltad a hudot.", C_Perfix); hudkibe[id] = false; } else { client_print_color(id, print_team_default, "^4[%s] ^1Bekapcsoltad a hudot.", C_Perfix); hudkibe[id] = true; } } public Halals() { new attacker = read_data(1) new victim = read_data(2) if(attacker == victim) return PLUGIN_HANDLED oles[attacker] ++ return PLUGIN_HANDLED } public Addolas(id) { g_uPoints[M4A1][id] += 300 g_uPoints[AK47][id] += 300 g_uPoints[AWP][id] += 300 g_uPoints[DEAGLE][id] += 300 g_uPoints[KNIFE][id] += 300 } public plugin_precache() { for(new i;i < sizeof(WeaponM4A1); i++) precache_model(WeaponM4A1[i][ModelName]) for(new i;i < sizeof(WeaponAK47); i++) precache_model(WeaponAK47[i][ModelName]) for(new i;i < sizeof(WeaponAWP); i++) precache_model(WeaponAWP[i][ModelName]) for(new i;i < sizeof(WeaponDEAGLE); i++) precache_model(WeaponDEAGLE[i][ModelName]) for(new i;i < sizeof(WeaponKNIFE); i++) precache_model(WeaponKNIFE[i][ModelName]) } public cmdInspectWeap(id) { if(!is_user_alive(id)) return PLUGIN_HANDLED; new Wpns = get_user_weapon(id) switch(Wpns) { case CSW_M4A1: { if(WeaponM4A1[g_SelectedGun[M4A1][id]][AnimType] == -1) return PLUGIN_HANDLED; UTIL_PlayWeaponAnimation(id, WeaponM4A1[g_SelectedGun[M4A1][id]][AnimType]); } case CSW_AK47: { if(WeaponAK47[g_SelectedGun[AK47][id]][AnimType] == -1) return PLUGIN_HANDLED; UTIL_PlayWeaponAnimation(id, WeaponAK47[g_SelectedGun[AK47][id]][AnimType]); } case CSW_AWP: { if(WeaponAWP[g_SelectedGun[AWP][id]][AnimType] == -1) return PLUGIN_HANDLED; UTIL_PlayWeaponAnimation(id, WeaponAWP[g_SelectedGun[AWP][id]][AnimType]); } case CSW_DEAGLE: { if(WeaponDEAGLE[g_SelectedGun[DEAGLE][id]][AnimType] == -1) return PLUGIN_HANDLED; UTIL_PlayWeaponAnimation(id, WeaponDEAGLE[g_SelectedGun[DEAGLE][id]][AnimType]); } case CSW_KNIFE: { if(WeaponKNIFE[g_SelectedGun[KNIFE][id]][AnimType] == -1) return PLUGIN_HANDLED; UTIL_PlayWeaponAnimation(id, WeaponKNIFE[g_SelectedGun[KNIFE][id]][AnimType]); } } return PLUGIN_HANDLED } public evChangeWeapon(id) { switch(get_user_weapon(id)) { case CSW_M4A1: entity_set_string(id, EV_SZ_viewmodel, WeaponM4A1[g_SelectedGun[M4A1][id]][ModelName]); case CSW_AK47: entity_set_string(id, EV_SZ_viewmodel, WeaponAK47[g_SelectedGun[AK47][id]][ModelName]); case CSW_AWP: entity_set_string(id, EV_SZ_viewmodel, WeaponAWP[g_SelectedGun[AWP][id]][ModelName]); case CSW_DEAGLE: entity_set_string(id, EV_SZ_viewmodel, WeaponDEAGLE[g_SelectedGun[DEAGLE][id]][ModelName]); case CSW_KNIFE: entity_set_string(id, EV_SZ_viewmodel, WeaponKNIFE[g_SelectedGun[KNIFE][id]][ModelName]); } return PLUGIN_CONTINUE; } public Halal() { new iAttacker = read_data(1) new iVictim = read_data(2) new iHs = read_data(3) if(iAttacker == iVictim || iAttacker == 0) return PLUGIN_HANDLED new iPoints = iHs ? HEADSHOT_POINT : KILL_POINT switch(get_user_weapon(iAttacker)) { case CSW_AK47: g_uPoints[AK47][iAttacker] += iPoints case CSW_M4A1: g_uPoints[M4A1][iAttacker] += iPoints case CSW_AWP: g_uPoints[AWP][iAttacker] += iPoints case CSW_DEAGLE: g_uPoints[DEAGLE][iAttacker] += iPoints case CSW_KNIFE: g_uPoints[KNIFE][iAttacker] += iPoints } return PLUGIN_CONTINUE; } public openMainMenu(id) { new szMenu[121], String[6] formatex(szMenu, charsmax(szMenu), "\r-[NME]- \wSkin Menu^n\y< \rChoose your model \y>", C_Perfix) new menu = menu_create(szMenu, "hMainMenu"); for(new i ;i < sizeof(MainStrings); i++) { num_to_str(i, String, 5) formatex(szMenu, charsmax(szMenu), MainStrings[i]); menu_additem(menu, szMenu, String); } menu_display(id, menu, 0); return PLUGIN_HANDLED; } public hMainMenu(id, menu, item) { if(item == MENU_EXIT) { menu_destroy(menu); return PLUGIN_HANDLED; } g_Wpn[id] = item+1 openskinrangmenu(id) menu_destroy(menu); return PLUGIN_HANDLED; } public openskinrangmenu(id) { new szMenu[121], szMenu2[64], String[15] if(g_Wpn[id] == 1) formatex(szMenu, charsmax(szMenu), "%s \w%s^n\y< \rChoose your M4A1 model \y>", PREFIX, MainStrings[g_Wpn[id]-1], g_uPoints[M4A1][id]) else if(g_Wpn[id] == 2) formatex(szMenu, charsmax(szMenu), "%s \w%s^n\y< \rChoose your AK47 model \y>", PREFIX, MainStrings[g_Wpn[id]-1], g_uPoints[AK47][id]) else if(g_Wpn[id] == 3) formatex(szMenu, charsmax(szMenu), "%s \w%s^n\y< \rChoose your AWP model \y>", PREFIX, MainStrings[g_Wpn[id]-1], g_uPoints[AWP][id]) else if(g_Wpn[id] == 4) formatex(szMenu, charsmax(szMenu), "%s \w%s^n\y< \rChoose your DEAGLE model \y>", PREFIX, MainStrings[g_Wpn[id]-1], g_uPoints[DEAGLE][id]) else if(g_Wpn[id] == 5) formatex(szMenu, charsmax(szMenu), "%s \w%s^n\y< \rChoose your KNIFE model \y>", PREFIX, MainStrings[g_Wpn[id]-1], g_uPoints[KNIFE][id]) new menu = menu_create(szMenu, "hSkinChooser"); if(g_Wpn[id] == 1) formatex(szMenu, charsmax(szMenu), "%s \w%s^n\y< \rChoose your M4A1 model \y>", PREFIX, MainStrings[g_Wpn[id]-1], g_uPoints[M4A1][id]) if(g_Wpn[id] == 2) formatex(szMenu, charsmax(szMenu), "%s \w%s^n\y< \rChoose your AK47 model \y>", PREFIX, MainStrings[g_Wpn[id]-1], g_uPoints[AK47][id]) if(g_Wpn[id] == 3) formatex(szMenu, charsmax(szMenu), "%s \w%s^n\y< \rChoose your AWP model \y>", PREFIX, MainStrings[g_Wpn[id]-1], g_uPoints[AWP][id]) if(g_Wpn[id] == 4) formatex(szMenu, charsmax(szMenu), "%s \w%s^n\y< \rChoose your DEAGLE model \y>", PREFIX, MainStrings[g_Wpn[id]-1], g_uPoints[DEAGLE][id]) if(g_Wpn[id] == 5) formatex(szMenu, charsmax(szMenu), "%s \w%s^n\y< \rChoose your KNIFE model \y>", PREFIX, MainStrings[g_Wpn[id]-1], g_uPoints[KNIFE][id]) if(g_Wpn[id] == 1) { for(new i; i < sizeof(WeaponM4A1); i++) { num_to_str(i, String, 5) formatex(szMenu2, charsmax(szMenu2), "", WeaponM4A1[i][Points]); formatex(szMenu, charsmax(szMenu), "%s %s", WeaponM4A1[i][GunName], g_SelectedGun[M4A1][id] == i ? "\y|Active|": szMenu2); menu_additem(menu, szMenu, String); } } else if(g_Wpn[id] == 2) { for(new i; i < sizeof(WeaponAK47); i++) { num_to_str(i, String, 5) formatex(szMenu2, charsmax(szMenu2), "", WeaponAK47[i][Points]); formatex(szMenu, charsmax(szMenu), "%s %s", WeaponAK47[i][GunName], g_SelectedGun[AK47][id] == i ? "\y|Active|": szMenu2); menu_additem(menu, szMenu, String); } } else if(g_Wpn[id] == 3) { for(new i; i < sizeof(WeaponAWP); i++) { num_to_str(i, String, 5) formatex(szMenu2, charsmax(szMenu2), "", WeaponAWP[i][Points]); formatex(szMenu, charsmax(szMenu), "%s %s", WeaponAWP[i][GunName], g_SelectedGun[AWP][id] == i ? "\y|Active|": szMenu2); menu_additem(menu, szMenu, String); } } else if(g_Wpn[id] == 4) { for(new i; i < sizeof(WeaponDEAGLE); i++) { num_to_str(i, String, 5) formatex(szMenu2, charsmax(szMenu2), "", WeaponDEAGLE[i][Points]); formatex(szMenu, charsmax(szMenu), "%s %s", WeaponDEAGLE[i][GunName], g_SelectedGun[DEAGLE][id] == i ? "\y|Active|": szMenu2); menu_additem(menu, szMenu, String); } } else if(g_Wpn[id] == 5) { for(new i; i < sizeof(WeaponKNIFE); i++) { num_to_str(i, String, 5) formatex(szMenu2, charsmax(szMenu2), "", WeaponKNIFE[i][Points]); formatex(szMenu, charsmax(szMenu), "%s %s", WeaponKNIFE[i][GunName], g_SelectedGun[KNIFE][id] == i ? "\y|Active|": szMenu2); menu_additem(menu, szMenu, String); } } menu_display(id, menu, 0); return PLUGIN_HANDLED; } public hSkinChooser(id, menu, item) { if(item == MENU_EXIT) { menu_destroy(menu); return PLUGIN_CONTINUE; } switch(g_Wpn[id]) { case 1: { if(g_uPoints[M4A1][id] >= WeaponM4A1[item][Points]) { g_SelectedGun[M4A1][id] = item client_print_color(id, print_team_default, "^4%s ^1You successfully activated the skin!", C_Perfix) } else client_print_color(id, print_team_default, "^4%s ^1Nincs elég ölésed az aktiváláshoz!", C_Perfix) } case 2: { if(g_uPoints[AK47][id] >= WeaponAK47[item][Points]) { g_SelectedGun[AK47][id] = item client_print_color(id, print_team_default, "^4%s ^1You successfully activated the skin!", C_Perfix) } else client_print_color(id, print_team_default, "^4%s ^1Nincs elég ölésed az aktiváláshoz!", C_Perfix) } case 3: { if(g_uPoints[AWP][id] >= WeaponAWP[item][Points]) { g_SelectedGun[AWP][id] = item client_print_color(id, print_team_default, "^4%s ^1You successfully activated the skin!", C_Perfix) } else client_print_color(id, print_team_default, "^4%s ^1Nincs elég ölésed az aktiváláshoz!", C_Perfix) } case 4: { if(g_uPoints[DEAGLE][id] >= WeaponDEAGLE[item][Points]) { g_SelectedGun[DEAGLE][id] = item client_print_color(id, print_team_default, "^4%s ^1You successfully activated the skin!", C_Perfix) } else client_print_color(id, print_team_default, "^4%s ^1Nincs elég ölésed az aktiváláshoz!", C_Perfix) } case 5: { if(g_uPoints[KNIFE][id] >= WeaponKNIFE[item][Points]) { g_SelectedGun[KNIFE][id] = item client_print_color(id, print_team_default, "^4%s ^1You successfully activated the skin!", C_Perfix) } else client_print_color(id, print_team_default, "^4%s ^1Nincs elég ölésed az aktiváláshoz!", C_Perfix) } } menu_destroy(menu); return PLUGIN_HANDLED; } stock UTIL_PlayWeaponAnimation(const Player, const Sequence) { set_pev(Player, pev_weaponanim, Sequence) message_begin(MSG_ONE_UNRELIABLE, SVC_WEAPONANIM, .player = Player) write_byte(Sequence) write_byte(pev(Player, pev_body)) message_end() } public mentes(id) { new name[32]; get_user_name(id, name, 31); new vaultkey[64], vaultdata[256]; format(vaultkey, 63, "%s", name); format(vaultdata, 255, "%i", oles[id]); if (!nvault_set(vault, vaultkey, vaultdata)) { client_print(id, print_console, "Failed to save selected skin to vault!"); } return PLUGIN_CONTINUE; } public betoltes(id) { new name[32]; get_user_name(id, name, 31); new vaultkey[64], vaultdata[256]; format(vaultkey, 63, "%s", name); if (nvault_get(vault, vaultkey, vaultdata, 255)) { replace_all(vaultdata, 255, "#", " "); new a_o[32]; parse(vaultdata, a_o, 31); oles[id] = str_to_num(a_o); } else { client_print(id, print_console, "Failed to load selected skin from vault!"); } return PLUGIN_CONTINUE; } public client_putinserver(id) { // Reset selected skins... // Load selected skin from vault... betoltes(id); // Apply selected skin... evChangeWeapon(id); } public client_connect(id) { // Load selected skin... betoltes(id); // Apply selected skin... evChangeWeapon(id); } public client_disconnect(id) { // Save selected skin... mentes(id); } /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1038\\ f0\\ fs18 \n\\ par } */ Przeczytaj cały wpis
  6. Hi! Can someone help me to fix this error? I'm using Amxmodx AMX Mod X 1.9.0.5294 + Metamod v1.20 Code: //// alt_end_round_sounds(beta).sma // // cstrike\addons\amxmodx\scripting\alt_end_round_sounds(beta).sma(639) : fatal error 112: specify either all dimensions or only the last dimension // // Compilation aborted. // 1 Error. // Could not locate output file compiled\alt_end_round_sounds(beta).amx (compile failed). // // Compilation Time: 0.08 sec Code: /* - - - - - - - - - - - AMX Mod X script. Copyright (C) 2007 - Arkshine Plugin : 'Alternative End Round Sounds' Version : v2.3b Original idea and plugin by PaintLancer. Orignal thread : http://forums.alliedmods.net/showthread.php?t=6784 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA In addition, as a special exception, the author gives permission to link the code of this program with the Half-Life Game Engine ("HL Engine") and Modified Game Libraries ("MODs") developed by Valve, L.L.C ("Valve"). You must obey the GNU General Public License in all respects for all of the code used other than the HL Engine and MODs from Valve. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Description : - - - - - - - Plays random music at the end of a round according to who wins, instead of just "Terrorists Win" or "Counter-Terrorists Win". Features : - - - - - - * Support for mp3 and wav files * Using a file for the sounds * Per-map config files supported * Per-map prefix config files supported * Sounds can be toggle on/off by players * Ability to choice x sounds to be precache per map * Multilingual support Requirements : - - - - - - - - * CS 1.6 / CZ * AMX/X 1.7x or higher Cvars : - - - - * ers_enabled <iNum <0|1> Disable/Enable this plugin. (default: 1) * ers_player_toggle <iNum> <0|1> Disable/Enable the client command /roundsound (default: 1) * erc_time_ads <iTime> Times in seconds between each ads messages. 0 disable ads. (default: 120) * erc_random_precache <iMaxTeam or iMax_T-iMax_CT> Specify how many sounds by team you want to precache randomly among all sounds. This means that x sounds will be choosen randomly among all sounds of each team so to be precache at each map. ( 0 = disable feature ) e.g : erc_random_precache "2" : 2 sounds will be choosen among all CTs sounds and all Ts sounds erc_random_precache "2-3" : 2 Ts sounds will be choosen randomly among all Ts sounds. 3 CT sound will be choosen randomly among all CTs sounds. /!\ Don't forget to insert '-' . /!\ Map change on cvar change required ! Client command : - - - - - - - - * say /roundsound : Give to players the ability to turn on/off the end round sounds Changelog : - - - - - - -> Arksine : v3.0 - [ 2007-xx-xx ] ( Major update ) - Soon. A lot of changes/new features. Huge update. ;) v2.3b - [ 2007-11-22 ] (!) Fixed a compatibility bug from 2.3a version. v2.3a - [ 2007-11-19 ] (+) Added compatibility for Amxx 1.7x. (!) Now 'erc_random_precache' cvar is set to 0 by default. (!) Fixed. At the first start of server, value from 'erc_random_precache' cvar from a config file was not read. (!) Some others minors changes. v2.3 - [ 2007-10-29 ] (+) Added 'erc_random_precache' cvar : Specify how many sounds per team you want to precache randomly among all sounds. This means that x sounds will be choosen randomly among all sounds of each team so to be precache at each map. ( request by Arion ) (!) Debug mode is enabled by default now. (-) Removed 3 keys languages. No more need.( ERS_LOG_TOTAL_SOUND_LOADED, ERS_LOG_DEBUG_T, ERS_LOG_DEBUG_CT ) v2.2b - [ 2007-10-28 ] (!) Removed a check. Since trim() is used : Now no need to check space, new line, tabs, carriage returns, etc.. v2.2a - [ 2007-10-28 ] (!) Changed the method of checking empty file. Now it's more efficient. (!) Added another check to ignore texts which are no comments. (!) Fixed a typo ( key language ). v2.2 - [ 2007-10-27 ] (+) Added a check to prevent to get a warning when a team has no sound. (+) Added a check to prevent to not load empty file. (+) Added support for coding-style '//' comments. (!) No longer has a predefined max sounds limit. ( using dynamic array from amxx 1.8.0 ) (!) Minors optimizations. (-) Removed useless code. v2.1a - [ 2007-07-13 ] (!) Fixed a bug with ML system. (!) Fixed a stupid glitch with formatex(). v2.1 - [ 2007-07-06 ] (!) Optimize a little. (!) Rewritted loading_file() function. (+) Added ML system & some texts. (+) Added Color in text. ( !g = green ; !t = team color; !n = yellow (normal) ) (+) Added #_DEBUG. (+) Added chat command : toggle on/off end round sounds. (+) Added "ers_enabled" cvar : enable/disable plugin (+) Added "ers_player_toggle" cvar : enable/disabled command chat for players (+) Added ads message for chat command (+) Added "erc_time_ads" cvar : control amount of times between 2 messages. v2.0b - [ 2007-07-04 ] (!) No features added. Sma reorganized a little and more. v2.0a - [ 2007-06-26 ] (!) Fixed. Bug under linux. Some blank lines weren't ignored. (thanks Deejay & NiLuje) v2.0 - [ 2007-06-26 ] (!) Totaly rewritten. (+) Added support for mp3 files. (+) Added support per file. No more to edit .sma file to add sounds. (+) Added support per-map file. (+) Added support per-map prefix file. -> Paintlancer : v1.0 : [ 2004-10-14 ] First release by Paintlancer. Orignal thread : http://forums.alliedmods.net/showthread.php?t=6784 Credits: - - - - - - - * PaintLancer : Original idea and plugin. * Avalanche : Inspired color chat function from gungame plugin. * Arion : Random precache idea. * Languages translation : - [fr] : Arkshine - [de] : Mordekay - [es] : Darkless - - - - - - - - - - - */ #include <amxmodx> #include <amxmisc> #include <fakemeta> new const // _________________________________________________ PLUGIN [] = "Alternative End Round Sounds", VERSION[] = "2.3c", AUTHOR [] = "Arkshine"; // _________________________________________________ #if AMXX_VERSION_NUM < 180 #define old_amxx #endif /* ========================= [ "START" AERA FOR CHANGES ] ========================= */ #define _DEBUG // Active debug #define MAX_FILE_LENGTH 196 // Max length for files + path. #if defined old_amxx #define MAX_SOUNDS 25 // Max sounds per team #endif new const g_FileName[] = "roundsound", // Name of the main file if no files is found in 'g_FileFolder'. g_FileFolder[] = "round_sound", // Name of the directory in amxmodx/configs/ for per-map files. g_FilePrefix[] = "ini", // File extension used for the files. g_CmdChat[] = "/music"; // Chat command for player. /* ========================= [ "END" AERA FOR CHANGES ] ========================= */ // - - - - - - - - - - - - - - - - - - - - - - - #define MAX_PLAYERS 32 #define TASKID_ADS 1333 #define SIZE_FILE 0 #define NULL -1 new bool:g_pHeardSound[ MAX_PLAYERS + 1 ], #if !defined old_amxx Array:g_lstSoundCT, Array:g_lstSoundT, #endif p_enabled, p_player_toggle, p_time_ads, p_random_precache, g_msgSayText; enum _:e_Team { T = 0, CT, }; new g_nSnd[ e_Team ]; #if defined old_amxx new g_sTeam_sounds[ MAX_SOUNDS ][ e_Team ][ MAX_FILE_LENGTH ]; #define charsmax(%1) sizeof( %1 ) - 1 #endif #define _is_wav(%1) equali( %1[strlen( %1 ) - 4 ], ".wav" ) // - - - - - - - - - - - - - - - - - - - - - - - public plugin_init() { register_plugin( PLUGIN, VERSION, AUTHOR ); register_cvar( "ers_version", VERSION, FCVAR_SERVER | FCVAR_SPONLY ); register_dictionary( "end_roundsound.txt" ); register_event( "SendAudio", "eT_win" , "a", "2&%!MRAD_terwin" ); register_event( "SendAudio", "eCT_win", "a", "2&%!MRAD_ctwin" ); p_enabled = register_cvar( "ers_enabled" , "1" ); p_random_precache = register_cvar( "erc_random_precache", "0" ); p_player_toggle = register_cvar( "ers_player_toggle" , "1" ); p_time_ads = register_cvar( "erc_time_ads" , "0" ); register_clcmd( "say" , "cmd_Say" ); register_clcmd( "say_team" , "cmd_Say" ); PluginPrecache (); } PluginPrecache () { #if !defined old_amxx g_lstSoundCT = ArrayCreate( MAX_FILE_LENGTH ); g_lstSoundT = ArrayCreate( MAX_FILE_LENGTH ); #endif loading_file(); } public plugin_cfg () { g_msgSayText = get_user_msgid( "SayText" ); } public client_authorized( id ) g_pHeardSound[id] = true; public client_disconnect( id ) { g_pHeardSound[id] = true; remove_task( id + TASKID_ADS ); } public client_putinserver( id ) { new Float:f_Time = get_pcvar_float( p_time_ads ); if( f_Time <= 0.0 ) { remove_task( id + TASKID_ADS ); return; } remove_task( id + TASKID_ADS ); set_task( f_Time, "show_ads", id + TASKID_ADS, _, _, "b" ); } public show_ads( taskid ) { new id = taskid - TASKID_ADS; ShowPrint( id, "%L", id, "ERS_DISPLAY_ADS", g_CmdChat ); } public cmd_Say( id ) { if( !get_pcvar_num( p_enabled ) ) return PLUGIN_CONTINUE; static sMsg[64]; read_argv( 1, sMsg, charsmax( sMsg ) ); if( equali( sMsg, g_CmdChat ) ) { if( !get_pcvar_num( p_player_toggle ) ) { ShowPrint( id, "%L", id, "ERS_CMD_DISABLED" ); return PLUGIN_HANDLED; } g_pHeardSound[id] = g_pHeardSound[id] ? false : true; ShowPrint( id, "%L", id, g_pHeardSound[id] ? "ERS_SOUND_ENABLED" : "ERS_SOUND_DISABLED" ); return PLUGIN_HANDLED; } return PLUGIN_CONTINUE; } public eT_win() { if( !g_nSnd[ e_Team:T ] ) return; play_sound( e_Team:T ); } public eCT_win() { if( !g_nSnd[ e_Team:CT ] ) return; play_sound( e_Team:CT ); } play_sound( iTeam ) { static // - - - - - - - - - - - - - - - - sCurSnd[ MAX_FILE_LENGTH ]; // - - - - - - - - - - - - - - - - new iRand; if( g_nSnd[ iTeam ] > 1 ) iRand = random_num( 0, g_nSnd[ iTeam ] - 1 ); #if defined old_amxx copy( sCurSnd, MAX_FILE_LENGTH - 1, g_sTeam_sounds[ iRand ][ iTeam ] ); #else ArrayGetString( iTeam == CT ? g_lstSoundCT : g_lstSoundT, iRand, sCurSnd, MAX_FILE_LENGTH - 1 ); #endif _is_wav( sCurSnd ) ? format( sCurSnd, MAX_FILE_LENGTH - 1, "spk %s", sCurSnd[6] ) : format( sCurSnd, MAX_FILE_LENGTH - 1, "mp3 play %s", sCurSnd ); if( get_pcvar_num( p_player_toggle ) ) { static // - - - - - - - - - - - iPlayers[32], iNum, pid; // - - - - - - - - - - - get_players( iPlayers, iNum, "c" ); for( new i; i < iNum; i++ ) { pid = iPlayers[i]; if( !g_pHeardSound[pid] || is_user_bot( pid ) ) continue; client_cmd( pid, "%s", sCurSnd ); } } else client_cmd( 0, "%s", sCurSnd ); } get_prefix( sMap[], iLen_map, sMapType[], iLen_type ) { new // - - - - - - - - - sRest[32]; // - - - - - - - - - get_mapname( sMap, iLen_map ); strtok( sMap, sMapType, iLen_type, sRest, charsmax( sRest ), '_', 1 ); } loading_file() { static // - - - - - - - - - - - - - - - - - sPath[ MAX_FILE_LENGTH ], // | sConfigsDir[64], sPrefix[6], sMap[32]; // - - - - - - - - - - - - - - - - - get_prefix( sMap, charsmax( sMap ), sPrefix, charsmax( sPrefix ) ); get_configsdir( sConfigsDir, charsmax( sConfigsDir ) ); new bool:bFound; for( new i = 1; i <= 3; i++ ) { switch( i ) { case 1 : formatex( sPath, charsmax( sPath ), "%s/%s/prefix-%s.%s", sConfigsDir, g_FileFolder, sPrefix, g_FilePrefix ); case 2 : formatex( sPath, charsmax( sPath ), "%s/%s/%s.%s", sConfigsDir, g_FileFolder, sMap, g_FilePrefix ); case 3 : formatex( sPath, charsmax( sPath ), "%s/%s.%s", sConfigsDir, g_FileName, g_FilePrefix ); default : break; } if( !CheckFile( sPath ) ) continue; bFound = true; break; } log_amx( "---" ); bFound ? log_amx( "%L", LANG_SERVER, "ERS_LOG_LOADING", sPath ) : log_amx( "%L", LANG_SERVER, "ERS_LOG_NO_FILES_FOUND" ); load_sound( sPath ); } load_sound( const file[] ) { new // - - - - - - - - - - - - - - - sBuffer[256], // | sLeft[ MAX_FILE_LENGTH ], sRight[4], sExt[6], // | eTeam; // - - - - - - - - - - - - - - - new fp = fopen( file, "rt" ); while( !feof( fp ) ) { fgets( fp, sBuffer, charsmax( sBuffer ) ); trim( sBuffer ); if( !sBuffer[0] || sBuffer[0] == ';' || ( sBuffer[0] == '/' && sBuffer[1] == '/' ) ) continue; if( sBuffer[0] != '"' || strlen( sBuffer ) < 11 ) continue; parse( sBuffer, sLeft, charsmax( sLeft ), sRight, charsmax( sRight ) ); formatex( sExt, charsmax( sExt ), sLeft[ strlen( sLeft ) - 4 ] ); if( equali( sExt, ".mp3" ) == -1 || equali( sExt, ".wav" ) == -1 ) { log_amx( "%L", LANG_SERVER, "ERS_LOG_UNKNOW_EXTENSION", sExt ); continue; } if( !file_exists( sLeft ) ) { log_amx( "%L", LANG_SERVER, "ERS_LOG_INEXISTENT_FILE", sLeft ); continue; } eTeam = NULL; if( equali( sRight, "CT" ) ) eTeam = CT; else if( equali( sRight, "T" ) ) eTeam = T; if( eTeam == NULL ) { log_amx( "%L", LANG_SERVER, "ERS_LOG_NO_TEAM_SOUND", sLeft ); continue; } #if defined old_amxx copy( g_sTeam_sounds[ g_nSnd[ eTeam ] ][ eTeam ], MAX_FILE_LENGTH - 1, sLeft ); #else ArrayPushString( eTeam == CT ? g_lstSoundCT : g_lstSoundT, sLeft ); #endif ++g_nSnd[ eTeam ]; } fclose( fp ); if( g_nSnd[ e_Team:T ] > 1 || g_nSnd[ e_Team:CT ] > 1 ) { new iMax_t, iMax_ct; GetPrecacheValue( iMax_t, iMax_ct ); #if defined old_amxx UpdateArray( iMax_t, e_Team:T ); UpdateArray( iMax_ct, e_Team:CT ); #else p_DeleteRandomItem( iMax_t , e_Team:T , g_lstSoundT ); p_DeleteRandomItem( iMax_ct, e_Team:CT, g_lstSoundCT ); #endif } log_amx( "---" ); #if defined _DEBUG log_amx( "[ Loading %d CTs Sounds ]", g_nSnd[ e_team:CT ] ); #endif #if defined old_amxx PrecacheSounds( e_Team:CT ); #else PrecacheSounds_n( g_lstSoundCT ); #endif #if defined _DEBUG log_amx( "[ Loading %d Ts Sounds ]", g_nSnd[ e_team:T ] ); #endif #if defined old_amxx PrecacheSounds( e_Team:T ); #else PrecacheSounds_n( g_lstSoundT ); #endif } GetPrecacheValue( &iMax_t, &iMax_ct ) { new s_Value[12]; get_pcvar_string( p_random_precache, s_Value, charsmax( s_Value ) ); trim( s_Value ); new pos = contain( s_Value, "-" ); if( pos > 0 ) { iMax_ct = str_to_num( s_Value[ pos + 1 ] ) s_Value[ pos ] = '^0'; iMax_t = str_to_num( s_Value ); } else { iMax_t = str_to_num( s_Value ); iMax_ct = iMax_t; } } stock UpdateArray( iMax, iTeam ) { new const iCnt_sound = g_nSnd[ iTeam ]; if( !iMax || iMax == iCnt_sound ) return; if( iMax >= iCnt_sound ) iMax = iCnt_sound - 1; static sTmp_sounds[ MAX_SOUNDS ][ e_Team ][ MAX_FILE_LENGTH ], iLast_number[ MAX_SOUNDS ]; new i, iRand; for( i = 0; i < iCnt_sound; i++ ) { copy( sTmp_sounds[i][ iTeam ], MAX_FILE_LENGTH - 1, g_sTeam_sounds[i][ iTeam ] ); g_sTeam_sounds[i][ iTeam ][0] = '^0'; } arrayset( iLast_number, 0, charsmax( iLast_number ) ); i = 0; while( i != iMax ) { check: iRand = random_num( 0, iCnt_sound - 1 ); if( iLast_number[ iRand ] ) goto check; copy( g_sTeam_sounds[i][ iTeam ], MAX_FILE_LENGTH - 1, sTmp_sounds[ iRand ][ iTeam ] ); ++i; iLast_number[ iRand ] = 1; } g_nSnd[ iTeam ] = iMax; } stock p_DeleteRandomItem( iMax, iTeam, Array:sSound_a ) { new const iCnt_sound = g_nSnd[ iTeam ]; if( !iMax || iMax == iCnt_sound ) return; if( iMax >= iCnt_sound ) iMax = iCnt_sound - 1; DeleteRandomItem( iCnt_sound - iMax, sSound_a ); g_nSnd[ iTeam ] = iMax; } stock DeleteRandomItem( iRandom_n, Array:sSound_a ) { new i; while( i++ != iRandom_n ) ArrayDeleteItem( sSound_a, random_num( 0, ArraySize( sSound_a ) - 1 ) ); } stock PrecacheSounds( iTeam ) { for( new i; i < g_nSnd[ iTeam ]; i++ ) { PrecacheFile( g_sTeam_sounds[i][ iTeam ] ); #if defined _DEBUG log_amx( " - %s", g_sTeam_sounds[i][ iTeam ] ); #endif } log_amx( "---" ); } stock PrecacheSounds_n( Array:sSound_a ) { static // - - - - - - - - - - - - - - - - - - - sFile[ MAX_FILE_LENGTH ], iFileLen = charsmax( sFile ); // - - - - - - - - - - - - - - - - - - - for( new i; i < ArraySize( sSound_a ); i++ ) { ArrayGetString( sSound_a, i, sFile, iFileLen ); PrecacheFile( sFile ); #if defined _DEBUG log_amx( " - %s", sFile ); #endif } log_amx( "---" ); } PrecacheFile( const sound[] ) { _is_wav( sound ) ? engfunc ( EngFunc_PrecacheSound, sound[6] ) : engfunc ( EngFunc_PrecacheGeneric, sound ); } ShowPrint( id, const sMsg[], { Float, Sql, Result, _ }:... ) { static // - - - - - - - - - newMsg[191], message[191], // | tNewMsg; // - - - - - - - - - tNewMsg = charsmax( newMsg ); vformat( newMsg, tNewMsg, sMsg, 3 ); replace_all( newMsg, tNewMsg, "!t", "^3" ); replace_all( newMsg, tNewMsg, "!g", "^4" ); replace_all( newMsg, tNewMsg, "!n", "^1" ); formatex( message, charsmax( message ), "^4[ERS]^1 %s", newMsg ); message_begin( MSG_ONE, g_msgSayText, _, id ); write_byte( id ); write_string( message ); message_end(); } bool:CheckFile( const file[] ) { new // - - - - - - - - - - - - - - - - - sBuffer[256], fp = fopen( file, "rt" ); // - - - - - - - - - - - - - - - - - if( !fp ) return false; while( !feof( fp ) ) { fgets( fp, sBuffer, charsmax( sBuffer ) ); trim( sBuffer ); if( !sBuffer[0] || sBuffer[0] == ';' || ( sBuffer[0] == '/' && sBuffer[1] == '/' ) || sBuffer[0] != '"' ) continue; if( ( contain( sBuffer, ".mp3^"" ) != -1 || contain( sBuffer, ".wav^"" ) != -1 ) && ( contain( sBuffer, "^"T^"" ) != -1 || contain( sBuffer, "^"CT^"" ) != -1 ) ) return true; } fclose( fp ); return false; } Przeczytaj cały wpis
  7. This plugin adds lots of cvars to configure charger pound damage and damage of the charge impact on other survivors per difficulty. Cvars Code: // This file was auto-generated by SourceMod (v1.12.0.7133) // ConVars for plugin "disabled\l4d2_charger_scale_difficulty.smx" // Impact damage of charge on advanced difficulty // - // Default: "15" charger_scaling_charge_advanced "15" // Impact damage of charge on easy difficulty // - // Default: "5" charger_scaling_charge_easy "5" // Impact damage of charge on expert difficulty // - // Default: "20" charger_scaling_charge_expert "20" // Impact damage of charge on normal difficulty // - // Default: "10" charger_scaling_charge_normal "10" // Pound damage for the charger on advanced difficulty // - // Default: "22" charger_scaling_pound_advanced "22" // Pound damage for the charger on easy difficulty // - // Default: "8" charger_scaling_pound_easy "8" // Pound damage for the charger on expert difficulty // - // Default: "30" charger_scaling_pound_expert "30" // Pound damage for the charger on normal difficulty // - // Default: "15" charger_scaling_pound_normal "15" // Damage multiplier when victim is incapacitated while getting pummelled by a charger // - // Default: "3" // Minimum: "0.000000" // Maximum: "4096.000000" z_charger_incap_mult "3" Requires L4Dhooks and liquidHelpers. Clicking 'Get Plugin' won't work, download the .smx and put it into sourcemod\plugins or download source and compile it yourself. Changelog: Code: 1.0 - First Release Attached Files Get Plugin or Get Source (l4d2_charger_scale_difficulty.sp - 5.1 KB) l4d2_charger_scale_difficulty.smx (7.5 KB) Wyświetl pełny artykuł
  8. Can Someone Change This Plugin So It Can Count Bots, And Not Just Players Attached Files Get Plugin or Get Source (player.sma - 1.1 KB) Przeczytaj cały wpis
  9. Map Weapons Manager Inspired by AMXX plugin by danielkza. The reason I made this plugin is because I myself was looking for a plugin that could do this, but couldn't find any. Hopefully this will be of use to someone who is also looking for similar functionality. Usage: It's simple, enable the debug cvar and pickup a weapon that has been spawned by the map to be respawned. Once picked up there will be a log in the client console, with a command you can simply copy and paste into the console and click enter. Now there will be a file generated in the configs folder (map_weapon_spawns/map_name.spawns.txt) Cvars: sm_map_weapons_manager_on <0|1> - Enables the respawning functionality. (Default: 1) sm_map_weapons_manager_debug <0|1> - Enables debug messages useful when adding new locations. (Default: 0) sm_map_weapons_manager_time <time> - Set how long to wait before respawning the weapon. (Default: 10) Note: plugin.map_weapons_manager.cfg will be automatically generated in your SourceMod cfg directory. Commands: sm_create_weapon_spawn <weapon_name> <x> <y> <z> <angX> <angY> <angZ> - Creates weapon spawn at specified location for current map. (ADMFLAG_GENERIC) Attached Files Get Plugin or Get Source (map_weapons_manager.sp - 9.2 KB) map_weapons_manager.phrases.txt (793 Bytes) Wyświetl pełny artykuł
  10. With this plugin, you can set cvars and their values to remain unchanged, ensuring they always maintain the same value. Add 'immutable_cvars.ini' in your configs folder. Attached Files Get Plugin or Get Source (amxx_immutable_cvars.sma - 1.9 KB) immutable_cvars.ini (33 Bytes) Przeczytaj cały wpis
  11. https://forums.alliedmods.net/showthread.php?t=23824 Could he please just change it to Does the bot have no fall damage? or TR Attached Files Get Plugin or Get Source (no_fall_damage.sma - 763 Bytes) Przeczytaj cały wpis
  12. Hello , i found this plugin made by OciXCrom and i want to do few settings if somebody can help. P.S original had AWP as well but i deleted. Code: #include <amxmodx> #include <cstrike> #include <fun> #include <hamsandwich> new g_iMenu public plugin_init() { register_plugin("Weapons Menu", "1.0", "OciXCrom") RegisterHam(Ham_Spawn, "player", "OnPlayerSpawn", 1) CreateMenu() } CreateMenu() { g_iMenu = menu_create("Select your \rweapons\y!", "Menu_Handler") menu_additem(g_iMenu, "\wAK47 \y+ \wDeagle") menu_additem(g_iMenu, "\wM4A1 \y+ \wDeagle") } public OnPlayerSpawn(id) { if(!is_user_alive(id)) return menu_display(id, g_iMenu) } public Menu_Handler(id, iMenu, iItem) { switch(iItem) { case MENU_EXIT: return case 0: { give_item(id, "weapon_ak47") cs_set_user_bpammo(id, CSW_AK47, 90) } case 1: { give_item(id, "weapon_m4a1") cs_set_user_bpammo(id, CSW_M4A1, 90) } } give_item(id, "weapon_deagle") cs_set_user_bpammo(id, CSW_DEAGLE, 35) if(cs_get_user_team(id) == CS_TEAM_CT) give_item(id, "item_thighpack") } 1. Menu weapons last for 10s 2. You can't carry more then 1 primary and 1 secondary wep. (now you can have 2-3 primary). Or if exist a similar plugin , can somebody link me ? already had a lot of search on google. Thank you . Przeczytaj cały wpis
  13. Hey there, so I installed newest regamedll 5.26, because my csstatsX doesn't work with older versions. And I encounter a problem. I have a plugin(support is dead for years there). It's HNS DM, so the problem is, on older regamedll version when Terrorist dies by falling from the height , random CT become a Terrorist. It does work on regamedll 5.21.0.576 but my csstatsX otherwise. PHP Code: #include <amxmodx> #include <engine> #include <fakemeta> #include <cstrike> #include <hamsandwich> #include <fun> new const g_Plugin[] = "HNS Deathmatch"; new const g_Version[] = "2.2.1"; new const g_Author[] = "Jon"; #define m_fHasPrimary 116 #define m_iJoinedState 121 #define m_iMenu 205 #define MENU_CHOOSETEAM 1 #define MENU_CHOOSEAPPEARANCE 3 new g_CvarEnable, g_CvarGameName, g_CvarStabOnly, g_CvarRespawnDelay, g_CvarProtectionTime, g_CvarNoFlash, g_CvarHidersFlashbangs, g_CvarHidersSmokegrenade, g_CvarHidersHegrenade, g_CvarSeekersFlashbangs, g_CvarSeekersSmokegrenade, g_CvarSeekersHegrenade, Trie:g_tBuyAliases, Trie:g_tRemoveEntities public plugin_init() { register_plugin(g_Plugin, g_Version, g_Author); set_pcvar_string( register_cvar("hns_deathmatch_version", g_Version, FCVAR_SERVER), g_Version ) g_CvarEnable = register_cvar("hnsdm_enable", "1"); if(!get_pcvar_num(g_CvarEnable)) return new gamename[32]; formatex(gamename, charsmax(gamename), "%s %s", g_Plugin, g_Version); g_CvarGameName = register_cvar("hnsdm_gamename", gamename); g_CvarStabOnly = register_cvar("hnsdm_stabonly", "1"); g_CvarRespawnDelay = register_cvar("hnsdm_respawndelay", "1.5"); g_CvarProtectionTime = register_cvar("hnsdm_protectiontime", "5.0"); g_CvarNoFlash = register_cvar("hnsdm_noflash", "1"); g_CvarHidersFlashbangs = register_cvar("hnsdm_hiders_flashbangs", "1") g_CvarHidersSmokegrenade = register_cvar("hnsdm_hiders_smokegrenade", "1") g_CvarHidersHegrenade = register_cvar("hnsdm_hiders_hegrenade", "0") g_CvarSeekersFlashbangs = register_cvar("hnsdm_seekers_flashbangs", "0") g_CvarSeekersSmokegrenade = register_cvar("hnsdm_seekers_smokegrenade", "0") g_CvarSeekersHegrenade = register_cvar("hnsdm_seekers_hegrenade", "0") register_event("DeathMsg", "eventDeathMsg", "a"); register_message(get_user_msgid("ScreenFade"), "msgScreenFade"); register_forward(FM_CmdStart, "fwdCmdStart"); register_forward(FM_GetGameDescription,"fwdGetGameDescription"); RegisterHam(Ham_Spawn, "player", "eventPlayerSpawn", 1); register_clcmd("buy", "HandleBlock"); register_clcmd("buyammo1", "HandleBlock"); register_clcmd("buyammo2", "HandleBlock"); register_clcmd("buyequip", "HandleBlock"); register_clcmd("cl_autobuy", "HandleBlock"); register_clcmd("cl_rebuy", "HandleBlock"); register_clcmd("cl_setautobuy", "HandleBlock"); register_clcmd("cl_setrebuy", "HandleBlock"); register_clcmd("chooseteam", "HandleBlock"); register_clcmd("say /respawn", "RespawnPlayer"); register_clcmd("jointeam", "ClCmd_jointeam") register_clcmd("joinclass", "ClCmd_joinclass") register_clcmd("menuselect", "ClCmd_joinclass") new BuyCommands[][] = { "usp", "glock", "deagle", "p228", "elites", "fn57", "m3", "xm1014", "mp5", "tmp", "p90", "mac10", "ump45", "ak47", "galil", "famas", "sg552", "m4a1", "aug", "scout", "awp", "g3sg1", "sg550", "m249", "vest", "vesthelm", "flash", "hegren", "sgren", "defuser", "nvgs", "shield", "primammo", "secammo", "km45", "9x19mm", "nighthawk", "228compact", "fiveseven", "12gauge", "autoshotgun", "mp", "c90", "cv47", "defender", "clarion", "krieg552", "bullpup", "magnum", "d3au1", "krieg550", "buy", "buyequip", "buyammo1", "buyammo2" } g_tBuyAliases = TrieCreate() for(new i; i<sizeof( BuyCommands ); i++) { strtolower( BuyCommands[i] ) TrieSetCell(g_tBuyAliases, BuyCommands[i], 1) } } public plugin_precache() { new EntityClassNames[][] = { "func_breakable", "func_door_rotating", "func_door", "func_vip_safetyzone", "func_escapezone", "hostage_entity", "monster_scientist", "func_bomb_target", "info_bomb_target" } g_tRemoveEntities = TrieCreate() for(new i; i<sizeof( EntityClassNames ); i++) { TrieSetCell(g_tRemoveEntities, EntityClassNames[i], 1) } } public ClCmd_jointeam( id ) { if( get_pdata_int(id, m_iMenu) != MENU_CHOOSETEAM ) { return PLUGIN_HANDLED } return PLUGIN_CONTINUE } public ClCmd_joinclass( id ) { if( get_pdata_int(id, m_iMenu) == MENU_CHOOSEAPPEARANCE ) { set_task(get_pcvar_float(g_CvarRespawnDelay), "RespawnPlayer", id) } return PLUGIN_CONTINUE } public eventDeathMsg() { new killer = read_data(1) new victim = read_data(2) if(killer == 0) { if( cs_get_user_team(victim) == CS_TEAM_T ) { new lucky = GetRandomCT(); if( lucky ) { cs_set_user_team(lucky, CS_TEAM_T) client_print(lucky, print_chat, "[HNS] An idiot jumped off and you were lucky and got transfered to Terrorist.") cs_set_user_team(victim, CS_TEAM_CT); GiveItems(lucky) SetStealth(lucky) } } } else if(killer != victim && cs_get_user_team(killer) == CS_TEAM_CT) { cs_set_user_team(killer, CS_TEAM_T); cs_set_user_team(victim, CS_TEAM_CT); GiveItems(killer) SetStealth(killer) } set_task(get_pcvar_float(g_CvarRespawnDelay), "RespawnPlayer", victim) } public eventPlayerSpawn(id) { if(is_user_alive(id)) GiveItems(id); } public RespawnPlayer(id) { if(!is_user_alive(id)) ExecuteHam(Ham_CS_RoundRespawn, id); } public fwdCmdStart(id, handle, seed) { if( get_pcvar_num(g_CvarStabOnly) && is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_CT && get_user_weapon(id) == CSW_KNIFE ) { static button button = get_uc(handle, UC_Buttons) if(button & IN_ATTACK) { set_uc(handle, UC_Buttons, (button & ~IN_ATTACK) | IN_ATTACK2) return FMRES_HANDLED } } if( get_pcvar_num(g_CvarStabOnly) && is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_T && get_user_weapon(id) == CSW_KNIFE ) { static button button = get_uc(handle, UC_Buttons) if((button & IN_ATTACK) | (button & IN_ATTACK2)) { set_uc(handle, UC_Buttons, (button & ~IN_ATTACK) & (button & ~IN_ATTACK2)) return FMRES_HANDLED } } return FMRES_IGNORED } public client_kill(id) { return PLUGIN_HANDLED } public pfn_spawn(ent) { if( is_valid_ent( ent ) ) { new class[32] pev(ent, pev_classname, class, charsmax(class)) if( TrieKeyExists(g_tRemoveEntities, class) ) { remove_entity(ent) return PLUGIN_HANDLED } } return PLUGIN_CONTINUE } public fwdGetGameDescription() { static gamename[32]; if( get_pcvar_string(g_CvarGameName, gamename, charsmax(gamename)) ) { forward_return(FMV_STRING, gamename) return FMRES_SUPERCEDE } return FMRES_IGNORED } public msgScreenFade(msgid, dest, id) { if( is_user_alive(id) && get_pcvar_num(g_CvarNoFlash) & _:cs_get_user_team(id) && get_msg_arg_int(4) == 255 && get_msg_arg_int(5) == 255 && get_msg_arg_int(6) == 255 && get_msg_arg_int(7) > 199 ) { return PLUGIN_HANDLED } return PLUGIN_CONTINUE } public client_command(id) { new sArg[13]; if(read_argv(0, sArg, 12) > 11) return PLUGIN_CONTINUE strtolower(sArg) if( TrieKeyExists(g_tBuyAliases, sArg) ) { return PLUGIN_HANDLED } return PLUGIN_CONTINUE } public HandleBlock(id) return PLUGIN_HANDLED public UnsetStealth(id) { set_user_rendering(id, _, 0, 0, 0, _, 0); } SetStealth(id) { if(get_user_health(id) != 100) set_user_health(id, 100) set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransColor, 0); set_task(get_pcvar_float(g_CvarProtectionTime), "UnsetStealth", id) } GiveItems(id) { cs_strip_user_weapons(id) switch( cs_get_user_team(id) ) { case CS_TEAM_T: { give_item(id, "weapon_knife") if(get_pcvar_num(g_CvarHidersFlashbangs)) { give_item(id, "weapon_flashbang") cs_set_user_bpammo(id, CSW_FLASHBANG, get_pcvar_num(g_CvarHidersFlashbangs)) } if(get_pcvar_num(g_CvarHidersSmokegrenade)) give_item(id, "weapon_smokegrenade") if(get_pcvar_num(g_CvarHidersHegrenade)) give_item(id, "weapon_hegrenade") } case CS_TEAM_CT: { give_item(id, "weapon_knife") if(get_pcvar_num(g_CvarSeekersFlashbangs)) { give_item(id, "weapon_flashbang") cs_set_user_bpammo(id, CSW_FLASHBANG, get_pcvar_num(g_CvarSeekersFlashbangs)) } if(get_pcvar_num(g_CvarSeekersSmokegrenade)) give_item(id, "weapon_smokegrenade") if(get_pcvar_num(g_CvarSeekersHegrenade)) give_item(id, "weapon_hegrenade") } } } GetRandomCT() { static iPlayers[32], iCT_num get_players(iPlayers, iCT_num, "ae", "CT"); if(!iCT_num) return 0 return iCT_num > 1 ? iPlayers[random(iCT_num)] : iPlayers[iCT_num - 1]; } cs_strip_user_weapons(id) { strip_user_weapons(id) set_pdata_int(id, m_fHasPrimary, 0) } I think the problem is here, but I'm not sure PHP Code: public eventDeathMsg() { new killer = read_data(1) new victim = read_data(2) if(killer == 0) { if( cs_get_user_team(victim) == CS_TEAM_T ) { new lucky = GetRandomCT(); if( lucky ) { cs_set_user_team(lucky, CS_TEAM_T) client_print(lucky, print_chat, "[HNS] An idiot jumped off and you were lucky and got transfered to Terrorist.") cs_set_user_team(victim, CS_TEAM_CT); GiveItems(lucky) SetStealth(lucky) } } } Thanks for your attention Przeczytaj cały wpis
  14. I'm using this DBZ mod plugin but this line shows "Run time error 4: index out of bounds" from time to time. Sometimes the plugin works but sometimes it doesn't. How can I solve this? PHP Code: public client_putinserver(player_id) { get_user_name(player_id, g_playername[player_id], charsmax(g_playername[])) // Cache player's name g_is_user_connected[player_id] = true g_players_connected[g_players_count] = player_id /// line 992 if(!g_players_count) set_task(1.0, "iterate_through_players", TASK_LOOP_PLAYERS, _, _, "b") g_players_count++ } public iterate_through_players() { static player_id static spectator_id for(g_current_index = 0; g_current_index < g_players_count; g_current_index++) { player_id = g_players_connected[g_current_index] if(is_user_valid_alive(player_id)) { ShowHUD(player_id, player_id) dbz_loop(player_id) } else // Player died? { // Get spectator target spectator_id = pev(player_id, pev_iuser2) if(is_user_valid_alive(spectator_id)) ShowHUD(player_id, spectator_id) } } } Przeczytaj cały wpis
  15. Replay Grenade v1.0 - BETA - Description This feature replays the path of the grenade you threw by typing .rethrow in the chat. - Demonstration - Known issues The path may not be 100% accuracy sometimes. Also, will think in a better way to copy the grenades effects rather than hardcode them. Attached Files Get Plugin or Get Source (replayGrenade.sma - 9.1 KB) Przeczytaj cały wpis
×
×
  • Dodaj nową pozycję...