//At the top
forward CheckLoggedInAs(playerid);
new Text:LoggedInAs;
new kill[MAX_PLAYERS];
new Death[MAX_PLAYERS];
//at OnGameModeInit
SetTimer("CheckLoggedInAs", 1500, true); //at OnGameModeInit
LoggedInAs = TextDrawCreate(497.000000,111.000000, "~r~Deaths ~b~%d~w~ - ~g~Kills ~b~%d");
//+ some other crap for the textdraw. (Proportional etc.)
//Then here at OnPlayerDeath
CheckLoggedInAs();
kill[killerid]++;
Death[playerid]++;
//And as a public..
public CheckLoggedInAs(playerid)
{
new string[128];
format(string, sizeof(string), "~r~Deaths ~b~%d~w~ - ~g~Kills ~b~%d" , kill[playerid], Death[playerid]);
TextDrawSetString(Text:LoggedInAs, string);
return 1;
}
SetTimer("CheckLoggedInAs", 1500, true);
forward CheckLoggedInAs(playerid);
//At the top
forward CheckLoggedInAs(playerid);
new Text:LoggedInAs[MAX_PLAYERS];
new kill[MAX_PLAYERS];
new Death[MAX_PLAYERS];
//at OnPlayerConnect
LoggedInAs[playerid] = TextDrawCreate(497.000000,111.000000, " ");
//+ some other crap for the textdraw. (Proportional etc.)
CheckLoggedInAs();
//at OnPlayerDisconnect
TextDrawDestroy(LoggedInAs[playerid]);
//at OnPlayerSpawn
TextDrawShowForPlayer(playerid,LoggedInAs[playerid]);
//Then here at OnPlayerDeath
kill[killerid]++;
Death[playerid]++;
CheckLoggedInAs();
//And as a public..
public CheckLoggedInAs(playerid)
{
new string[128];
format(string, sizeof(string), "~r~Deaths ~b~%d~w~ - ~g~Kills ~b~%d" , kill[playerid], Death[playerid]);
TextDrawSetString(Text:LoggedInAs[playerid], string);
return 1;
}
format(string, sizeof(string), "~r~Deaths ~b~%d~w~ - ~g~Kills ~b~%d" , kill[playerid], Death[playerid]);
format(string, sizeof(string), "~g~Kills~b~%d~w~ - ~r~Deaths ~b~%d" , kill[playerid], Death[playerid]);
|
Originally Posted by John Rockie
Change This
Код:
format(string, sizeof(string), "~r~Deaths ~b~%d~w~ - ~g~Kills ~b~%d" , kill[playerid], Death[playerid]); Код:
format(string, sizeof(string), "~g~Kills~b~%d~w~ - ~r~Deaths ~b~%d" , kill[playerid], Death[playerid]); ![]() |
//At the top
new Text:LoggedInAs[MAX_PLAYERS];
new kill[MAX_PLAYERS];
new Death[MAX_PLAYERS];
//at OnPlayerConnect
LoggedInAs[playerid] = TextDrawCreate(497.000000,111.000000, " ");
//+ some other crap for the textdraw. (Proportional etc.)
CheckLoggedInAs(playerid);
//at OnPlayerDisconnect
TextDrawDestroy(LoggedInAs[playerid]);
//at OnPlayerSpawn
TextDrawShowForPlayer(playerid,LoggedInAs[playerid]);
//Then here at OnPlayerDeath
kill[killerid]++;
Death[playerid]++;
CheckLoggedInAs(playerid);
//And...
stock CheckLoggedInAs(playerid)
{
new string[128];
format(string, sizeof(string), "~r~Deaths ~b~%d~w~ - ~g~Kills ~b~%d", Death[playerid], kill[playerid]);
TextDrawSetString(Text:LoggedInAs[playerid], string);
return 1;
}