This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

CSG0 - noclipme edit


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
XHUNTERX
Senior Member
Join Date: Aug 2019
Location: World
Old 10-15-2020 , 23:20   CSG0 - noclipme edit
Reply With Quote #1

https://forums.alliedmods.net/showthread.php?t=209155

Code:
#pragma semicolon 1
 
#include <sourcemod>
 
#define PLUGIN_VERSION "1.0.1"
 
public Plugin:myinfo =
{
    name        =    "Self Noclip",
    author        =    "killjoy",
    description    =    "personal noclip for Donators",
    version        =    PLUGIN_VERSION,
    url            =    "http://www.epic-nation.com"
};
 
public OnPluginStart()
{
    RegAdminCmd("sm_noclipme",NoclipMe,ADMFLAG_RESERVATION,"Toggles noclip on yourself");
}
 
public Action:NoclipMe(client, args)
{
	decl String:sAuthID[MAX_NAME_LENGTH];
	decl String:strName[MAX_NAME_LENGTH];
	GetClientAuthId(client, AuthId_Steam2, sAuthID, sizeof(sAuthID));
	GetClientName(client, strName, sizeof(strName));
	
	if( client < 1 || !IsClientInGame(client) || !IsPlayerAlive(client ))
	{
		ReplyToCommand(client, "\x04[SM] \x05You need to be alive to use noclip");
		return Plugin_Handled;
	}
	if (GetEntityMoveType(client) != MOVETYPE_NOCLIP)
	{
		LogAction(client, client, "%s (%s) Enabled noclip", strName, sAuthID);
		SetEntityMoveType(client, MOVETYPE_NOCLIP);
		ReplyToCommand(client, "\x04[SM] \x05Noclip Enabled");
	}
	else
	{
		LogAction(client, client, "%s (%s) Disabled noclip", strName, sAuthID);
		SetEntityMoveType(client, MOVETYPE_WALK);
		ReplyToCommand(client, "\x04[SM] \x05Noclip Disabled");
	}
	return Plugin_Handled;
}
hello;
Can you add time + round limit to this plugin?
each round can be used 1 time
Stays active for 5 seconds then returns to normal

not just ADMFLAG_RESERVATION ( every living player can use )

thanks

Last edited by XHUNTERX; 10-15-2020 at 23:28.
XHUNTERX is offline
 



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 00:51.


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