27.03.2014, 11:58
Hey.
How to change this gametext into textdraw?
Gametext:
Textdraw:
Function:
How to change this gametext into textdraw?
Gametext:
pawn Код:
format(string, sizeof(string), "~g~Name:~w~%s~n~~g~Owner:~w~%s~n~~g~BizType:~w~%s ~n~~g~BizID:~w~%i", BusinessInfo[b][bName], BusinessInfo[b][bOwner], BusinessType(b), b);//Formats a string with all the info.
GameTextForPlayer(playerid, string, 3000, 3);
pawn Код:
Textdraw0 = TextDrawCreate(446.000000, 366.000000, "Info~n~Owner: name_name~n~Business type~n~Status:~n~~r~Closed / Open");
TextDrawBackgroundColor(Textdraw0, 255);
TextDrawFont(Textdraw0, 1);
TextDrawLetterSize(Textdraw0, 0.500000, 1.000000);
TextDrawColor(Textdraw0, -1);
TextDrawSetOutline(Textdraw0, 0);
TextDrawSetProportional(Textdraw0, 1);
TextDrawSetShadow(Textdraw0, 1);
TextDrawUseBox(Textdraw0, 1);
TextDrawBoxColor(Textdraw0, 255);
TextDrawTextSize(Textdraw0, 612.000000, -9.000000);
pawn Код:
public OnPlayerPickUpDynamicPickup(playerid, pickupid)
{
new string[256];
for(new b = 1;b < sizeof(BusinessInfo);b++)// Loopd through all the businesses again.
{
if(pickupid == BusinessInfo[b][bOutsideIcon])//Checks if it's a biz pickup.
{
if(BusinessInfo[b][bOwned] == 0)//Checks if it is owned.
{
format(string, sizeof(string), "~g~Name:~w~%s~n~~w~This business is ~g~for sale!~n~~r~Price:~g~%i~n~BizType:~w~%s~n~~g~BizID:~w~%i", BusinessInfo[b][bName], BusinessInfo[b][bPrice], BusinessType(b), b);//Formats a string with all the info.
GameTextForPlayer(playerid, string, 3000, 3);
}
if(BusinessInfo[b][bOwned] == 1)//Checks if it owned.
{
format(string, sizeof(string), "~g~Name:~w~%s~n~~g~Owner:~w~%s~n~~g~BizType:~w~%s ~n~~g~BizID:~w~%i", BusinessInfo[b][bName], BusinessInfo[b][bOwner], BusinessType(b), b);//Formats a string with all the info.
GameTextForPlayer(playerid, string, 3000, 3);
}
}
}
return 1;
}