Business
#1

How make this http://postimg.org/image/iyyxwpeu1/ in create3dtextlabel ?? Please Help
Reply
#2

If you want to make the exact effect , it is created with GameTextForPlayer

pawn Код:
for(new h = 0; h < sizeof(BizzInfo); h++)
                {
                    if(IsATruck(tmpcar) && PlayerToPoint(10.0, i, BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ]))
                    {
                        format(string, sizeof(string), "~w~%s~n~~r~Products Required~w~: %d~n~~y~Price per Product: ~w~: $%d~n~~g~Funds: ~w~: $%d",BizzInfo[h][bMessage],(BizzInfo[h][bMaxProducts]-BizzInfo[h][bProducts]),BizzInfo[h][bPriceProd],BizzInfo[h][bTill]);
                        GameTextForPlayer(i, string, 5000, 3);
                        return 1;
                    }
                    if(PlayerToPoint(2.0, i, BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ]))
                    {
                        if(BizzInfo[h][bOwned] == 1)
                        {
                            format(string, sizeof(string), "~w~%s~w~~n~Owner : %s~n~Extortion by : %s~n~Entrance Fee : ~g~$%d ~w~Level : %d ~n~to enter type /enter",BizzInfo[h][bMessage],BizzInfo[h][bOwner],BizzInfo[h][bExtortion],BizzInfo[h][bEntranceCost],BizzInfo[h][bLevelNeeded]);
                        }
                        else
                        {
                            format(string, sizeof(string), "~w~%s~w~~n~This Business is for sale~n~Cost: ~g~$%d ~w~Level : %d ~n~to buy this Business type /buybiz",BizzInfo[h][bMessage],BizzInfo[h][bBuyPrice],BizzInfo[h][bLevelNeeded]);
                        }
                        GameTextForPlayer(i, string, 5000, 3);
                        return 1;
                    }
                }
This is from a GF mode , is exactly the same thing as your picture , i gues that picture was made on a GF server.

EDIT:
If you want to do that with create3dtextlabel here is an example :
pawn Код:
//global
new Text3D:bizz3d[5];//replace 5 with your biz number
//ongamemodeinit or with a timer if you use mysql to load data
for(new h = 0; h < sizeof(BizzInfo); h++)
    {
        if(BizzInfo[h][bOwned] == 0)
        {
            format(string, sizeof(string), "%s\nThis Business is for sale\nCost: $%d \nLevel : %d \nto buy this Business type /buybiz",BizzInfo[h][bMessage],BizzInfo[h][bBuyPrice],BizzInfo[h][bLevelNeeded]);
            bizz3d[h] = Create3DTextLabel(string,0x8361FFFF,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ]+1,15,0,1);
            AddStaticPickup(1274, 1, BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ]);
        }
        if(BizzInfo[h][bOwned] == 1)
        {
            format(string, sizeof(string), "%s\nOwner : %s\nExtortion by : %s\nEntrance Fee : $%d \nLevel : %d \nto enter type /enter",BizzInfo[h][bMessage],BizzInfo[h][bOwner],BizzInfo[h][bExtortion],BizzInfo[h][bEntranceCost],BizzInfo[h][bLevelNeeded]);
            bizz3d[h] = Create3DTextLabel(string,0x8361FFFF,BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ]+1,15,0,1);
            AddStaticPickup(19198, 1, BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ]+0.3);
        }
    }
and you use bizz3d[h] to update text3d

pawn Код:
public update3d() // use a timer in ongamemodinit to execute this every ... let's say 3 seconds
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;
}
Reply
#3

Quote:
Originally Posted by shady001
Посмотреть сообщение
and you use bizz3d[h] to update text3d

pawn Код:
public update3d() // use a timer in ongamemodinit to execute this every ... let's say 3 seconds
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;
}
I don't understand this step
Reply
#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
#5

gf.pwn(25494) : warning 209: function "CustomPickups" should return a value
gf.pwn(25495) : error 010: invalid function or declaration
gf.pwn(26715) : error 017: undefined symbol "h"
gf.pwn(26715) : warning 205: redundant code: constant expression is zero
gf.pwn(26715) : error 017: undefined symbol "h"
gf.pwn(26715) : warning 215: expression has no effect
gf.pwn(26715) : error 001: expected token: ")", but found ";"
gf.pwn(26715) : fatal error 107: too many error messages on one line
Reply
#6

PHP код:
for(new 0sizeof(BizzInfo); h++) 
Reply
#7

resolved

Now:

No all bussines is create3dtextlabel
why?
Reply
#8

Because if you use GF , you have Business and SBusiness , you must do the same for SBusiness too.
If you can't i'll reply again whit the code , now i have to go ...

pawn Код:
//creating 3DText OnGameModeInit()

for(new h = 0; h < sizeof(SBizzInfo); h++)
    {
        if(SBizzInfo[h][sbOwned] == 0)
        {
            format(string, sizeof(string), "%s\nThis Business is for sale\nCost: $%d \nLevel : %d \nto buy this Business type /buybiz",SBizzInfo[h][sbMessage],SBizzInfo[h][sbBuyPrice],SBizzInfo[h][sbLevelNeeded]);
            sbizz3d[h] = Create3DTextLabel(string,0x8361FFFF,SBizzInfo[h][sbEntranceX], SBizzInfo[h][sbEntranceY], SBizzInfo[h][sbEntranceZ]+1,15,0,1);
            AddStaticPickup(1274, 1, SBizzInfo[h][sbEntranceX], SBizzInfo[h][sbEntranceY], SBizzInfo[h][sbEntranceZ]);
        }
        if(SBizzInfo[h][sbOwned] == 1)
        {
            format(string, sizeof(string), "%s\nOwner : %s\nExtortion by : %s\nEntrance Fee : $%d\nLevel : %d \nto enter type /enter",SBizzInfo[h][sbMessage],SBizzInfo[h][sbOwner],SBizzInfo[h][sbExtortion],SBizzInfo[h][sbEntranceCost],SBizzInfo[h][sbLevelNeeded]);
            sbizz3d[h] = Create3DTextLabel(string,0x8361FFFF,SBizzInfo[h][sbEntranceX], SBizzInfo[h][sbEntranceY], SBizzInfo[h][sbEntranceZ]+1,15,0,1);
            AddStaticPickup(1239, 1, SBizzInfo[h][sbEntranceX], SBizzInfo[h][sbEntranceY], SBizzInfo[h][sbEntranceZ]);
        }
    }
pawn Код:
// updating the 3dtext
for(new h = 0; h < sizeof(SBizzInfo); h++)
    {
        if(SBizzInfo[h][sbOwned] == 0)
        {
            format(string, sizeof(string), "%s\nThis Business is for sale\nCost: $%d \nLevel : %d \nTo buy this Business type /buybiz",SBizzInfo[h][sbMessage],SBizzInfo[h][sbBuyPrice],SBizzInfo[h][sbLevelNeeded]);
            Update3DTextLabelText(sbizz3d[h],COLOR_1BLUE,string);
        }
        if(SBizzInfo[h][sbOwned] == 1)
        {
            format(string, sizeof(string), "%s\nOwner : %s\nExtortion by : %s\nEntrance Fee : $%d\nLevel : %d \nTo enter type /enter",SBizzInfo[h][sbMessage],SBizzInfo[h][sbOwner],SBizzInfo[h][sbExtortion],SBizzInfo[h][sbEntranceCost],SBizzInfo[h][sbLevelNeeded]);
            Update3DTextLabelText(sbizz3d[h],COLOR_1BLUE,string);
        }
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)