#include <a_samp>
new Text:Box;
new Text:Texts;
#define id playerid
enum pInfo
{
Kills,
Deaths
};
new PlayerInfo[MAX_PLAYERS][pInfo];
public OnPlayerDeath(playerid, killerid, reason)
{
PlayerInfo[id][Deaths]++;
PlayerInfo[killerid][Kills]++;
}
public OnFilterScriptInit()
{
Box = TextDrawCreate(-2.000000, 433.000000, \"__\");
TextDrawBackgroundColor(Box, 255);
TextDrawFont(Box, 1);
TextDrawLetterSize(Box, 0.500000, 1.500000);
TextDrawColor(Box, -1);
TextDrawSetOutline(Box, 0);
TextDrawSetProportional(Box, 1);
TextDrawSetShadow(Box, 1);
TextDrawUseBox(Box, 1);
TextDrawBoxColor(Box, 849);
TextDrawTextSize(Box, 640.000000, 0.000000);
Texts = TextDrawCreate(4.000000, 434.000000, \"Ölések: %d | Halálok: %d\",PlayerInfo[id][Kills],PlayerInfo[id][Deaths]);
TextDrawBackgroundColor(Texts, 255);
TextDrawFont(Texts, 1);
TextDrawLetterSize(Texts, 0.270000, 1.100000);
TextDrawColor(Texts, -1);
TextDrawSetOutline(Texts, 1);
TextDrawSetProportional(Texts, 1);
return 1;
}
public OnFilterScriptExit()
{
TextDrawHideForAll(Box);
TextDrawDestroy(Box);
TextDrawHideForAll(Texts);
TextDrawDestroy(Texts);
return 1;
}
public OnPlayerConnect(playerid)
{
PlayerInfo[id][Kills]=0;
PlayerInfo[id][Deaths]=0;
TextDrawShowForPlayer(id, Box);
TextDrawShowForPlayer(id, Texts);
return 1;
}
Nemtudom mit tegyek, mert a public OnFilterScriptInit() nem észleli a playerid-t!