stock BusinessType(BIZID)
{
new string[30];
switch(BusinessInfo[BIZID][bType])
{
case 5: string = "Cvijecara";
case 4: string = "GunShop";
case 3: string = "24/7";
case 2: string = "Bar";
case 1: string = "Ducan sa odjecom";
}
return string;
}
new poruka[256];
format(poruka,sizeof(poruka),""COLOR_SIVA"~{FFFFFF} Firma na prodaju -"COLOR_WG" %d"COLOR_SIVA" ~\n{FFFFFF}Cijena:"COLOR_ZELENA" $%d\n\n{FFFFFF}Ukoliko zelite kupiti firmu: /kupifirmu",level,BusinessInfo[id][bPrice]);
Create3DTextLabel(poruka,-1,BusinessInfo[id][bEntranceX], BusinessInfo[id][bEntranceY], BusinessInfo[id][bEntranceZ],30,0,0);
// In your format, I can't re-do your format as I don't understand anything.
format(poruka,sizeof(poruka),"Business Name: %s",BusinessType(id));
new poruka[256];
format(poruka,sizeof(poruka),""COLOR_SIVA"~{FFFFFF} Business on sale -"COLOR_WG" %d"COLOR_SIVA" ~\n{FFFFFF}Price:"COLOR_ZELENA" $%d\n\n{FFFFFF}For buy type: /kupifirmu",level,BusinessInfo[id][bPrice]);
Create3DTextLabel(poruka,-1,BusinessInfo[id][bEntranceX], BusinessInfo[id][bEntranceY], BusinessInfo[id][bEntranceZ],30,0,0);
format(poruka,sizeof(poruka),""COLOR_SIVA"~{FFFFFF} Business on sale -"COLOR_WG" %s"COLOR_SIVA" ~\n{FFFFFF}Price:"COLOR_ZELENA" $%d\n\n{FFFFFF}For buy type: /kupifirmu",BusinessType(id),BusinessInfo[id][bPrice]);
stock BusinessType(BIZID)
{
new string[30];
switch(BusinessInfo[BIZID][bType])
{
case 1: string = "Ducan sa odjecom";
case 2: string = "Bar";
case 3: string = "24/7";
case 4: string = "GunShop";
case 5: string = "Cvijecara";
}
return string;
}
new poruka[256];
format(poruka,sizeof(poruka),""COLOR_SIVA"~{FFFFFF} Firma na prodaju -"COLOR_WG" %s"COLOR_SIVA" ~\n{FFFFFF}Cijena:"COLOR_ZELENA" $%d\n\n{FFFFFF}Ukoliko zelite kupiti firmu: /kupifirmu",BusinessType(id),BusinessInfo[id][bPrice]);
Create3DTextLabel(poruka,-1,BusinessInfo[id][bEntranceX], BusinessInfo[id][bEntranceY], BusinessInfo[id][bEntranceZ],30,0,0);
PHP код:
|
stock BusinessType(BIZID)
{
new string[30];
switch(BusinessInfo[BIZID][bType])
{
case 1: strpack(string, "Ducan sa odjecom"); // Use 'strpack' instead of 'format'! 'format' is more slower
case 2: strpack(string, "Bar");
case 3: strpack(string, "24/7");
case 4: strpack(string, "GunShop");
case 5: strpack(string, "Cvijecara");
}
return string;
}
new poruka[256];
format(poruka, sizeof(poruka), COLOR_SIVA"~{FFFFFF} Firma na prodaju -"COLOR_WG" %s"COLOR_SIVA" ~\n{FFFFFF}Cijena:"COLOR_ZELENA" $%d\n\n{FFFFFF}Ukoliko zelite kupiti firmu: /kupifirmu",BusinessType(id),BusinessInfo[id][bPrice]); // if you want to show biz name, change 'BusinessType(id)' with 'BusinessInfo[id][bName]' or something similar.
Create3DTextLabel(poruka,-1,BusinessInfo[id][bEntranceX], BusinessInfo[id][bEntranceY], BusinessInfo[id][bEntranceZ],30,0,0);
format(poruka,sizeof(poruka),""COLOR_SIVA"~{FFFFFF} Firma na prodaju -"COLOR_WG" %s"COLOR_SIVA" ~\n{FFFFFF}Cijena:"COLOR_ZELENA" $%d\n\n{FFFFFF}Ukoliko zelite kupiti firmu: /kupifirmu",BusinessType(id),BusinessInfo[id][bPrice]);