View Full Version : Door Open
i want a plugin that will sm_open will open all func_door or func_movinglinear and sm_close will "close" them, thanks!
#include <sourcemod>
#include <sdktools>
#pragma semicolon 1
new iEnt;
new const String:EntityList[][] = { "func_door", "func_movinglinear" };
public OnPluginStart()
{
RegConsoleCmd("sm_open", OnOpenCommand);
RegConsoleCmd("sm_close", OnCloseCommand);
}
public Action:OnOpenCommand(client, args)
{
for(new i = 0; i < sizeof(EntityList); i++)
while((iEnt = FindEntityByClassname(iEnt, EntityList[i])) != -1)
AcceptEntityInput(iEnt, "Open");
return Plugin_Handled;
}
public Action:OnCloseCommand(client, args)
{
for(new i = 0; i < sizeof(EntityList); i++)
while((iEnt = FindEntityByClassname(iEnt, EntityList[i])) != -1)
AcceptEntityInput(iEnt, "Close");
return Plugin_Handled;
}
Thanks! how to make it will have func_movinglinear too?
Thanks! how to make it will have func_movinglinear too?
Check above, just updated my post.
vBulletin® v3.8.7, Copyright ©2000-2024, vBulletin Solutions, Inc.