SA-MP Forums Archive
Help Textdrawm - 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: Help Textdrawm (/showthread.php?tid=649132)



Help Textdrawm - LOLITO - 03.02.2018

Hi, How to put Textdraw Random?


Re: Help Textdrawm - solstice_ - 03.02.2018

https://sampforum.blast.hk/showthread.php?tid=327709

Not sure if you meant about that, but i didn't really understand much


Re: Help Textdrawm - LOLITO - 03.02.2018

For example :

First this https://imgur.com/kVxfBF4 and then this https://imgur.com/iARG2xZ


Re: Help Textdrawm - solstice_ - 03.02.2018

You need to find the code of the images, and then set them as an image in the textdraw editor.


Re: Help Textdrawm - wallen - 03.02.2018

Pretty easy to do with timers, total of seconds and hides the first textdraw and at the same time shows the second one.

https://sampwiki.blast.hk/wiki/SetTimer


Re: Help Textdrawm - dani18 - 03.02.2018

Textdraw*, exactly, how to say @Wallenstein111, use a timer for change the textdraws.


Re: Help Textdrawm - shourya - 04.02.2018

try this

PHP код:
new PlayerText:WellTD[MAX_PLAYERS][2];//at the top of your gm
new WEllTdTimer[MAX_PLAYERS];//at the top of your gm
public OnPlayerConnect(playerid)
{
        
WellTD[playerid][0] = CreatePlayerTextDraw(playerid, -0.651468, -0.166672"LOADSUK:loadsc2");
    
PlayerTextDrawTextSize(playeridWellTD[playerid][0], 642.000000449.000000);
    
PlayerTextDrawAlignment(playeridWellTD[playerid][0], 1);
    
PlayerTextDrawColor(playeridWellTD[playerid][0], -1);
    
PlayerTextDrawSetShadow(playeridWellTD[playerid][0], 0);
    
PlayerTextDrawBackgroundColor(playeridWellTD[playerid][0], 255);
    
PlayerTextDrawFont(playeridWellTD[playerid][0], 4);
    
PlayerTextDrawSetProportional(playeridWellTD[playerid][0], 0);
    
    
WellTD[playerid][1] = CreatePlayerTextDraw(playerid, -0.651468, -0.166672"LOADSUK:loadsc3");
    
PlayerTextDrawTextSize(playeridWellTD[playerid][1], 642.000000449.000000);
    
PlayerTextDrawAlignment(playeridWellTD[playerid][1], 1);
    
PlayerTextDrawColor(playeridWellTD[playerid][1], -1);
    
PlayerTextDrawSetShadow(playeridWellTD[playerid][1], 0);
    
PlayerTextDrawBackgroundColor(playeridWellTD[playerid][1], 255);
    
PlayerTextDrawFont(playeridWellTD[playerid][1], 4);
    
PlayerTextDrawSetProportional(playeridWellTD[playerid][1], 0);
    
    
WEllTdTimer[playerid] = SetTimerEx("WellTdCh"50001"i"playerid);
    return 
1;
}
forward WellTdCh(playerid);
public 
WellTdCh(playerid)
{
    switch(
random(2))
    {
        case 
0:
        {
            
PlayerTextDrawHide(playeridWellTD[playerid][1]);
            
PlayerTextDrawHide(playeridWellTD[playerid][0]);
                
PlayerTextDrawShow(playeridWellTD[playerid][1]);
        }
        case 
1:
        {
                
PlayerTextDrawHide(playeridWellTD[playerid][1]);
            
PlayerTextDrawHide(playeridWellTD[playerid][0]);
            
PlayerTextDrawShow(playeridWellTD[playerid][0]);
        }
    }
    return 
1;
}
public 
OnPlayerRequestClass(playeridclassid)
{
    
KillTimer(WEllTdTimer[playerid]);
    
PlayerTextDrawHide(playeridWellTD[playerid][0]);
    
PlayerTextDrawHide(playeridWellTD[playerid][1]);
    return 
1;