Will this W0rK ?
#1

I created this textdraws, when player kill someone or get killed by someone, if there is some problem please fix it for me! and post it below!

pawn Код:
#include <a_samp>

forward HideKillDraw(playerid);
new Text:KillTextDraw[MAX_PLAYERS];
new KillTextTimer[MAX_PLAYERS];

public OnPlayerDeath(playerid, killerid, reason)
{
    new ptname[256];
    GetPlayerName(killerid,ptname,256);
    new string[256];
    format(string,sizeof(string),"You got killed by %s",ptname);
    KillTextDraw[killerid] = TextDrawCreate(320.0, 360.0,string);
    KillTextDraw[playerid] = CreatePlayerTextDraw(playerid, 253.600006, 106.026641, "You killed %s");
    PlayerTextDrawLetterSize(playerid, KillTextDraw[playerid], 0.449999, 1.600000);
    PlayerTextDrawAlignment(playerid, KillTextDraw[playerid], 1);
    PlayerTextDrawColor(playerid, KillTextDraw[playerid], 16777215);
    PlayerTextDrawSetShadow(playerid, KillTextDraw[playerid], 0);
    PlayerTextDrawSetOutline(playerid, KillTextDraw[playerid], 1);
    PlayerTextDrawBackgroundColor(playerid, KillTextDraw[playerid], 51);
    PlayerTextDrawFont(playerid, KillTextDraw[playerid], 1);
    PlayerTextDrawSetProportional(playerid, KillTextDraw[playerid], 1);
    TextDrawShowForPlayer(killerid, KillTextDraw[killerid]);
    KillTextTimer[killerid] = SetTimerEx("HideKillDraw", 3000, false, "d", killerid);
        return 1;
}

public HideKillDraw(playerid)
{
    TextDrawHideForPlayer(playerid, KillTextDraw[playerid]);
    return 1;
}

public OnPlayerDisconnect(playerid,reason)
{
    TextDrawDestroy(KillTextDraw[playerid]);
        return 1;
}
Reply


Messages In This Thread
Will this W0rK ? - by Insulin - 24.08.2013, 11:18
Re: Will this W0rK ? - by Konstantinos - 24.08.2013, 11:27
Re: Will this W0rK ? - by Insulin - 24.08.2013, 13:16
Re: Will this W0rK ? - by RedJohn - 24.08.2013, 13:27
Re: Will this W0rK ? - by ProjectMan - 24.08.2013, 13:34
Re: Will this W0rK ? - by Konstantinos - 24.08.2013, 13:34
Re: Will this W0rK ? - by Insulin - 24.08.2013, 13:49
Re: Will this W0rK ? - by Konstantinos - 24.08.2013, 13:52

Forum Jump:


Users browsing this thread: 2 Guest(s)