28.10.2018, 08:26
I implemented the code in the arena when the killer and die show textdraw the number of times but is there a way for me not to put it in the onplayerupdate?
can anyone optimize it help me?
can anyone optimize it help me?
Код:
new PlayerText:Score_Arena[MAX_PLAYERS][3];
Код:
if(GetPVarInt(playerid, "IsInArena") >= 0)
{
new scp[128];
format(scp, sizeof(scp), "Kill: %d~n~Death: %d", PlayerInfo[playerid][pKills], PlayerInfo[playerid][pDeaths]);
PlayerTextDrawSetString(playerid, Score_Arena[playerid][2], scp);
for(new i = 0; i < 3; i++)
{
PlayerTextDrawShow(playerid, Score_Arena[playerid][i]);
}
}
else
{
for(new i = 0; i < 3; i++)
{
PlayerTextDrawHide(playerid, Score_Arena[playerid][i]);
}
}
Код:
Score_Arena[playerid][0] = CreatePlayerTextDraw(playerid, 25.000000, 187.083374, "LD_SPAC:white"); PlayerTextDrawLetterSize(playerid, Score_Arena[playerid][0], 0.000000, 0.000000); PlayerTextDrawTextSize(playerid, Score_Arena[playerid][0], 92.000000, 57.000000); PlayerTextDrawAlignment(playerid, Score_Arena[playerid][0], 1); PlayerTextDrawColor(playerid, Score_Arena[playerid][0], 170); PlayerTextDrawSetShadow(playerid, Score_Arena[playerid][0], 0); PlayerTextDrawSetOutline(playerid, Score_Arena[playerid][0], 0); PlayerTextDrawBackgroundColor(playerid, Score_Arena[playerid][0], 255); PlayerTextDrawFont(playerid, Score_Arena[playerid][0], 4); PlayerTextDrawSetProportional(playerid, Score_Arena[playerid][0], 0); PlayerTextDrawSetShadow(playerid, Score_Arena[playerid][0], 0); Score_Arena[playerid][1] = CreatePlayerTextDraw(playerid, 33.500000, 170.166687, "Arena"); PlayerTextDrawLetterSize(playerid, Score_Arena[playerid][1], 0.712000, 2.988333); PlayerTextDrawAlignment(playerid, Score_Arena[playerid][1], 1); PlayerTextDrawColor(playerid, Score_Arena[playerid][1], -1); PlayerTextDrawSetShadow(playerid, Score_Arena[playerid][1], 0); PlayerTextDrawSetOutline(playerid, Score_Arena[playerid][1], 1); PlayerTextDrawBackgroundColor(playerid, Score_Arena[playerid][1], 255); PlayerTextDrawFont(playerid, Score_Arena[playerid][1], 0); PlayerTextDrawSetProportional(playerid, Score_Arena[playerid][1], 1); PlayerTextDrawSetShadow(playerid, Score_Arena[playerid][1], 0); Score_Arena[playerid][2] = CreatePlayerTextDraw(playerid, 32.000000, 204.583343, "Kill: 5~n~Death: 0"); PlayerTextDrawLetterSize(playerid, Score_Arena[playerid][2], 0.400000, 1.600000); PlayerTextDrawAlignment(playerid, Score_Arena[playerid][2], 1); PlayerTextDrawColor(playerid, Score_Arena[playerid][2], -1); PlayerTextDrawSetShadow(playerid, Score_Arena[playerid][2], 0); PlayerTextDrawSetOutline(playerid, Score_Arena[playerid][2], 0); PlayerTextDrawBackgroundColor(playerid, Score_Arena[playerid][2], 255); PlayerTextDrawFont(playerid, Score_Arena[playerid][2], 3); PlayerTextDrawSetProportional(playerid, Score_Arena[playerid][2], 1); PlayerTextDrawSetShadow(playerid, Score_Arena[playerid][2], 0);


