26.07.2009, 13:46
I just made a command so u do /killmes <some text>. It will display on the players screen as u kill them. But the textdraws are not show on the screen, plz help me tia.
pawn Код:
// at the top
new KillMes[MAX_PLAYERS][128];
new Text:Text[12][MAX_PLAYERS];
//onplayer death
if(IsPlayerConnected(killerid) && strlen(KillMes[killerid]) > 1)
{
TextDrawShowForPlayer(playerid,Text[7][playerid]);
TextDrawSetString(Text[7][playerid],KillMsg[killerid]);
SetTimerEx("HideKillMes",5000,0,"i",playerid);
}
//
dcmd_killmes(playerid,params[])
{
if(!strlen(params))return SendClientMessage(playerid,COLOR_YELLOW,"USAGE: /killmes [Custom death message]");
if(strlen(params) <= 1)return SendClientMessage(playerid,COLOR_YELLOW,"USAGE: /killmes [Custom death message]");
new string[32];
format(string,sizeof(string),"%s",params);
Killmes[playerid] = string;
SendClientMessage(playerid,COLOR_YELLOW,"You have updated ur msg");
return 1;
}
forward HideKillMes(playerid);
public HideKillMes(playerid)
{
TextDrawHideForPlayer(playerid,Text[7][playerid]);
}