hc_wolf
05-07-2012, 06:28 AM
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??.
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 ");
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??.
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 ");