Coding Questions

Discussion in 'Plugins' started by taufikp, Feb 3, 2012.

  1. taufikp

    taufikp Registered

    Joined:
    Nov 14, 2010
    Messages:
    609
    Likes Received:
    16
    Here's the scenario:
    I want to display 'Hello World' message to in-game console/chat window every time AI is activated/taking over the vehicle.

    So here's how I wrote the code
    - I wrote "bool bAImode;" in private section of internals.hpp file
    - set bAImode=true in UpdateScoring(), when AI is activated (value is from mControl variable)
    - in WantsToDisplayMessage(), I wrote if bAImode=true set the message and return( true )

    However, no message is shown in chat/console window whenever AI is activated/driving the vehicle.

    What am I doing wrong?

    This 'beginner plugin project' sounds pretty simple: show a message whenever AI is in control. But in fact very difficult to accomplish, for me at least. :confused:

    So I need help. Pretty please? :D
     
  2. Zephyr RU

    Zephyr RU Registered

    Joined:
    Apr 2, 2012
    Messages:
    85
    Likes Received:
    9
    I wanna know about way to code that too.
     

Share This Page