#include <a_samp>
#include <fixchars>
#define COLOR_RED 0xAA3333AA
#define COLOR_BLUE 0x1440c7AA
#define COLOR_BLACK 0x000000AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_GREEN 0x00FF00FF
forward OnPlayerInfo(playerid);
enum Info
{
Inf,
Deaths
};
new Text:info[MAX_PLAYERS];
new name[MAX_PLAYER_NAME];
new PlayerInfo[MAX_PLAYERS][info];
public OnFilterScriptInit()
{
for(new x = 0; x < GetMaxPlayers(); x++)
{
info
- = TextDrawCreate(1,437, \" \"); //TextDrawCreate(563.000000, 55.000000, \"100\");
TextDrawColor(info
TextDrawUseBox(info
TextDrawBoxColor(info
}
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnPlayerConnect(playerid)
{
if(!IsPlayerNPC(playerid))
{
TextDrawShowForPlayer(playerid, info[playerid]);
PlayerInfo[playerid][inf] = SetTimerEx(\"OnPlayerInfo\", 2000, true, \"i\", playerid);
}
return 1;
}
public OnPlayerSpawn(playerid)
{
TextDrawShowForPlayer(playerid, info[playerid]);
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
if(!IsPlayerNPC(playerid))
{
PlayerInfo[playerid][Deaths] ++;
}
return 1;
}
public OnPlayerInfo(playerid)
{
if(!IsPlayerNPC(playerid))
{
new szovegbox[128];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
if(GetPlayerScore(playerid) < 31)
{
format(szovegbox, sizeof(szovegbox), \" Név: %s Rang: Kezdõ Ölések: %d Halálok: %d\", name, GetPlayerScore(playerid), PlayerInfo[playerid][Deaths]);
}
if(GetPlayerScore(playerid) < 61 && GetPlayerScore(playerid) > 30)
{
format(szovegbox, sizeof(szovegbox), \" Név: %s Rang: Haladó Ölések: %d Halálok: %d\", name, GetPlayerScore(playerid), PlayerInfo[playerid][Deaths]);
}
if(GetPlayerScore(playerid) < 100 && GetPlayerScore(playerid) > 60)
{
format(szovegbox, sizeof(szovegbox), \" Név: %s Rang: Profi Ölések: %d Halálok: %d\", name, GetPlayerScore(playerid), PlayerInfo[playerid][Deaths]);
}
if(GetPlayerScore(playerid) < 151 && GetPlayerScore(playerid) > 99)
{
format(szovegbox, sizeof(szovegbox), \" Név: %s Rang: Vér Profi Ölések: %d Halálok: %d\", name, GetPlayerScore(playerid), PlayerInfo[playerid][Deaths]);
}
if(GetPlayerScore(playerid) < 201 && GetPlayerScore(playerid) > 150)
{
format(szovegbox, sizeof(szovegbox), \" Név: %s Rang: Túlélés mestere Ölések: %d Halálok: %d\", name, GetPlayerScore(playerid), PlayerInfo[playerid][Deaths]);
}
if(GetPlayerScore(playerid) < 301 && GetPlayerScore(playerid) > 200)
{
format(szovegbox, sizeof(szovegbox), \" Név: %s Rang: A Császár Ölések: %d Halálok: %d\", name, GetPlayerScore(playerid), PlayerInfo[playerid][Deaths]);
}
if(GetPlayerScore(playerid) < 999999999 && GetPlayerScore(playerid) > 300)
{
format(szovegbox, sizeof(szovegbox), \" Név: %s Rang: TERMINATOR Ölések: %d Halálok: %d\", name, GetPlayerScore(playerid), PlayerInfo[playerid][Deaths]);
}
TextDrawSetString(info[playerid], szovegbox);
TextDrawShowForPlayer(playerid, info[playerid]);
}
}