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

simple plugin request (sma to sp)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
generals
Senior Member
Join Date: Aug 2018
Old 09-21-2019 , 04:52   simple plugin request (sma to sp)
Reply With Quote #1

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;


Last edited by generals; 09-21-2019 at 04:53.
generals is offline
philipjfry
Junior Member
Join Date: Sep 2019
Location: Somewhere in europe
Old 09-24-2019 , 09:35   Re: simple plugin request (sma to sp)
Reply With Quote #2

Can you expand more on what the plugin should do? is this for css?
philipjfry is offline
generals
Senior Member
Join Date: Aug 2018
Old 09-25-2019 , 03:40   Re: simple plugin request (sma to sp)
Reply With Quote #3

this is not for css . I want someone to convert this plugin to css

Last edited by generals; 09-25-2019 at 03:46.
generals is offline
zipcore
Veteran Member
Join Date: Mar 2010
Location: m_flZipcore
Old 09-25-2019 , 07:26   Re: simple plugin request (sma to sp)
Reply With Quote #4

Quote:
Originally Posted by philipjfry View Post
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.
__________________
zipcore is offline
SZOKOZ
Member
Join Date: Jan 2014
Old 09-29-2019 , 18:31   Re: simple plugin request (sma to sp)
Reply With Quote #5

Still need?
__________________
May still be available for SM scripting. Just look at my Steam profile regarding my availability.
My Steam
SZOKOZ is offline
generals
Senior Member
Join Date: Aug 2018
Old 10-02-2019 , 14:06   Re: simple plugin request (sma to sp)
Reply With Quote #6

yes

can u help?
generals is offline
SZOKOZ
Member
Join Date: Jan 2014
Old 10-03-2019 , 15:18   Re: simple plugin request (sma to sp)
Reply With Quote #7

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;
}
__________________
May still be available for SM scripting. Just look at my Steam profile regarding my availability.
My Steam
SZOKOZ is offline
generals
Senior Member
Join Date: Aug 2018
Old 10-05-2019 , 14:34   Re: simple plugin request (sma to sp)
Reply With Quote #8

hi

thanks but bots still shooting

i want bots don't attack together until infection begin (zombie reloaded plugin)
generals is offline
zipcore
Veteran Member
Join Date: Mar 2010
Location: m_flZipcore
Old 10-06-2019 , 06:04   Re: simple plugin request (sma to sp)
Reply With Quote #9

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
__________________

Last edited by zipcore; 10-06-2019 at 06:08.
zipcore is offline
generals
Senior Member
Join Date: Aug 2018
Old 10-28-2019 , 14:00   Re: simple plugin request (sma to sp)
Reply With Quote #10

hi.. tnx but doesn't work

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

i want for css

Last edited by generals; 10-28-2019 at 14:01.
generals is offline
Reply


Thread Tools
Display Modes

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 19:55.


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