SA-MP Forums Archive
.::[ Text Draw HELP ]::. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: .::[ Text Draw HELP ]::. (/showthread.php?tid=147698)



.::[ Text Draw HELP ]::. - DarkPower - 13.05.2010

i try to make /stats whit textdraw but i have problem here is code
pawn Code:
new coordsstring[1024];
    format(coordsstring, sizeof(coordsstring), "~n~%sLevel:[%d] Sex:[%s] Age:[%d] Cash:[$%d] Bank:[$%d] Ph:[%d]~n~", level,atext,age,cash,account,pnumber);
    format(coordsstring, sizeof(coordsstring), "~n~%sPlayingHours:[%d] Job:[%s] Respect:[%d/%d] DonateRank:[%s]~n~", ptime,jtext,exp,expamount,drank);
    format(coordsstring, sizeof(coordsstring), "~n~%sDrugs:[%d] Materials:[%d] Organisation:[%s] Rank:[%s]~n~",drugs,mats,ftext,rtext);
    TextDrawSetString(Statistika, coordsstring);
    TextDrawShowForPlayer(playerid, Statistika);

        //SendClientMessage(playerid, COLOR_WHITE,coordsstring);
        if (PlayerInfo[playerid][pAdmin] >= 1)
        {
            format(coordsstring, sizeof(coordsstring), "~n~%sHouse key [%d] Business key [%d] Veh1 [%d] Veh2 [%d] Veh3 [%d] local[%d]", housekey,bizkey,carkey,carkey2,carkey3,local);
            SendClientMessage(playerid, COLOR_GRAD6,coordsstring);
        }
        SendClientMessage(playerid, COLOR_RED,"------------------------------------------------------------------------------------------------");
    }
}
and i get JUST HALF of stats. here is pic
http://slike.hr/slike/samp001_f53d7.png.html

Can anybody help me?




Re: .::[ Text Draw HELP ]::. - juice.j - 13.05.2010

You only get the third line as you overwrite coordsstring each time you format it again. Connect it instead to the prior format.


Re: .::[ Text Draw HELP ]::. - [HiC]TheKiller - 14.05.2010

pawn Code:
new coordsstring[1024];
    format(coordsstring, sizeof(coordsstring), "~n~%sLevel:[%d] Sex:[%s] Age:[%d] Cash:[$%d] Bank:[$%d] Ph:[%d]~n~", level,atext,age,cash,account,pnumber);
    format(coordsstring, sizeof(coordsstring), "%s~n~%sPlayingHours:[%d] Job:[%s] Respect:[%d/%d] DonateRank:[%s]~n~", coordsstring, ptime,jtext,exp,expamount,drank);
    format(coordsstring, sizeof(coordsstring), "%s~n~%sDrugs:[%d] Materials:[%d] Organisation:[%s] Rank:[%s]~n~", coordsstring, drugs,mats,ftext,rtext);
    TextDrawSetString(Statistika, coordsstring);
    TextDrawShowForPlayer(playerid, Statistika);

        //SendClientMessage(playerid, COLOR_WHITE,coordsstring);
        if (PlayerInfo[playerid][pAdmin] >= 1)
        {
            format(coordsstring, sizeof(coordsstring), "~n~%sHouse key [%d] Business key [%d] Veh1 [%d] Veh2 [%d] Veh3 [%d] local[%d]", housekey,bizkey,carkey,carkey2,carkey3,local);
            SendClientMessage(playerid, COLOR_GRAD6,coordsstring);
        }
        SendClientMessage(playerid, COLOR_RED,"------------------------------------------------------------------------------------------------");
    }
}



Re: .::[ Text Draw HELP ]::. - DarkPower - 14.05.2010

Thank you AGAIN Hic killer ALOT


Re: .::[ Text Draw HELP ]::. - s0nic - 14.05.2010

And as you see in the screen shot you posted, there is a blank and a star where the [ & ] should be..the best way is to use (%s) instead of your [%s] for all the brackets, and from what i remember the parentheses look like brackets ig. Hope this helped a little.


Re: .::[ Text Draw HELP ]::. - DarkPower - 14.05.2010

Quote:
Originally Posted by Killaz/s0nic
And as you see in the screen shot you posted, there is a blank and a star where the [ & ] should be..the best way is to use (%s) instead of your [%s] for all the brackets, and from what i remember the parentheses look like brackets ig. Hope this helped a little.
Lol i know that xD