SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 13/05/2012, 08:38 PM   #1
SpiderWalk
Gangsta
 
SpiderWalk's Avatar
 
Join Date: Apr 2010
Location: Serbia
Posts: 970
Reputation: 26
Default Textdraw problem

Hello everybody.I create TextdrawBox in side text.But problem is in that.Box shows first and after it text.But in script is first text then box.Strange



Code:
pawn Code:
new Text:Stats[MAX_PLAYERS],
    Text:R_1[MAX_PLAYERS];
new Text:Textdraw0;
new Text:Textdraw1;
new Text:Textdraw2[MAX_PLAYERS];
new Text:Textdraw3[MAX_PLAYERS];

LoadTextdraws()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        Stats[i] = TextDrawCreate(506.000000, 387.000000, "~y~XP:        ~w~%d");
        TextDrawBackgroundColor(Stats[i], 255);
        TextDrawFont(Stats[i], 1);
        TextDrawLetterSize(Stats[i], 0.360000, 1.000000);
        TextDrawColor(Stats[i], -1);
        TextDrawSetOutline(Stats[i], 0);
        TextDrawSetProportional(Stats[i], 1);
        TextDrawSetShadow(Stats[i], 1);
        R_1[i] = TextDrawCreate(512.000000, 421.000000, "Rank:Commander of Army");
        TextDrawBackgroundColor(R_1[i], 255);
        TextDrawFont(R_1[i], 1);
        TextDrawLetterSize(R_1[i], 0.260000, 1.000000);
        TextDrawColor(R_1[i], -1);
        TextDrawSetOutline(R_1[i], 0);
        TextDrawSetProportional(R_1[i], 1);
        TextDrawSetShadow(R_1[i], 1);

        Textdraw2[i] = TextDrawCreate(521.000000, 363.000000, "~g~Kills:        ~w~%d");
        TextDrawBackgroundColor(Textdraw2[i], 255);
        TextDrawFont(Textdraw2[i], 1);
        TextDrawLetterSize(Textdraw2[i], 0.340000, 1.000000);
        TextDrawColor(Textdraw2[i], -1);
        TextDrawSetOutline(Textdraw2[i], 0);
        TextDrawSetProportional(Textdraw2[i], 1);
        TextDrawSetShadow(Textdraw2[i], 1);

        Textdraw3[i] = TextDrawCreate(506.000000, 375.000000, "~r~Deaths:        ~w~%d");
        TextDrawBackgroundColor(Textdraw3[i], 255);
        TextDrawFont(Textdraw3[i], 1);
        TextDrawLetterSize(Textdraw3[i], 0.340000, 1.000000);
        TextDrawColor(Textdraw3[i], -1);
        TextDrawSetOutline(Textdraw3[i], 0);
        TextDrawSetProportional(Textdraw3[i], 1);
        TextDrawSetShadow(Textdraw3[i], 1);
    }
    Textdraw0 = TextDrawCreate(500.000000, 352.000000, "_");
    TextDrawBackgroundColor(Textdraw0, 255);
    TextDrawFont(Textdraw0, 1);
    TextDrawLetterSize(Textdraw0, 0.500000, 10.000000);
    TextDrawColor(Textdraw0, -1);
    TextDrawSetOutline(Textdraw0, 0);
    TextDrawSetProportional(Textdraw0, 1);
    TextDrawSetShadow(Textdraw0, 1);
    TextDrawUseBox(Textdraw0, 1);
    TextDrawBoxColor(Textdraw0, 170);
    TextDrawTextSize(Textdraw0, 635.000000, 0.000000);

    Textdraw1 = TextDrawCreate(536.000000, 350.000000, "Stats");
    TextDrawBackgroundColor(Textdraw1, 255);
    TextDrawFont(Textdraw1, 2);
    TextDrawLetterSize(Textdraw1, 0.500000, 1.000000);
    TextDrawColor(Textdraw1, -1);
    TextDrawSetOutline(Textdraw1, 1);
    TextDrawSetProportional(Textdraw1, 1);
   
    return 1;

}
public OnPlayerSpawn(playerid)
{
    TextDrawShowForPlayer(playerid,Text:Stats[playerid]);
    TextDrawShowForPlayer(playerid,Text:R_1[playerid]);
    TextDrawShowForPlayer(playerid,Text:Textdraw2[playerid]);
    TextDrawShowForPlayer(playerid,Text:Textdraw3[playerid]);
    TextDrawShowForPlayer(playerid,Text:Textdraw1);
    SetPlayerInterior(playerid, 0);
    TextDrawShowForPlayer(playerid,Text:Textdraw0);
    return 1;
}
Please reply fast.Thanks
SpiderWalk is offline   Reply With Quote
Old 13/05/2012, 08:40 PM   #2
Jonny5
Gangsta
 
