06.11.2013, 19:27
Hey, I've fixed that whenever a player enters a pickup a textdraw shows. Now, I want the textdraws to hide whenever they leave the pickup.
Help, please.
Help, please.
pawn Код:
public OnPlayerPickUpDynamicPickup(playerid, pickupid)
{
new string[256];
for(new b = 1;b < sizeof(BusinessInfo);b++)
{
if(pickupid == BusinessInfo[b][bOutsideIcon])
{
if(BusinessInfo[b][bOwned] == 0)
{
format(string, sizeof(string), "%s", BusinessType(b));
TextDrawSetString(Textdraw7, string);
format(string, sizeof(string), "%s", BusinessInfo[b][bName]);
TextDrawSetString(Textdraw6, string);
format(string, sizeof(string), "%d", BusinessInfo[b][bPrice]);
TextDrawSetString(Textdraw8, string);
format(string, sizeof(string), "%i", b);
TextDrawSetString(Textdraw9, string);
TextDrawShowForPlayer(playerid,Textdraw0);
TextDrawShowForPlayer(playerid,Textdraw1);
TextDrawShowForPlayer(playerid,Textdraw2);
TextDrawShowForPlayer(playerid,Textdraw3);
TextDrawShowForPlayer(playerid,Textdraw4);
TextDrawShowForPlayer(playerid,Textdraw6);
TextDrawShowForPlayer(playerid,Textdraw7);
TextDrawShowForPlayer(playerid,Textdraw8);
TextDrawShowForPlayer(playerid,Textdraw9);
TextDrawShowForPlayer(playerid,Textdraw10);
TextDrawShowForPlayer(playerid,Textdraw12);
TextDrawShowForPlayer(playerid,Textdraw13);
}
if(BusinessInfo[b][bOwned] == 1)
{
format(string, sizeof(string), "%s", BusinessType(b));
TextDrawSetString(Textdraw7, string);
format(string, sizeof(string), "%s", BusinessInfo[b][bName]);
TextDrawSetString(Textdraw6, string);
format(string, sizeof(string), "%d", BusinessInfo[b][bPrice]);
TextDrawSetString(Textdraw8, string);
format(string, sizeof(string), "%i", b);
TextDrawSetString(Textdraw9, string);
TextDrawShowForPlayer(playerid,Textdraw0);
TextDrawShowForPlayer(playerid,Textdraw1);
TextDrawShowForPlayer(playerid,Textdraw2);
TextDrawShowForPlayer(playerid,Textdraw3);
TextDrawShowForPlayer(playerid,Textdraw4);
TextDrawShowForPlayer(playerid,Textdraw6);
TextDrawShowForPlayer(playerid,Textdraw7);
TextDrawShowForPlayer(playerid,Textdraw8);
TextDrawShowForPlayer(playerid,Textdraw9);
TextDrawShowForPlayer(playerid,Textdraw10);
TextDrawShowForPlayer(playerid,Textdraw12);
TextDrawShowForPlayer(playerid,Textdraw13);
}
}
}
return 1;
}