28.09.2016, 20:18
hey guys when i attack another gang is show's me this textdraw but is all wrong i attacked Ballas not Los Aztecas and team mates on turf should be 0 not X
http://imgur.com/a/6rFuN
and this is the script
http://imgur.com/a/6rFuN
and this is the script
Код HTML:
function UpdateWarTextdraw(playerid) { if(IsInWar1(playerid) && GetPlayerVirtualWorld(playerid) == 10 || IsInWar2(playerid) && GetPlayerVirtualWorld(playerid) == 20) { new faction = PlayerInfo[playerid][pMember] + PlayerInfo[playerid][pLeader]; ShowWarTextdraw(playerid); format(gString, sizeof(gString), "Your Kills: %d / Deaths: %d", PlayerInfo[playerid][pPersonalKills], PlayerInfo[playerid][pPersonalDeaths]); PlayerTextDrawSetString(playerid, TextdrawWar[playerid][3], gString); if(IsInWar1(playerid)) { new m = WarTime[0] / 60; new s = WarTime[0] - m*60; format(gString, sizeof(gString), "Turf: %d / Time left: %02d:%02d",WarZone1, m,s); PlayerTextDrawSetString(playerid, TextdrawWar[playerid][4], gString); format(gString, sizeof(gString), "Score: %.1f - %.1f",ScoreDef, ScoreAtt); PlayerTextDrawSetString(playerid, TextdrawWar[playerid][6], gString); format(gString, sizeof(gString), "%s - %s",WarFactionName[Defenders], WarFactionName[Attackers]); PlayerTextDrawSetString(playerid, TextdrawWar[playerid][5], gString); if(faction == Attackers) format(gString, sizeof(gString), "Teammates on turf: %d", GetPlayersInZone(WarZone1, Attackers, 10)); if(faction == Defenders) format(gString, sizeof(gString), "Teammates on turf: %d", GetPlayersInZone(WarZone1, Defenders, 10)); PlayerTextDrawSetString(playerid, TextdrawWar[playerid][1], gString); } else if(IsInWar2(playerid)) { new m = WarTime[1] / 60; new s = WarTime[1] - m*60; format(gString, sizeof(gString), "Turf: %d / Time left: %02d:%02d",WarZone2, m,s); PlayerTextDrawSetString(playerid, TextdrawWar[playerid][4], gString); format(gString, sizeof(gString), "Score: %.1f - %.1f",ScoreDef2, ScoreAtt2); PlayerTextDrawSetString(playerid, TextdrawWar[playerid][6], gString); format(gString, sizeof(gString), "%s - %s",WarFactionName[Defenders2], WarFactionName[Attackers2]); PlayerTextDrawSetString(playerid, TextdrawWar[playerid][5], gString); if(faction == Attackers2) format(gString, sizeof(gString), "Teammates on turf: %d", GetPlayersInZone(WarZone2, Attackers2, 20)); if(faction == Defenders2) format(gString, sizeof(gString), "Teammates on turf: %d", GetPlayersInZone(WarZone2, Defenders2, 20)); PlayerTextDrawSetString(playerid, TextdrawWar[playerid][1], gString); } } else HideWarTextdraw(playerid); }
Код HTML:
TextdrawWar[playerid][1] = CreatePlayerTextDraw(playerid, 11.000000, 247.000000, "Teammates on turf: x"); PlayerTextDrawBackgroundColor(playerid, TextdrawWar[playerid][1], 255); PlayerTextDrawFont(playerid, TextdrawWar[playerid][1], 1); PlayerTextDrawLetterSize(playerid, TextdrawWar[playerid][1], 0.209999, 1.000000); PlayerTextDrawColor(playerid, TextdrawWar[playerid][1], -1); PlayerTextDrawSetOutline(playerid, TextdrawWar[playerid][1], 1); PlayerTextDrawSetProportional(playerid, TextdrawWar[playerid][1], 1);