You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
sm-plugins/opend.sp

40 lines
972 B

/* Plugin Template generated by Pawn Studio */
#include <sourcemod>
#include <sdktools_entinput>
#include <sdktools_functions>
public Plugin:myinfo =
{
name = "jump_4starter_dopener",
author = "Chefe",
description = "<- Description ->",
version = "1.0",
url = "<- URL ->"
}
public OnPluginStart()
{
RegAdminCmd("sm_opend", Command_DOpen, ADMFLAG_CHEATS, "opens the door on D");
}
public Action:Command_DOpen(client, args)
{
new ent = -1;
while ((ent = FindEntityByClassname(ent, "logic_branch")) != -1)
{
decl String:strName[50];
GetEntPropString(ent, Prop_Data, "m_iName", strName, sizeof(strName));
if(!strcmp(strName, "bonus_button_01_listener") || !strcmp(strName, "bonus_button_02_listener") || !strcmp(strName, "bonus_button_03_listener"))
{
SetVariantInt(1);
new bool:donechange = AcceptEntityInput(ent, "setValue");
if (donechange) { PrintToServer("Sucessfully set all logic_branches!"); }
}
}
return Plugin_Handled;
}