07-05-2012, 09:35 PM
I do not really need this for my custom story, but I am just incredibly curious about this. The question is; how do you make something happen when two (or three, or four, whatever) things are set "true". Example; I want a message to display when my door is locked and when my doors health is lower than 70.
This is what I wrote, mostly looking at another cs, but then failing horribly. I'm think the concept looks like this though, the only part that this is completely wrong.
void mansion_1(string &in entity)
{
if(GetSwingDoorLocked("mansion_1" && GetPropHealth("mansion_1") == i<70))
{
SetMessage("Messages", "labdoorlocked", 0);
}
}
(mansion_1 is the name of the PlayerInteractCallback of the door, and the actual name of the door.)
This above was just me kinda messing around and trying to figure it out. I couldn't get it complete though. And as far as I'm aware there isn't a solution on the wiki. Any help would be appreciated.
This is what I wrote, mostly looking at another cs, but then failing horribly. I'm think the concept looks like this though, the only part that this is completely wrong.
void mansion_1(string &in entity)
{
if(GetSwingDoorLocked("mansion_1" && GetPropHealth("mansion_1") == i<70))
{
SetMessage("Messages", "labdoorlocked", 0);
}
}
(mansion_1 is the name of the PlayerInteractCallback of the door, and the actual name of the door.)
This above was just me kinda messing around and trying to figure it out. I couldn't get it complete though. And as far as I'm aware there isn't a solution on the wiki. Any help would be appreciated.