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



WASTED TextDraw Help - JEkvall95 - 25.07.2013

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);
}



Re: WASTED TextDraw Help - RajatPawar - 25.07.2013

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);
}



Re: WASTED TextDraw Help - JusstinRoller - 25.07.2013

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


Re: WASTED TextDraw Help - JEkvall95 - 25.07.2013

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



instead of



Re: WASTED TextDraw Help - JusstinRoller - 25.07.2013

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


Re: WASTED TextDraw Help - ScRipTeRi - 25.07.2013

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

EDIT: too late


Re: WASTED TextDraw Help - JusstinRoller - 25.07.2013

@ScRipTeRi Late