you killed textdraw
#3

PHP код:

new Text:killed;
new 
Text:killedby;
public 
OnGameModeInit()
{
//All things above this.
    
killed TextDrawCreate(247.000000351.000000"_____");
    
TextDrawBackgroundColor(killed255);
    
TextDrawFont(killed3);
    
TextDrawLetterSize(killed0.4599982.000000);
    
TextDrawColor(killed227526655);
    
TextDrawSetOutline(killed0);
    
TextDrawSetProportional(killed1);
    
TextDrawSetShadow(killed1);
    
killedby TextDrawCreate(247.000000351.000000"_____");
    
TextDrawBackgroundColor(killedby255);
    
TextDrawFont(killedby3);
    
TextDrawLetterSize(killedby0.4599982.000000);
    
TextDrawColor(killedby227526655);
    
TextDrawSetOutline(killedby0);
    
TextDrawSetProportional(killedby1);
    
TextDrawSetShadow(killedby1);
    return 
1;
}
public 
OnGameModeExit()
{
    
TextDrawHideForPlayer(playeridkilled);
    
TextDrawDestroy(killed);
    
TextDrawHideForPlayer(playeridkilledby);
    
TextDrawDestroy(killedby);
    return 
1;
}
public 
OnPlayerDisconnect(playeridreason)
{
    
TextDrawHideForPlayer(playeridkilled);
    
TextDrawDestroy(killed);
    
TextDrawHideForPlayer(playeridkilledby);
    
TextDrawDestroy(killedby);
    return 
1;
}
public 
OnPlayerSpawn(playerid)
{
    
TextDrawHideForPlayer(playeridkilled);
    
TextDrawHideForPlayer(playeridkilledby);
    return 
1;
}
public 
OnPlayerDeath(playeridkilleridreason)
{
    new 
killinfo[210];
    new 
playername[MAX_PLAYER_NAME];
    
GetPlayerName(playerid,playername,sizeof(playername));
    
format(killinfosizeof(killinfo), "You killed %s(%d)."playernameplayerid);
    
TextDrawSetString(killedkillinfo);
    
TextDrawShowForPlayer(playeridkilled);
    
SetTimerEx("HideTextdraw"5000false"i"killerid); // 1000 = 1 Second, therefore 5000 = 5 Second
    
    
new deathinfo[210];
    new 
killername[MAX_PLAYER_NAME];
    
GetPlayerName(playerid,killername,sizeof(killername));
    
format(deathinfosizeof(deathinfo), "%s(%d) has killed you."killernamekillerid);
    
TextDrawSetString(killedbydeathinfo);
    
TextDrawShowForPlayer(playeridkilledby); // No need of timers here as I've hidden the textdraw for player when he spawn.
    
return 1;
}
forward HideTextdraw(playerid);
public 
HideTextdraw(playerid)
{
    
TextDrawHideForPlayer(playeridkilled);

Reply


Messages In This Thread
you killed textdraw - by ivndosos - 07.02.2018, 05:02
Re: you killed textdraw - by youmasterd7 - 07.02.2018, 06:30
Re: you killed textdraw - by KayJ - 07.02.2018, 08:57
Re: you killed textdraw - by dani18 - 07.02.2018, 09:09
Re: you killed textdraw - by KayJ - 07.02.2018, 10:43

Forum Jump:


Users browsing this thread: 1 Guest(s)