Problem with Textdraws
#1

Hi,
I don't know how but i created a textdraw and when the server changemode the textdraw gets disappeared..

Код:
    Textdraw2 = TextDrawCreate(500.799896, 431.573394, "Marathon Race");
    TextDrawLetterSize(Textdraw2, 0.449999, 1.600000);
    TextDrawAlignment(Textdraw2, 1);
    TextDrawColor(Textdraw2, -16776961);
    TextDrawSetShadow(Textdraw2, 0);
    TextDrawSetOutline(Textdraw2, 1);
    TextDrawBackgroundColor(Textdraw2, 51);
    TextDrawFont(Textdraw2, 1);
    TextDrawSetProportional(Textdraw2, 1);

    public OnPlayerSpawn(playerid)
    {
        TextDrawShowForPlayer(playerid, Textdraw2);
            return 1;
    }
Have a look on the images attached below.

and you can see the textdraw " Current map " is in a filterscript and the textdraw " Marathon Race " is in the gamemode.
Reply
#2

You've scripted a changing mode for your server ?

As an "NewMap" script ?

If yes, could you please show us your code ?

Reply
#3

no i will not, cause i think its not related to my codes.

anyone else...?
Reply
#4

show code
Reply
#5

omg which codes??!?!
Reply
#6

Anyone?? please

sorry for the bump
Reply
#7

create the text draw in any mode you want it in, and destroy it when the mode exits.

For example:

Your TD that points to the mode name is fine as it's in a FS.
PHP код:
public OnGameModeInit(){
//Create textdraw using the mode name
}
public 
OnPlayerSpawn(playerid){
//Show the textdraw for the player.
}
public 
OnGameModeExit(){
//Destroy the textdraw

Repeat the process for the second mode.

You could also create the textdraw in the filterscript, and just change it from the gamemode by using CallRemoteFunction to call a public function you create to change the textdraw's string.
Reply
#8

you know i haven't destroy the textdraws onFilterscriptinit. so basically this cause the problem?
Reply
#9

still the textdraw got disappeared...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)