Fulqrum Publishing Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official Fulqrum Publishing forum > Fulqrum Publishing > IL-2 Sturmovik: Cliffs of Dover > FMB, Mission & Campaign builder Discussions

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #16  
Old 10-26-2012, 08:41 PM
41Sqn_Banks 41Sqn_Banks is offline
Approved Member
 
Join Date: Oct 2007
Posts: 644
Default

Quote:
Originally Posted by naryv
It was a single-mission sample, i tryed step by step check , but now it seems like i know what is the problem:. In multiplayer label will not sent to player which is author of this label - just to not doubling labels, exept case when labels sent to everybody. So, when you use that code you make label with player who enter the plane as author, sever will not send it to this player. But You can change the author of label, then it would be send to remote player, server is good candidate to be author(couse hi makes it really) like this :
Code:
using maddox.game;
using maddox.game.world;
using maddox.GP;
using System.Collections.Generic;
using Math = System.Math;


public class Mission : AMission
{

    public override void OnPlaceEnter(Player player, AiActor actor, int placeIndex)
    {
        base.OnPlaceEnter(player, actor, placeIndex);
        Point2d p ;
        p.x = actor.Pos().x;
        p.y = actor.Pos().y;
        GPUserLabel ul = GamePlay.gpMakeUserLabel(p, GamePlay.gpPlayer(), actor.Name(), GamePlay.gpTimeofDay(), (int)GPUserIconType.Plane);
        GamePlay.gpDrawUserLabel(ul);
        p.x -= 300;        
        ul.pos = p;
        ul.Text = "Show player";
        GamePlay.gpDrawUserLabel(new Player[] { player }, ul);

        p.x += 600;
        p.y += 300;
        ul.pos = p;
        ul.Text = "Show army";
        GamePlay.gpDrawUserLabel(0,ul);
        p.x += 300;
        p.y += 300;
        ul.pos = p;
        GamePlay.gpDrawUserLabel(1, ul);
        p.x += 300;
        p.y += 300;
        ul.pos = p;
        GamePlay.gpDrawUserLabel(2, ul);
    }
    
}
it should draw 3 labels - actor.Name, Show player and Show army , try it please.
Maybe this will help you to solve the problem.

In multiplayer gpDrawUserLabel doesn't draw user labels for the player who was used in gpMakeUserLabel. One should use GamePlay.gpPlayer() (which is the "server") instead for gpMakeUserLabel.
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:00 PM.


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