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