14.04.2013, 13:32
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:
If you didn't understand please reply.
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;
}

