![]() |
|
#1
|
|||
|
|||
|
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 ");
__________________
__________________ Win7, 64bit Ultra Asus P8P67Pro MB Intel i7-2600K Coursair 16GB (4x 4GB), DDR3-1600MHz Gainward Nvidia 580GTX 3GB DDR5 850-Watt Modular Power Supply WIN7 and COD on Gskill SSD 240GB 40" Panasonic LCD TrackIR5 + Thrustmaster Warthog stick, throttle & pedals |
|
|