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

NoSpread only for vips


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SnowHP
Senior Member
Join Date: Sep 2016
Location: Porto, Portugal
Old 04-28-2018 , 05:01   NoSpread only for vips
Reply With Quote #1

Hi can someone make this plugin for my surf server.
like this one https://forums.alliedmods.net/showthread.php?t=286786 but only fot vips flag "o" and for all weapons
__________________
SnowHP is offline
Markiez
Junior Member
Join Date: Mar 2018
Location: somewhere over the rainb
Old 05-06-2018 , 14:20   Re: NoSpread only for vips
Reply With Quote #2

No spread, no recoil, same shit? if so, this is the way you wanna go:
Code:
#include <sourcemod>

#pragma semicolon 1

public void OnPluginStart()
{
	HookEvent("player_spawn", Event_Spawn);
}

public Action Event_Spawn(Event event, const char[] name, bool dbc)
{
	new client = GetClientOfUserId(GetEventInt(event, "userid"));
	
	if (CheckCommandAccess(client, "vip", ADMFLAG_CUSTOM6))
	{
		FakeClientCommand(client, "weapon_recoil_view_punch_extra 0");
	}
}
__________________
bool am_I_retarded = true;
Markiez is offline
ThatKidWhoGames
Veteran Member
Join Date: Jun 2013
Location: IsValidClient()
Old 05-07-2018 , 17:43   Re: NoSpread only for vips
Reply With Quote #3

Quote:
Originally Posted by Markiez View Post
No spread, no recoil, same shit? if so, this is the way you wanna go:
Code:
#include <sourcemod>

#pragma semicolon 1

public void OnPluginStart()
{
	HookEvent("player_spawn", Event_Spawn);
}

public Action Event_Spawn(Event event, const char[] name, bool dbc)
{
	new client = GetClientOfUserId(GetEventInt(event, "userid"));
	
	if (CheckCommandAccess(client, "vip", ADMFLAG_CUSTOM6))
	{
		FakeClientCommand(client, "weapon_recoil_view_punch_extra 0");
	}
}
You are not checking if the client is valid or not.
ThatKidWhoGames 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 01:06.


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