Join Date: Mar 2012
Location: Mi, USA
Posts: 929
Reputation: 158
Default Re: Textdraw problem

you already asked this here
http://forum.sa-mp.com/showthread.ph...89#post1860689

do like they said
create the BOX first!
then create the other textdraws.
__________________
If your topic says "REP+", I ignore it.
Jonny5 is offline   Reply With Quote
Old 13/05/2012, 08:43 PM   #3
SpiderWalk
Gangsta
 
SpiderWalk's Avatar
 
Join Date: Apr 2010
Location: Serbia
Posts: 970
Reputation: 26
Default Re: Textdraw problem

Quote:
Originally Posted by Jonny5 View Post
you already asked this here
http://forum.sa-mp.com/showthread.ph...89#post1860689

do like they said
create the BOX first!
then create the other textdraws.
I did man.But it`s not working.I try....I make new textdraw...
SpiderWalk is offline   Reply With Quote
Old 13/05/2012, 08:48 PM   #4
Jonny5
Gangsta
 
Join Date: Mar 2012
Location: Mi, USA
Posts: 929
Reputation: 158
Default Re: Textdraw problem

you need to waite untill someone answers your post,
you cannot just make a new one

you have not did what they said

pawn Code:
new Text:Stats[MAX_PLAYERS],
    Text:R_1[MAX_PLAYERS];
new Text:Textdraw0;
new Text:Textdraw1;
new Text:Textdraw2[MAX_PLAYERS];
new Text:Textdraw3[MAX_PLAYERS];

LoadTextdraws()
{
    Textdraw0 = TextDrawCreate(500.000000, 352.000000, "_");
    TextDrawBackgroundColor(Textdraw0, 255);
    TextDrawFont(Textdraw0, 1);
    TextDrawLetterSize(Textdraw0, 0.500000, 10.000000);
    TextDrawColor(Textdraw0, -1);
    TextDrawSetOutline(Textdraw0, 0);
    TextDrawSetProportional(Textdraw0, 1);
    TextDrawSetShadow(Textdraw0, 1);
    TextDrawUseBox(Textdraw0, 1);
    TextDrawBoxColor(Textdraw0, 170);
    TextDrawTextSize(Textdraw0, 635.000000, 0.000000);

    Textdraw1 = TextDrawCreate(536.000000, 350.000000, "Stats");
    TextDrawBackgroundColor(Textdraw1, 255);
    TextDrawFont(Textdraw1, 2);
    TextDrawLetterSize(Textdraw1, 0.500000, 1.000000);
    TextDrawColor(Textdraw1, -1);
    TextDrawSetOutline(Textdraw1, 1);
    TextDrawSetProportional(Textdraw1, 1);
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        Stats[i] = TextDrawCreate(506.000000, 387.000000, "~y~XP:        ~w~%d");
        TextDrawBackgroundColor(Stats[i], 255);
        TextDrawFont(Stats[i], 1);
        TextDrawLetterSize(Stats[i], 0.360000, 1.000000);
        TextDrawColor(Stats[i], -1);
        TextDrawSetOutline(Stats[i], 0);
        TextDrawSetProportional(Stats[i], 1);
        TextDrawSetShadow(Stats[i], 1);
        R_1[i] = TextDrawCreate(512.000000, 421.000000, "Rank:Commander of Army");
        TextDrawBackgroundColor(R_1[i], 255);
        TextDrawFont(R_1[i], 1);
        TextDrawLetterSize(R_1[i], 0.260000, 1.000000);
        TextDrawColor(R_1[i], -1);
        TextDrawSetOutline(R_1[i], 0);
        TextDrawSetProportional(R_1[i], 1);
        TextDrawSetShadow(R_1[i], 1);

        Textdraw2[i] = TextDrawCreate(521.000000, 363.000000, "~g~Kills:        ~w~%d");
        TextDrawBackgroundColor(Textdraw2[i], 255);
        TextDrawFont(Textdraw2[i], 1);
        TextDrawLetterSize(Textdraw2[i], 0.340000, 1.000000);
        TextDrawColor(Textdraw2[i], -1);
        TextDrawSetOutline(Textdraw2[i], 0);
        TextDrawSetProportional(Textdraw2[i], 1);
        TextDrawSetShadow(Textdraw2[i], 1);

        Textdraw3[i] = TextDrawCreate(506.000000, 375.000000, "~r~Deaths:        ~w~%d");
        TextDrawBackgroundColor(Textdraw3[i], 255);
        TextDrawFont(Textdraw3[i], 1);
        TextDrawLetterSize(Textdraw3[i], 0.340000, 1.000000);
        TextDrawColor(Textdraw3[i], -1);
        TextDrawSetOutline(Textdraw3[i], 0);
        TextDrawSetProportional(Textdraw3[i], 1);
        TextDrawSetShadow(Textdraw3[i], 1);
    }
   
    return 1;

}
public OnPlayerSpawn(playerid)
{
    TextDrawShowForPlayer(playerid,Textdraw0);
    TextDrawShowForPlayer(playerid,Textdraw1);
    TextDrawShowForPlayer(playerid,Stats[playerid]);
    TextDrawShowForPlayer(playerid,R_1[playerid]);
    TextDrawShowForPlayer(playerid,Textdraw2[playerid]);
    TextDrawShowForPlayer(playerid,Textdraw3[playerid]);
    SetPlayerInterior(playerid, 0);
    return 1;
}

i moved Text:Textdraw1 and Text:Textdraw0 Above the other code as this is your box!
__________________
If your topic says "REP+", I ignore it.

Last edited by Jonny5; 13/05/2012 at 09:30 PM.
Jonny5 is offline   Reply With Quote
Old 13/05/2012, 08:52 PM   #5
ViniBorn
Godfather
 
ViniBorn's Avatar
 
Join Date: Aug 2010
Location: Brasília
Posts: 5,313
Reputation: 720
Default Re: Textdraw problem

You don't need to put ' Text: ' .
pawn Code:
TextDrawShowForPlayer(playerid,Text:Textdraw0);
pawn Code:
TextDrawShowForPlayer(playerid,Textdraw0);
__________________



CONTATO: F A C E B O O K: @vinibornpawn

ViniBorn is offline   Reply With Quote
Old 13/05/2012, 09:31 PM   #6
SpiderWalk
Gangsta
 
SpiderWalk's Avatar
 
Join Date: Apr 2010
Location: Serbia
Posts: 970
Reputation: 26
Default Re: Textdraw problem

FIXED
SpiderWalk is offline   Reply With Quote
Reply

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Textdraw problem [Small problem] [+rep] Twinki1993 Scripting Help 8 03/02/2012 02:54 AM
Textdraw Problem leongky94 Scripting Help 8 22/12/2011 01:40 AM
Textdraw problem Jack Shred Help Archive 2 21/08/2011 09:29 PM
textdraw problem The_Gangstas Help Archive 3 16/12/2010 07:39 PM
Textdraw problem. arnutisz Help Archive 7 09/07/2009 05:54 PM


All times are GMT. The time now is 11:24 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.