WASTED TextDraw Help
#1

I wanted to make a Wasted text draw on Player death like in the offline mode

One problem is that it freezes and doesn't dissapear

I made it like this. Also it doesn't even look like in the offline mode
I added it to the gamemode I run
pawn Код:
new Text:WASTEDText;
 
public OnGameModeInit()
{
    WASTEDText = TextDrawCreate(190.0,190.0,"WASTED");
    return 1;
}
 
public OnPlayerDeath(playerid)
{
    TextDrawShowForPlayer(playerid,WASTEDText);
}
Reply
#2

pawn Код:
new Text:WASTEDText;
forward public Death_timer(playerid);
 
public OnGameModeInit()
{
    WASTEDText = TextDrawCreate(190.0,190.0,"WASTED");
    return 1;
}
 
public OnPlayerDeath(playerid)
{
   TextDrawShowForPlayer(playerid,WASTEDText);
   SetTimerEx("Death_timer", 5000, 0, "d", playerid);  
}

public Death_timer(playerid)
{
   TextDrawHideForPlayer(playerid, WASTEDText);
}
Reply
#3

Very simple to fix this
pawn Код:
new Text:WASTEDText;
 
public OnGameModeInit()
{
    WASTEDText = TextDrawCreate(190.0,190.0,"WASTED");
    return 1;
}
 
public OnPlayerDeath(playerid)
{
   TextDrawShowForPlayer(playerid,WASTEDText);
}

public OnPlayerSpawn(playerid)
{
   TextDrawHideForPlayer(playerid, WASTEDText);
   return 1;
}
Hope this help you
Reply
#4

Thanks guys but how to make it look like in offline mod like this



instead of
Reply
#5

Here
PHP код:
public OnPlayerDeath(playeridkilleridreason)
{
    
GameTextForPlayer(playerid,"WASTED",5000,2);
    return 
1;

don't need a textdraw any more... Hope this help

if i help you please rep+ me
Reply
#6

GameTextForPlayer(playerid, "wasted", 3000, 2);

EDIT: too late
Reply
#7

@ScRipTeRi Late
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)