SA-MP Forums Archive
Textdraw? - 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)
+--- Thread: Textdraw? (/showthread.php?tid=319066)



Textdraw? - Guitar - 17.02.2012

Hello, I'm trying to make a dynamic Textdraw .. like /changetxtdraw TEXT,,

/changetxtdraw HELLO WORLD.. will replace my old textdraw with HELLO WORLD.. How can I do this? I tried to do that, but nothing happens..

pawn Код:
CMD:changetxtdraw(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 1 || IsPlayerAdmin(playerid))
    {
        new inputstring[256];
        if(sscanf(params, "s[256]", inputstring)) return SendClientMessage(playerid, COLOR_GREY, "CMD: /changetxtdraw [Text]");
        {
            //TextDrawDestroy(Text:Whitney0);
            TextDrawCreate(511.000000, 139.000000, inputstring);
        }
    }
    return 1;
}



Re: Textdraw? - Vince - 17.02.2012

Just TextDrawSetString. No need to destroy and re-create the textdraw.


Re: Textdraw? - KingHual - 17.02.2012

Код:
TextDrawSetString(TextDrawID, string[]);



Re: Textdraw? - Guitar - 18.02.2012

Oh, thanks a lot! I'll be testing it and see if it works or not ^^.