![]() |
How to send message to player at takeoff?
How to send a message only to the player who has just taken off? I have this so far ...
code removed by author As you can see, I've tried sending the GamePlay.gpHUDLogCenter text to ThePlane.AiActor.Name() and AiActor.Name() which produce errors. I guess I neeed to also test if the plane is AI or player controlled since I don't need to send a screen message to the AI. |
You can use the Player(int placeindex) member of the AiAircraft Class:
For example GamePlay.gpLogServer(new Player[] { (actor as AiAircraft).Player(0) }, " Test ", null); You should test the null value, if null no human player (Ai). To send the message to all possible players in an Aircraft: Code:
for (int i = 0; i < aircraft.Places(); i++) |
Thankyou for your quick reply Kodiak
|
C# allows for many methods, Kodiak always seems to come up with nice examples :)
I am using this method with success, it is from the collection of samples from this forum. What is nice is different msg's to team and plane type. Code:
public override void OnPlaceEnter(Player player, AiActor actor, int placeIndex) |
All times are GMT. The time now is 04:37 AM. |
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.