Raised This Month: $51 Target: $400
 12% 

Awp only server settings


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
OtgTravis
Member
Join Date: Apr 2016
Old 04-30-2018 , 17:32   Awp only server settings
Reply With Quote #1

as the title says, im looking for a plugin or rather settings to make my server only snipers, even on other none awp snipers maps such as fy_pool_day etc only snipers where people spawn with snipers and knife only, is there some settings in the cfg i need to make a plugin?

thanks in advance.
OtgTravis is offline
zwetch
Senior Member
Join Date: Aug 2015
Location: South Africa
Old 05-01-2018 , 03:13   Re: Awp only server settings
Reply With Quote #2

I saw u were looking for smthing like this in another thread.

I didnt create this code, its just something that i use on my combat surf server..

You can change the weapon_name in the code to a different sniper names to get the same effect. (weapon_ssg08 etc)

This is a One Shot Kill for the awp. You can change the dmg in the code also "damage *= 2.0;".

Code:
//Pragma
#pragma semicolon 1
#pragma newdecls required
 
//Sourcemod Includes
#include <sourcemod>
#include <sdktools>
#include <sdkhooks>
 
public void OnPluginStart()
{
    for (int i = 1; i <= MaxClients; i++)
    {
        if (IsClientInGame(i))
        {
            OnClientPutInServer(i);
        }
    }
}
 
public void OnClientPutInServer(int client)
{
    SDKHook(client, SDKHook_OnTakeDamage, OnTakeDamage);
}
 
public Action OnTakeDamage(int victim, int &attacker, int &inflictor, float &damage, int &damagetype)
{
    if (attacker == 0 || attacker > MaxClients)
    {
        return Plugin_Continue;
    }
 
    int active = GetEntPropEnt(attacker, Prop_Send, "m_hActiveWeapon");
 
    if (!IsValidEntity(active))
    {
        return Plugin_Continue;
    }
 
    char sClassname1[32];
    GetEntityClassname(active, sClassname1, sizeof(sClassname1));
 
    if (StrContains(sClassname1, "weapon_awp") != -1)
    {
        damage *= 2.0;
        return Plugin_Changed;
    }
 
    return Plugin_Continue;
}

For changing the server to awp only, you can do that in the gamemodes_*.cfg that u are using or by using custom map configs. ( Map Configs ).

Map configs are good for a lot of things. At one stage I setup a server for fun to test this.
You can run different Timer plugins per map or per map type by using load and unload in the configs, you can do this with 100's of plugins per map or use the above awp plugin on only certain maps and not others. You can make a Minigames/Deathrun/Kz/Bhop/Surf/Combat surf server all in one if u wanted.. Its rather fun to play around with.

This is what you need to change in the gamemodes_casual.cfg / gamemode_competitive / gamemode_deathmatch etc. This can be somewhat buggy with maps that auto spawn it's own start weapons. (maybe someone else has a plugin for this)

Code:
mp_ct_default_melee								        weapon_knife
mp_ct_default_secondary								weapon_usp_silencer
mp_ct_default_primary								""
mp_t_default_melee									weapon_knife
mp_t_default_secondary								weapon_glock
mp_t_default_primary								""
Yours would look like this:

Code:
mp_ct_default_melee								        weapon_knife
mp_ct_default_secondary								""
mp_ct_default_primary								weapon_awp
mp_t_default_melee									weapon_knife
mp_t_default_secondary								""
mp_t_default_primary								weapon_awp
__________________
https://forums.alliedmods.net/signaturepics/sigpic262740_1.gif

Last edited by zwetch; 05-01-2018 at 03:45.
zwetch is offline
OtgTravis
Member
Join Date: Apr 2016
Old 05-01-2018 , 08:12   Re: Awp only server settings
Reply With Quote #3

Worked like a charm thanks alot!
OtgTravis is offline
[email protected]
Junior Member
Join Date: Apr 2018
Location: UE,PL
Old 05-08-2018 , 18:42   Re: Awp only server settings
Reply With Quote #4

https://forums.alliedmods.net/showpo...58&postcount=5 :)
linux.user.xyz@gmail.com is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:22.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode