Official Fulqrum Publishing forum

Official Fulqrum Publishing forum (http://forum.fulqrumpublishing.com/index.php)
-   FMB, Mission & Campaign builder Discussions (http://forum.fulqrumpublishing.com/forumdisplay.php?f=203)
-   -   Sending message to specific player (http://forum.fulqrumpublishing.com/showthread.php?t=31833)

hc_wolf 05-07-2012 06:28 AM

Sending message to specific player
 
Hi,

Was thinking about this for a while. Is it possible to send a message to a specific player if they join (based on their player name) rather than count on how many planes are in the pool.

Do I do an int PlayerNames or a string or bool

Eg. If I join game and enter spitII can I have it validate me as pilot and send message to me specific saying I have no more planes to fly and do damage??.

Code:


    public override void OnPlaceEnter(Player player, AiActor actor, int placeIndex)
    {

        base.OnPlaceEnter(player, actor, placeIndex);
        if (actor != null && actor is AiAircraft)
        {
            //check limited aircraft
            switch ((actor as AiAircraft).InternalTypeName())
            {
                case "bob:Aircraft.SpitfireMkIIa":
                    {
                        if (PlayerName = HC_Wolf)  //<<--------- How do I isolate a player???
                        {
                            damagePlayerGroup(actor);
                            GamePlay.gpHUDLogCenter(new Player[] { player }, "SpitIIa aircraft limit reached. Choose a different plane! Plane disabled in 10 seconds!");

// or GamePlay.gpHUDLogCenter( aircraft.Player(0).Name()" You reached your limit and now you must fly older plane ");

                        }
                        break;
                    }


GamePlay.gpHUDLogCenter( aircraft.Player(0).Name()" Here is your new plane ");


FG28_Kodiak 05-07-2012 06:56 AM

Yes it's possible:
Code:

if(player.Name().Equals("HC_Wolf"))


All times are GMT. The time now is 01:17 PM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.