Help Textdrawm
#1

Hi, How to put Textdraw Random?
Reply
#2

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

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

For example :

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

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

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
Reply
#6

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

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;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)