16.08.2017, 18:02
Trying to make a textdraw for locations but it won't update when i enter a new area maybe you can see whats wrong here.
pawn Код:
for(new i=0; i<MAX_PLAYERS; i++)
{
Mapdraw[i] = TextDrawCreate(34.000000, 326.000000, "");
TextDrawBackgroundColor(Mapdraw[i], 255);
TextDrawFont(Mapdraw[i], 2);
TextDrawLetterSize(Mapdraw[i], 0.190000, 1.199999);
TextDrawColor(Mapdraw[i], -1);
TextDrawSetOutline(Mapdraw[i], 0);
TextDrawSetProportional(Mapdraw[i], 1);
TextDrawSetShadow(Mapdraw[i], 1);
}
pawn Код:
stock LoadAreaPl(playerid, type, num)
{
new string[128];
switch(type)
{
case 0: format(string, 128, "%s", GetPlayerArea(playerid));
case 1: format(string, 128, "%s", HouseInfo[num][hAdress]);
case 2: format(string, 128, "%s", DoorInfo[num][dName]);
case 3: format(string, 128, "%s", BusinessInfo[num][bName]);
case 5: string="Interior";
}
if(PlayerInfo[playerid][pHud] == 1) TextDrawSetString(Mapdraw[playerid], string), TextDrawShowForPlayer(playerid, Mapdraw[playerid]);
return true;
}