Код:
native CreatePlayerTextDraw(textdrawid, Float:x, Float:y, string[])
native SetPlayerTextDrawString(playerid, textdrawid, string[])
native ShowPlayerTextDraw(playerid, textdrawid, bool:Show)
native SetPlayerTextDrawColor(playerid, textdrawid, cor)
native SetPlayerTextDrawBGColor(playerid, textdrawid, cor)
native SetPlayerTextDrawFont(playerid, textdrawid, fonte)
native SetPlayerTextDrawLetterSize(playerid, textdrawid, Float:x, Float:y)
native SetPlayerTextDrawOutline(playerid, textdrawid, tamanho)
native SetPlayerTextDrawProportional(playerid, textdrawid, tipo)
native StopPlayerTextDraw()
pawn Код:
public OnGameModeInit()
{
CreatePlayerTextDraw(0, 500.000000, 98.000000, "Assassinatos: %d");//ID 0
SetPlayerTextDrawFont(0, 2);
SetPlayerTextDrawLetterSize(0, 0.210000, 0.699999);
SetPlayerTextDrawColor(0, -16776961);
SetPlayerTextDrawOutline(0, 1);
SetPlayerTextDrawProportional(0, 1);
SetPlayerTextDrawUseBox(0, 1);
SetPlayerTextDrawTextSize(0, 605.000000, 0.000000);
SetPlayerTextDrawBoxColor(0, 255);
CreatePlayerTextDraw(1, 500.000000, 105.000000, "Mortes: %d");//ID 1
SetPlayerTextDrawFont(1, 2);
SetPlayerTextDrawLetterSize(1, 0.210000, 0.699999);
SetPlayerTextDrawColor(1, -16776961);
SetPlayerTextDrawOutline(1, 1);
SetPlayerTextDrawProportional(1, 1);
SetPlayerTextDrawUseBox(1, 1);
SetPlayerTextDrawBoxColor(1, 255);
SetPlayerTextDrawTextSize(1, 605.000000, 0.000000);
SetPlayerTextDrawBoxColor(1, 255);
return 1;
}
public OnPlayerConnect(playerid)
{
ShowPlayerTextDraw(playerid, 0, true);//ID 0
ShowPlayerTextDraw(playerid, 1, true);//ID 1
return 1;
}
public OnPlayerDisconnect(playerid)
{
ShowPlayerTextDraw(playerid, 0, false);//ID 0
ShowPlayerTextDraw(playerid, 1, false);//ID 1
return 1;
}
public OnPlayerUpdate(playerid)
{
new string[256];
format(string, sizeof(string), "Assassinatos: %d", /*DEFINICAO DE KILL*/);
SetPlayerTextDrawString(playerid, 0, string);
format(string, sizeof(string), "Mortes: %d", /*DEFINICAO DE DEATH*/);
SetPlayerTextDrawString(playerid, 1, string);
return 1;
}