AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   simple plugin request (sma to sp) (https://forums.alliedmods.net/showthread.php?t=318793)

generals 09-21-2019 04:52

simple plugin request (sma to sp)
 
hi

anyone can convert this plugin to sp? (i want for zombie reloaded)

PHP Code:

#include <amxmodx>
#include <fakemeta>
#include <zombieplague>

public plugin_init()
{
    
register_plugin("Bot not attack when round begin""0.1""Dolph_ziggler")
    
register_forwardFM_CmdStart "fm_CmdStart" );
}

public 
fm_CmdStart(id,Handle)
{
    new 
ButtonsButtons get_uc(Handle,UC_Buttons);
    if(
is_user_bot(id) && !zp_has_round_started())
    {
        
Buttons &= ~IN_ATTACK;
        
set_ucHandle UC_Buttons Buttons );
        return 
FMRES_SUPERCEDE;
    }
    return 
FMRES_IGNORED;



philipjfry 09-24-2019 09:35

Re: simple plugin request (sma to sp)
 
Can you expand more on what the plugin should do? is this for css?

generals 09-25-2019 03:40

Re: simple plugin request (sma to sp)
 
this is not for css . I want someone to convert this plugin to css

zipcore 09-25-2019 07:26

Re: simple plugin request (sma to sp)
 
Quote:

Originally Posted by philipjfry (Post 2667994)
Can you expand more on what the plugin should do? is this for css?

If you are using bots on an open view map, they instantly start shooting at you when the freezetime ends. This plugin should block this behaviour.

SZOKOZ 09-29-2019 18:31

Re: simple plugin request (sma to sp)
 
Still need?

generals 10-02-2019 14:06

Re: simple plugin request (sma to sp)
 
yes

can u help?

SZOKOZ 10-03-2019 15:18

Re: simple plugin request (sma to sp)
 
Code:

#pragma semicolon 1

#define DEBUG

#define PLUGIN_AUTHOR "SZOKOZ/EXE KL"
#define PLUGIN_VERSION "1.00"

#include <sourcemod>

#pragma newdecls required

bool g_bRoundStarted;
public Plugin myinfo =
{
        name = "Bots No Shoot",
        author = PLUGIN_AUTHOR,
        description = "Prevents bots from shooting before round starts.",
        version = PLUGIN_VERSION,
        url = "szokoz.eu"
};

public void OnPluginStart()
{
        HookEvent("round_start", Event_RoundStart, EventHookMode_PostNoCopy);
        HookEvent("round_end", Event_RoundEnd, EventHookMode_PostNoCopy);
}

public Action Event_RoundStart(Event event, const char[] name, bool dontBroadcast)
{
        g_bRoundStarted = true;
}

public Action Event_RoundEnd(Event event, const char[] name, bool dontBroadcast)
{
        g_bRoundStarted = false;
}

public Action OnPlayerRunCmd(int client, int& buttons, int& impulse,
float vel[3], float angles[3], int& weapon, int& subtype, int& cmdnum,
int& tickcount, int& seed, int mouse[2])
{
        if (IsFakeClient(client) && !g_bRoundStarted)
        {
                buttons &= ~IN_ATTACK;
                return Plugin_Changed;
        }
       
        return Plugin_Continue;
}


generals 10-05-2019 14:34

Re: simple plugin request (sma to sp)
 
hi

thanks but bots still shooting

i want bots don't attack together until infection begin (zombie reloaded plugin)

zipcore 10-06-2019 06:04

Re: simple plugin request (sma to sp)
 
PHP Code:

#pragma semicolon 1

#define PLUGIN_AUTHOR "Zipcore"
#define PLUGIN_VERSION "1.0"

#define UNLOCKTIME 5.0

#include <sourcemod>

public Plugin myinfo 
{
    
name "Bots No Shoot",
    
author PLUGIN_AUTHOR,
    
description "Prevents bots from shooting before round starts.",
    
version PLUGIN_VERSION,
    
url "zipcore#googlemail.com"
};

ConVar bot_dont_shoot;
Handle g_hTimer;

public 
void OnPluginStart()
{
    
HookEvent("round_start"Event_RoundStartEventHookMode_PostNoCopy);
    
HookEvent("round_end"Event_RoundEndEventHookMode_PostNoCopy);
    
    
bot_dont_shoot FindConVar("bot_dont_shoot");
    
    
SetConVarFlags(bot_dont_shootGetConVarFlags(bot_dont_shoot) ^ FCVAR_NOTIFY);
}

public 
void OnMapEnd()
{
    
g_hTimer null;
}

public 
Action Event_RoundStart(Event event, const char[] namebool dontBroadcast)
{
    
ResetTimer();
    
g_hTimer CreateTimer(UNLOCKTIMETimer_AllowBotsShoot_TIMER_FLAG_NO_MAPCHANGE);
    
bot_dont_shoot.SetInt(1falsefalse);
}

public 
Action Event_RoundEnd(Event event, const char[] namebool dontBroadcast)
{
    
ResetTimer();
}

public 
Action Timer_AllowBotsShoot(Handle timerany data)
{
    
bot_dont_shoot.SetInt(0falsefalse);
    return 
Plugin_Handled;
}

void ResetTimer()
{
    if(
g_hTimer != null)
        
delete g_hTimer;
    
g_hTimer null;


Havn't tested it, but this is another method, instead of removing the attack button all the time it uses bot_dont_shoot a ConVar which is part of CS:GO

generals 10-28-2019 14:00

Re: simple plugin request (sma to sp)
 
hi.. tnx but doesn't work

i think u must use: #include <zombiereloaded> to work

i want for css


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

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