How to change gametext into textdraw?
#3

Use this code

pawn Код:
//Put this under OnGameModeInit
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);

//Replace your current function with this
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.
                TextDrawSetString(Textdraw0, string);
                TextDrawShowForPlayer(playerid, Textdraw0);
           }
           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.
                TextDrawSetString(Textdraw0, string);
                TextDrawShowForPlayer(playerid, Textdraw0);
           }
        }
    }
    return 1;
}
Reply


Messages In This Thread
How to change gametext into textdraw? - by ice2k1 - 27.03.2014, 11:58
Re: How to change gametext into textdraw? - by iThePunisher - 27.03.2014, 12:03
Re: How to change gametext into textdraw? - by [HK]Ryder[AN] - 27.03.2014, 12:14
Re: How to change gametext into textdraw? - by ice2k1 - 27.03.2014, 12:25
Re: How to change gametext into textdraw? - by TLN - 27.03.2014, 13:49

Forum Jump:


Users browsing this thread: 1 Guest(s)