09-25-2012, 03:33 PM
What I want, is to make a message appear on the screen when the player looks at an entity. But when i use my script, the message is displayed two times: when the player looks at it, and when looks away from it after looking at it.Here is my script:
void OnStart ()
{
SetEntityPlayerLookAtCallback("chair", "price_chair", false);
}
void price_chair(string &in asEntity, int alState)
{
SetMessage("price", "chair", 0);
}
I tried to change "int alState" into "int 1", but then the game crashes. Anyone got an idea? C:
void OnStart ()
{
SetEntityPlayerLookAtCallback("chair", "price_chair", false);
}
void price_chair(string &in asEntity, int alState)
{
SetMessage("price", "chair", 0);
}
I tried to change "int alState" into "int 1", but then the game crashes. Anyone got an idea? C: