Business
#4

For example your business owner changes , someone else buy that business , so you want that 3DText to be up to date right ? So for this you need a public that updates that information.

The easy way:
pawn Код:
public OnGameModeInit()
{
     SetTimer("update3d",3000,true); //this will make sure that your information is updated every 3 seconds
}

public update3d()
for(h = 0; h < sizeof(BizzInfo); h++)
    {
        if(BizzInfo[h][bOwned] == 0)
        {
            format(string, sizeof(string), "{FC3232}%s\n{1D65DE}This Business is for sale\nCost: {00FF00}$%d \n{1D65DE}Level : {FC3232}%d \n{1D65DE}To buy this Business type {FC3232}/buybiz",BizzInfo[h][bMessage],BizzInfo[h][bBuyPrice],BizzInfo[h][bLevelNeeded]);
            Update3DTextLabelText(bizz3d[h],COLOR_1BLUE,string);
        }
        if(BizzInfo[h][bOwned] == 1)
        {
            format(string, sizeof(string), "{FC3232}%s\n{1D65DE}Owner : {FC3232}%s\n{1D65DE}Extortion by : {FC3232}%s\n{1D65DE}Entrance Fee : {00FF00}$%d \n{1D65DE}Level : {FC3232}%d \n{1D65DE}To enter type {FC3232}/enter",BizzInfo[h][bMessage],BizzInfo[h][bOwner],BizzInfo[h][bExtortion],BizzInfo[h][bEntranceCost],BizzInfo[h][bLevelNeeded]);
            Update3DTextLabelText(bizz3d[h],COLOR_1BLUE,string);
        }
    }
return 1;
}
If you didn't understand please reply.
Reply


Messages In This Thread
Business - by Taykiro - 13.04.2013, 18:40
Re: Business - by shady001 - 13.04.2013, 18:51
Re: Business - by Taykiro - 14.04.2013, 12:22
Re: Business - by shady001 - 14.04.2013, 13:32
Re: Business - by Taykiro - 14.04.2013, 13:57
Re: Business - by CriticalRP - 14.04.2013, 14:30
Re: Business - by Taykiro - 14.04.2013, 14:32
Re: Business - by shady001 - 14.04.2013, 15:13

Forum Jump:


Users browsing this thread: 1 Guest(s)