Hier eine kleine KD Anzeige als FS:
Download: http://pastebin.com/E2brp0aS
Download2:
//Filterscript by SynonymousZ
//http://forum.sa-mp.de/index.php?page=User&userID=12300
#include <a_samp>
//http://forum.sa-mp.de/index.php?page=User&userID=12300
#include <a_samp>
new Text:Textdraw0;
new Text:Textdraw1;
new Text:Textdraw2;
new PlayerText:Textdraw3[MAX_PLAYERS];
new PlayerText:Textdraw4[MAX_PLAYERS];
new PlayerText:Textdraw5[MAX_PLAYERS];
new Text:Textdraw1;
new Text:Textdraw2;
new PlayerText:Textdraw3[MAX_PLAYERS];
new PlayerText:Textdraw4[MAX_PLAYERS];
new PlayerText:Textdraw5[MAX_PLAYERS];
new pKills[MAX_PLAYERS];
new pDeaths[MAX_PLAYERS];
new pDeaths[MAX_PLAYERS];
public OnFilterScriptInit()
{
print("K/D Anzeige wird geladen");
Textdraw0 = TextDrawCreate(622.800048, 288.220001, "usebox");
TextDrawLetterSize(Textdraw0, 0.000000, 9.970741);
TextDrawTextSize(Textdraw0, 430.000000, 0.000000);
TextDrawAlignment(Textdraw0, 1);
TextDrawColor(Textdraw0, 0);
TextDrawUseBox(Textdraw0, true);
TextDrawBoxColor(Textdraw0, 102);
TextDrawSetShadow(Textdraw0, 0);
TextDrawSetOutline(Textdraw0, 0);
TextDrawFont(Textdraw0, 0);
{
print("K/D Anzeige wird geladen");
Textdraw0 = TextDrawCreate(622.800048, 288.220001, "usebox");
TextDrawLetterSize(Textdraw0, 0.000000, 9.970741);
TextDrawTextSize(Textdraw0, 430.000000, 0.000000);
TextDrawAlignment(Textdraw0, 1);
TextDrawColor(Textdraw0, 0);
TextDrawUseBox(Textdraw0, true);
TextDrawBoxColor(Textdraw0, 102);
TextDrawSetShadow(Textdraw0, 0);
TextDrawSetOutline(Textdraw0, 0);
TextDrawFont(Textdraw0, 0);
Textdraw1 = TextDrawCreate(525.599975, 288.213226, "Statistiken");
TextDrawLetterSize(Textdraw1, 0.449999, 1.600000);
TextDrawAlignment(Textdraw1, 2);
TextDrawColor(Textdraw1, -1);
TextDrawSetShadow(Textdraw1, 0);
TextDrawSetOutline(Textdraw1, 1);
TextDrawBackgroundColor(Textdraw1, 51);
TextDrawFont(Textdraw1, 1);
TextDrawSetProportional(Textdraw1, 1);
TextDrawLetterSize(Textdraw1, 0.449999, 1.600000);
TextDrawAlignment(Textdraw1, 2);
TextDrawColor(Textdraw1, -1);
TextDrawSetShadow(Textdraw1, 0);
TextDrawSetOutline(Textdraw1, 1);
TextDrawBackgroundColor(Textdraw1, 51);
TextDrawFont(Textdraw1, 1);
TextDrawSetProportional(Textdraw1, 1);
Textdraw2 = TextDrawCreate(605.200012, 308.380004, "usebox");
TextDrawLetterSize(Textdraw2, 0.000000, -0.399630);
TextDrawTextSize(Textdraw2, 450.000000, 0.000000);
TextDrawAlignment(Textdraw2, 1);
TextDrawColor(Textdraw2, 0);
TextDrawUseBox(Textdraw2, true);
TextDrawBoxColor(Textdraw2, 102);
TextDrawSetShadow(Textdraw2, 0);
TextDrawSetOutline(Textdraw2, 0);
TextDrawFont(Textdraw2, 0);
for(new playerid = 0; playerid<MAX_PLAYERS; playerid++)
{
Textdraw3[playerid] = CreatePlayerTextDraw(playerid, 468.000000, 317.333374, "Kills: 0");
PlayerTextDrawLetterSize(playerid, Textdraw3[playerid], 0.449999, 1.600000);
PlayerTextDrawAlignment(playerid, Textdraw3[playerid], 1);
PlayerTextDrawColor(playerid, Textdraw3[playerid], -1);
PlayerTextDrawSetShadow(playerid, Textdraw3[playerid], 0);
PlayerTextDrawSetOutline(playerid, Textdraw3[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, Textdraw3[playerid], 51);
PlayerTextDrawFont(playerid, Textdraw3[playerid], 1);
PlayerTextDrawSetProportional(playerid, Textdraw3[playerid], 1);
TextDrawLetterSize(Textdraw2, 0.000000, -0.399630);
TextDrawTextSize(Textdraw2, 450.000000, 0.000000);
TextDrawAlignment(Textdraw2, 1);
TextDrawColor(Textdraw2, 0);
TextDrawUseBox(Textdraw2, true);
TextDrawBoxColor(Textdraw2, 102);
TextDrawSetShadow(Textdraw2, 0);
TextDrawSetOutline(Textdraw2, 0);
TextDrawFont(Textdraw2, 0);
for(new playerid = 0; playerid<MAX_PLAYERS; playerid++)
{
Textdraw3[playerid] = CreatePlayerTextDraw(playerid, 468.000000, 317.333374, "Kills: 0");
PlayerTextDrawLetterSize(playerid, Textdraw3[playerid], 0.449999, 1.600000);
PlayerTextDrawAlignment(playerid, Textdraw3[playerid], 1);
PlayerTextDrawColor(playerid, Textdraw3[playerid], -1);
PlayerTextDrawSetShadow(playerid, Textdraw3[playerid], 0);
PlayerTextDrawSetOutline(playerid, Textdraw3[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, Textdraw3[playerid], 51);
PlayerTextDrawFont(playerid, Textdraw3[playerid], 1);
PlayerTextDrawSetProportional(playerid, Textdraw3[playerid], 1);
Textdraw4[playerid] = CreatePlayerTextDraw(playerid, 468.000000, 334.506591, "Deaths: 0");
PlayerTextDrawLetterSize(playerid, Textdraw4[playerid], 0.449999, 1.600000);
PlayerTextDrawAlignment(playerid, Textdraw4[playerid], 1);
PlayerTextDrawColor(playerid, Textdraw4[playerid], -1);
PlayerTextDrawSetShadow(playerid, Textdraw4[playerid], 0);
PlayerTextDrawSetOutline(playerid, Textdraw4[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, Textdraw4[playerid], 51);
PlayerTextDrawFont(playerid, Textdraw4[playerid], 1);
PlayerTextDrawSetProportional(playerid, Textdraw4[playerid], 1);
PlayerTextDrawLetterSize(playerid, Textdraw4[playerid], 0.449999, 1.600000);
PlayerTextDrawAlignment(playerid, Textdraw4[playerid], 1);
PlayerTextDrawColor(playerid, Textdraw4[playerid], -1);
PlayerTextDrawSetShadow(playerid, Textdraw4[playerid], 0);
PlayerTextDrawSetOutline(playerid, Textdraw4[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, Textdraw4[playerid], 51);
PlayerTextDrawFont(playerid, Textdraw4[playerid], 1);
PlayerTextDrawSetProportional(playerid, Textdraw4[playerid], 1);
Textdraw5[playerid] = CreatePlayerTextDraw(playerid, 468.000000, 351.679809, "K/D: 0.0");
PlayerTextDrawLetterSize(playerid, Textdraw5[playerid], 0.449999, 1.600000);
PlayerTextDrawAlignment(playerid, Textdraw5[playerid], 1);
PlayerTextDrawColor(playerid, Textdraw5[playerid], -1);
PlayerTextDrawSetShadow(playerid, Textdraw5[playerid], 0);
PlayerTextDrawSetOutline(playerid, Textdraw5[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, Textdraw5[playerid], 51);
PlayerTextDrawFont(playerid, Textdraw5[playerid], 1);
PlayerTextDrawSetProportional(playerid, Textdraw5[playerid], 1);
}
return 1;
}
public OnFilterScriptExit()
{
TextDrawHideForAll(Textdraw0);
TextDrawHideForAll(Textdraw1);
TextDrawHideForAll(Textdraw2);
TextDrawDestroy(Textdraw0);
TextDrawDestroy(Textdraw1);
TextDrawDestroy(Textdraw2);
for(new playerid = 0; playerid<MAX_PLAYERS; playerid++)
{
PlayerTextDrawHide(playerid, Textdraw3[playerid]);
PlayerTextDrawHide(playerid, Textdraw4[playerid]);
PlayerTextDrawHide(playerid, Textdraw5[playerid]);
PlayerTextDrawDestroy(playerid, Textdraw3[playerid]);
PlayerTextDrawDestroy(playerid, Textdraw4[playerid]);
PlayerTextDrawDestroy(playerid, Textdraw5[playerid]);
}
return 1;
}
public OnPlayerConnect(playerid)
{
pKills[playerid] = 0;
pDeaths[playerid] = 0;
return 1;
}
public OnPlayerSpawn(playerid)
{
UpdateStats(playerid);
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid != INVALID_PLAYER_ID)pKills[killerid]++, UpdateStats(killerid);
pDeaths[playerid]++;
UpdateStats(playerid);
return 1;
}
UpdateStats(playerid)
{
new string[20];
format(string, sizeof string, "Kills:\t\t\t\t\t\t%d", pKills[playerid]);
PlayerTextDrawSetString(playerid, Textdraw3[playerid], string);
format(string, sizeof string, "Tode:\t\t\t\t\t%d", pDeaths[playerid]);
PlayerTextDrawSetString(playerid, Textdraw4[playerid], string);
format(string, sizeof string, "K-D:\t\t\t\t\t\t\t%.1f",(pKills[playerid]/pDeaths[playerid]));
PlayerTextDrawSetString(playerid, Textdraw5[playerid], string);
TextDrawShowForPlayer(playerid, Textdraw0);
TextDrawShowForPlayer(playerid, Textdraw1);
TextDrawShowForPlayer(playerid, Textdraw2);
PlayerTextDrawShow(playerid, Textdraw3[playerid]);
PlayerTextDrawShow(playerid, Textdraw4[playerid]);
PlayerTextDrawShow(playerid, Textdraw5[playerid]);
return 1;
}
PlayerTextDrawLetterSize(playerid, Textdraw5[playerid], 0.449999, 1.600000);
PlayerTextDrawAlignment(playerid, Textdraw5[playerid], 1);
PlayerTextDrawColor(playerid, Textdraw5[playerid], -1);
PlayerTextDrawSetShadow(playerid, Textdraw5[playerid], 0);
PlayerTextDrawSetOutline(playerid, Textdraw5[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, Textdraw5[playerid], 51);
PlayerTextDrawFont(playerid, Textdraw5[playerid], 1);
PlayerTextDrawSetProportional(playerid, Textdraw5[playerid], 1);
}
return 1;
}
public OnFilterScriptExit()
{
TextDrawHideForAll(Textdraw0);
TextDrawHideForAll(Textdraw1);
TextDrawHideForAll(Textdraw2);
TextDrawDestroy(Textdraw0);
TextDrawDestroy(Textdraw1);
TextDrawDestroy(Textdraw2);
for(new playerid = 0; playerid<MAX_PLAYERS; playerid++)
{
PlayerTextDrawHide(playerid, Textdraw3[playerid]);
PlayerTextDrawHide(playerid, Textdraw4[playerid]);
PlayerTextDrawHide(playerid, Textdraw5[playerid]);
PlayerTextDrawDestroy(playerid, Textdraw3[playerid]);
PlayerTextDrawDestroy(playerid, Textdraw4[playerid]);
PlayerTextDrawDestroy(playerid, Textdraw5[playerid]);
}
return 1;
}
public OnPlayerConnect(playerid)
{
pKills[playerid] = 0;
pDeaths[playerid] = 0;
return 1;
}
public OnPlayerSpawn(playerid)
{
UpdateStats(playerid);
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid != INVALID_PLAYER_ID)pKills[killerid]++, UpdateStats(killerid);
pDeaths[playerid]++;
UpdateStats(playerid);
return 1;
}
UpdateStats(playerid)
{
new string[20];
format(string, sizeof string, "Kills:\t\t\t\t\t\t%d", pKills[playerid]);
PlayerTextDrawSetString(playerid, Textdraw3[playerid], string);
format(string, sizeof string, "Tode:\t\t\t\t\t%d", pDeaths[playerid]);
PlayerTextDrawSetString(playerid, Textdraw4[playerid], string);
format(string, sizeof string, "K-D:\t\t\t\t\t\t\t%.1f",(pKills[playerid]/pDeaths[playerid]));
PlayerTextDrawSetString(playerid, Textdraw5[playerid], string);
TextDrawShowForPlayer(playerid, Textdraw0);
TextDrawShowForPlayer(playerid, Textdraw1);
TextDrawShowForPlayer(playerid, Textdraw2);
PlayerTextDrawShow(playerid, Textdraw3[playerid]);
PlayerTextDrawShow(playerid, Textdraw4[playerid]);
PlayerTextDrawShow(playerid, Textdraw5[playerid]);
return 1;
}
Das Script sollte funktionieren