Thanks for the code but i tried both of your scripts and neither of them made a difference, all doors still remain shut i even tried both scripts as seperate plugins and nothing changed. Im hoping i made some kindof stupid mistake but i dont think i did. Any help please
One thing i just noticed was that all safehouse doors(the end ones) are being closed automatically with your code dYZER and all doors remain the same, with Absolute's code no changes on the doors
*Edit*
Dyzer on your code i replaced "use" with Kill and it kindof worked the problem now is i dont have a safehouse door xD Any clue on how to not remove it?, also i though that door was called prop_door_rotating_checkpoint,so i wonder if its being removed because the entity name is almost identical :S .
*Edit#12*
Finally got it to work guys thanks for your help, Heres the final code for the doors if anyone out there is interested
.
Quote:
public OnPluginStart()
{
HookEvent("round_start", Event_RoundStart, EventHookMode_PostNoCopy);
}
public Action:Event_RoundStart(Handle:event, String:name[], bool:dontBroadcast)
{
new EntCount = GetEntityCount();
new String:EdictName[128];
for (new i = 0; i <= EntCount; i++)
{
if (IsValidEntity(i))
{
GetEdictClassname(i, EdictName, sizeof(EdictName));
// PrintToServer("EdictName %s",EdictName); //debug list all edicts
if (StrContains(EdictName, "prop_door_rotating_checkpoint", false) != -1)
{
AcceptEntityInput(i, "Open"); //kill didnt know the command 4 doors im pretty sure "open doesn't do anything"
continue;
}
else if (StrContains(EdictName, "prop_door_rotating", false) != -1)
{
AcceptEntityInput(i, "Kill"); //kill didnt know the command 4 doors
}
}
}
}
|