|
Update3DTextLabelText Use para atualizar a 3DTextLabel quando um jogador compra a casa ou empresa, no comando onde vocк diz aparecer que nгo existe, veja se o mesmo possui um return 1; ao final dele.
|
|
Mostre-nos a funзao Update3DTextLabelText();
O problema de estar nela |
for(new h = 0; h < sizeof(BizzInfo); h++)
{
if(BizzInfo[h][bOwned] == 0)
{
format(FormatPerigoso, sizeof(FormatPerigoso),
"{FFFFFF}Esta empresa esta a venda\n%s\n\
{33CCFF}Preзo da Empresa: {33AA33}R$%s\n\
{33CCFF}Nнvel: {FFFFFF}%d\n\
{33CCFF}Fundos: {33AA33}R$%s\n\
{FFFF00}Produtos: {9ACD32}%d/{FFFFFF}%d\n\
{FFFF00}Preзo por produto: {33AA33}R$%s\n\
{FFFFFF}Para comprar digite /comprarempresa",
BizzInfo[h][bMessage],
ConvertMoney(BizzInfo[h][bBuyPrice]),
BizzInfo[h][bLevelNeeded],
ConvertMoney(BizzInfo[h][bTill]),
BizzInfo[h][bProducts],BizzInfo[h][bMaxProducts],
ConvertMoney(BizzInfo[h][bPriceProd]));
Update3DTextLabelText(BizzLabel[h], COLOR_AZULBB, FormatPerigoso);
}
if(BizzInfo[h][bOwned] == 1)
{
format(FormatPerigoso, sizeof(FormatPerigoso),
"%s\n\
{33CCFF}Dono da Empresa: {FFFFFF}%s\n\
{33CCFF}Extorsгo: {FFFFFF}%s\n\
{33CCFF}Entrada: {33AA33}R$%d\n\
{33CCFF}Nнvel: {FFFFFF}%d\n\
{FFFFFF}Aperte a letra F para entrar\n\
{33CCFF}Fundos: {33AA33}R$%s\n\
{FFFF00}Produtos: {9ACD32}%d/{FFFFFF}%d\n\
{FFFF00}Preзo por produto: {33AA33}R$%s",
BizzInfo[h][bMessage],
BizzInfo[h][bOwner],
BizzInfo[h][bExtortion],
BizzInfo[h][bEntranceCost],
BizzInfo[h][bLevelNeeded],
ConvertMoney(BizzInfo[h][bTill]),
BizzInfo[h][bProducts],BizzInfo[h][bMaxProducts],
ConvertMoney(BizzInfo[h][bPriceProd]));
Update3DTextLabelText(BizzLabel[h], COLOR_AZULBB, FormatPerigoso);
}
}
for(new h = 0; h < sizeof(BizzInfo); h++)
{
if(BizzInfo[h][bOwned] == 0)
{
DestroyDynamic3DTextLabel(BizzLabel[h]);
format(FormatPerigoso, sizeof(FormatPerigoso),
"{FFFFFF}Esta empresa esta a venda\n%s\n\
{33CCFF}Preзo da Empresa: {33AA33}R$%s\n\
{33CCFF}Nнvel: {FFFFFF}%d\n\
{33CCFF}Fundos: {33AA33}R$%s\n\
{FFFF00}Produtos: {9ACD32}%d/{FFFFFF}%d\n\
{FFFF00}Preзo por produto: {33AA33}R$%s\n\
{FFFFFF}Para comprar digite /comprarempresa",
BizzInfo[h][bMessage],
ConvertMoney(BizzInfo[h][bBuyPrice]),
BizzInfo[h][bLevelNeeded],
ConvertMoney(BizzInfo[h][bTill]),
BizzInfo[h][bProducts],BizzInfo[h][bMaxProducts],
ConvertMoney(BizzInfo[h][bPriceProd]));
BizzLabel[h] = CreateDynamic3DTextLabel(FormatPerigoso,** aqui vocк coloca o resto das informaзхes **);
}
if(BizzInfo[h][bOwned] == 1)
{
DestroyDynamic3DTextLabel(BizzLabel[h]);
format(FormatPerigoso, sizeof(FormatPerigoso),
"%s\n\
{33CCFF}Dono da Empresa: {FFFFFF}%s\n\
{33CCFF}Extorsгo: {FFFFFF}%s\n\
{33CCFF}Entrada: {33AA33}R$%d\n\
{33CCFF}Nнvel: {FFFFFF}%d\n\
{FFFFFF}Aperte a letra F para entrar\n\
{33CCFF}Fundos: {33AA33}R$%s\n\
{FFFF00}Produtos: {9ACD32}%d/{FFFFFF}%d\n\
{FFFF00}Preзo por produto: {33AA33}R$%s",
BizzInfo[h][bMessage],
BizzInfo[h][bOwner],
BizzInfo[h][bExtortion],
BizzInfo[h][bEntranceCost],
BizzInfo[h][bLevelNeeded],
ConvertMoney(BizzInfo[h][bTill]),
BizzInfo[h][bProducts],BizzInfo[h][bMaxProducts],
ConvertMoney(BizzInfo[h][bPriceProd]));
BizzLabel[h] = CreateDynamic3DTextLabel(FormatPerigoso,** aqui vocк coloca o resto das informaзхes **);
}
}
|
PHP Code:
|
BizzLabel[h] = CreateDynamic3DTextLabel(FormatPerigoso, COLOR_AZULBB);
CreateDynamic3DTextLabel(TextString, 0xFFFFFFAA, [POSX], [POSY], [POSZ]+1, 7);
CreateDynamic3DTextLabel(const text[], color, Float:x, Float:y, Float:z, Float:drawdistance, attachedplayer = INVALID_PLAYER_ID, attachedvehicle = INVALID_VEHICLE_ID, testlos = 0, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = STREAMER_3D_TEXT_LABEL_SD, STREAMER_TAG_AREA areaid = STREAMER_TAG_AREA -1, priority = 0);
|
Depois da FormatPerigoso vem a cor que deve ser o COLOR_AZULBB, depois as coordenadas, X, Y e Z e a distancia que o texto aparecerб
veja esse exemplo de um FS meu: PHP Code:
PHP Code:
|
for(new h = 0; h < sizeof(BizzInfo); h++)
{
if(BizzInfo[h][bOwned] == 0)
{
DestroyDynamic3DTextLabel(BizzLabel[h]);
format(FormatPerigoso, sizeof(FormatPerigoso),
"{FFFFFF}Esta empresa esta a venda\n%s\n\
{33CCFF}Preзo da Empresa: {33AA33}R$%s\n\
{33CCFF}Nнvel: {FFFFFF}%d\n\
{33CCFF}Fundos: {33AA33}R$%s\n\
{FFFF00}Produtos: {9ACD32}%d/{FFFFFF}%d\n\
{FFFF00}Preзo por produto: {33AA33}R$%s\n\
{FFFFFF}Para comprar digite /comprarempresa",
BizzInfo[h][bMessage],
ConvertMoney(BizzInfo[h][bBuyPrice]),
BizzInfo[h][bLevelNeeded],
ConvertMoney(BizzInfo[h][bTill]),
BizzInfo[h][bProducts],BizzInfo[h][bMaxProducts],
ConvertMoney(BizzInfo[h][bPriceProd]));
BizzLabel[h] = CreateDynamic3DTextLabel(FormatPerigoso, COLOR_AZULBB,-1,-1,-1,50.0);
}
if(BizzInfo[h][bOwned] == 1)
{
DestroyDynamic3DTextLabel(BizzLabel[h]);
format(FormatPerigoso, sizeof(FormatPerigoso),
"%s\n\
{33CCFF}Dono da Empresa: {FFFFFF}%s\n\
{33CCFF}Extorsгo: {FFFFFF}%s\n\
{33CCFF}Entrada: {33AA33}R$%d\n\
{33CCFF}Nнvel: {FFFFFF}%d\n\
{FFFFFF}Aperte a letra F para entrar\n\
{33CCFF}Fundos: {33AA33}R$%s\n\
{FFFF00}Produtos: {9ACD32}%d/{FFFFFF}%d\n\
{FFFF00}Preзo por produto: {33AA33}R$%s",
BizzInfo[h][bMessage],
BizzInfo[h][bOwner],
BizzInfo[h][bExtortion],
BizzInfo[h][bEntranceCost],
BizzInfo[h][bLevelNeeded],
ConvertMoney(BizzInfo[h][bTill]),
BizzInfo[h][bProducts],BizzInfo[h][bMaxProducts],
ConvertMoney(BizzInfo[h][bPriceProd]));
BizzLabel[h] = CreateDynamic3DTextLabel(FormatPerigoso, COLOR_AZULBB,-1,-1,-1,50.0);
}
}
BizzLabel[idx] = Create3DTextLabel(gstring,COLOR_AZULBB,SBizzInfo[idx][sbEntranceX], SBizzInfo[idx][sbEntranceY], SBizzInfo[idx][sbEntranceZ]+0.5,20.0,0);
BizzLabel[h] = CreateDynamic3DTextLabel(FormatPerigoso, COLOR_AZULBB,SBizzInfo[h][sbEntranceX], SBizzInfo[h][sbEntranceY], SBizzInfo[h][sbEntranceZ]+1,20.0,0);
|
PHP Code:
|
C:\Users\joao\Desktop\BPS\gamemodes\BACKUP.pwn(101360) : warning 213: tag mismatch C:\Users\joao\Desktop\BPS\gamemodes\BACKUP.pwn(101360) : warning 213: tag mismatch C:\Users\joao\Desktop\BPS\gamemodes\BACKUP.pwn(101360) : warning 213: tag mismatch
BizzLabel[h] = CreateDynamic3DTextLabel(FormatPerigoso, COLOR_AZULBB,BizzInfo[h][sbEntranceX], BizzInfo[h][sbEntranceY], BizzInfo[h][sbEntranceZ]+1,20.0,0);
|
Code:
BizzLabel[h] = CreateDynamic3DTextLabel(FormatPerigoso, COLOR_AZULBB,BizzInfo[h][sbEntranceX], BizzInfo[h][sbEntranceY], BizzInfo[h][sbEntranceZ]+1,20.0,0); |
stock Atualizar3Dtexts()
{
new FormatPerigoso[600];
for(new h = 0; h < sizeof(BizzInfo); h++)
{
if(BizzInfo[h][bOwned] == 0)
{
format(FormatPerigoso, sizeof(FormatPerigoso),
"{FFFFFF}Esta empresa esta a venda\n{00BFFF}%s\n\
{FFFFFF}Preзo da Empresa: {32CD32}R$%d\n\
{FFFFFF}Nivel: {00BFFF}%d\n\
{FFFFFF}Saldo Cofre: {32CD32}R$%d\n\
Para comprar digite /comprarempresa",
BizzInfo[h][bMessage],
BizzInfo[h][bBuyPrice],
BizzInfo[h][bLevelNeeded],
BizzInfo[h][bTill]);
Update3DTextLabelText(BizzLabel[h], COLOR_AZULBB, FormatPerigoso);
}
if(BizzInfo[h][bOwned] == 1)
{
format(FormatPerigoso, sizeof(FormatPerigoso),
"{00BFFF}%s\n\
{FFFFFF}Dono da Empresa:{00BFFF} %s\n\
{FFFFFF}Extorsгo: %s\n\
{FFFFFF}Taxa de Entrada: {32CD32}R$%d\n\
{FFFFFF}Nivel: {00BFFF}%d\n\
{FFFFFF}Saldo Cofre: {32CD32}$%d\n\
{DCDCDC}Para Entrar, Aperte {1E90FF}F",
BizzInfo[h][bMessage],
BizzInfo[h][bOwner],
BizzInfo[h][bExtortion],
BizzInfo[h][bEntranceCost],
BizzInfo[h][bLevelNeeded],
BizzInfo[h][bTill]);
Update3DTextLabelText(BizzLabel[h], COLOR_AZULBB, FormatPerigoso);
}
}
return 0;
}
Atualizar3Dtexts();
|
Code:
stock Atualizar3Dtexts()
{
new FormatPerigoso[600];
for(new h = 0; h < sizeof(BizzInfo); h++)
{
if(BizzInfo[h][bOwned] == 0)
{
format(FormatPerigoso, sizeof(FormatPerigoso),
"{FFFFFF}Esta empresa esta a venda\n{00BFFF}%s\n\
{FFFFFF}Preзo da Empresa: {32CD32}R$%d\n\
{FFFFFF}Nivel: {00BFFF}%d\n\
{FFFFFF}Saldo Cofre: {32CD32}R$%d\n\
Para comprar digite /comprarempresa",
BizzInfo[h][bMessage],
BizzInfo[h][bBuyPrice],
BizzInfo[h][bLevelNeeded],
BizzInfo[h][bTill]);
Update3DTextLabelText(BizzLabel[h], COLOR_AZULBB, FormatPerigoso);
}
if(BizzInfo[h][bOwned] == 1)
{
format(FormatPerigoso, sizeof(FormatPerigoso),
"{00BFFF}%s\n\
{FFFFFF}Dono da Empresa:{00BFFF} %s\n\
{FFFFFF}Extorsгo: %s\n\
{FFFFFF}Taxa de Entrada: {32CD32}R$%d\n\
{FFFFFF}Nivel: {00BFFF}%d\n\
{FFFFFF}Saldo Cofre: {32CD32}$%d\n\
{DCDCDC}Para Entrar, Aperte {1E90FF}F",
BizzInfo[h][bMessage],
BizzInfo[h][bOwner],
BizzInfo[h][bExtortion],
BizzInfo[h][bEntranceCost],
BizzInfo[h][bLevelNeeded],
BizzInfo[h][bTill]);
Update3DTextLabelText(BizzLabel[h], COLOR_AZULBB, FormatPerigoso);
}
}
return 0;
}
Code:
Atualizar3Dtexts(); +REP |
BPS::Atualizar3Dtexts()
{
new FormatPerigoso[600];
for(new h = 0; h < sizeof(HouseInfo); h++)
{
if(HouseInfo[h][hOwned] == 0)
{
format(FormatPerigoso, sizeof(FormatPerigoso),
"[CASA ID: %03d]\n\
Esta casa esta a venda\n\
Descricao: %s\n\
Preзo: R$%d\n\
Nнvel: %d\n\
Carro: %s\n\
Use /comprarcasa",
h,
HouseInfo[h][hDiscription],
HouseInfo[h][hValue],
HouseInfo[h][hLevel],
veehName[HouseInfo[h][hVec]-400]);
Delete3DTextLabel(HouseLabel[h]);
HouseLabel[h] = Create3DTextLabel(FormatPerigoso,0x00CC00FF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]+0.5,13.0, 0);
DestroyDynamicPickup(HousePickup[h]);
HousePickup[h] = CreateDynamicPickup(1273, 23, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],-1,-1,-1,50.0);
}
if(HouseInfo[h][hOwned] == 1)
{
if(HouseInfo[h][hRentabil] == 0)
{
format(FormatPerigoso, sizeof(FormatPerigoso),
"[CASA ID: %03d]\n\
O dono desta casa й %s\n\
Nнvel: %d\n\
Veнculo: %s\n\
Ъltimo login: [%s]\n\
Aperte a letra F para entrar",
h,
HouseInfo[h][hOwner],
HouseInfo[h][hLevel],
veehName[HouseInfo[h][hVec]-400],
HouseInfo[h][hVerData]);
Delete3DTextLabel(HouseLabel[h]);
HouseLabel[h] = Create3DTextLabel(FormatPerigoso,0xFF6347FF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]+0.5,13.0, 0);
DestroyDynamicPickup(HousePickup[h]);
HousePickup[h] = CreateDynamicPickup(19522, 23, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],-1,-1,-1,50.0);
}
else
{
format(FormatPerigoso, sizeof(FormatPerigoso),
"[CASA ID: %03d]\n\
O dono desta casa й %s\n\
Aluguel: R$%d\n\
Nнvel: %d\n\
Veнculo: %s\n\
Ъltimo Login: [%s]\n\
USE /alugarquarto para aluga-la\n\
Aperte a letra F para entrar",
h,
HouseInfo[h][hOwner],
HouseInfo[h][hRent],
HouseInfo[h][hLevel],
veehName[HouseInfo[h][hVec]-400],
HouseInfo[h][hVerData]);
Delete3DTextLabel(HouseLabel[h]);
HouseLabel[h] = Create3DTextLabel(FormatPerigoso,0xFF6347FF,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]+0.5,13.0, 0);
DestroyDynamicPickup(HousePickup[h]);
HousePickup[h] = CreateDynamicPickup(19522, 23, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez],-1,-1,-1,50.0);
}
}
}
for(new h = 0; h < sizeof(BizzInfo); h++)
{
if(BizzInfo[h][bOwned] == 0)
{
//DestroyDynamic3DTextLabel(BizzLabel[h]);
format(FormatPerigoso, sizeof(FormatPerigoso),
"{FFFFFF}Esta empresa esta a venda\n%s\n\
{33CCFF}Preзo da Empresa: {33AA33}R$%s\n\
{33CCFF}Nнvel: {FFFFFF}%d\n\
{33CCFF}Fundos: {33AA33}R$%s\n\
{FFFF00}Produtos: {9ACD32}%d/{FFFFFF}%d\n\
{FFFF00}Preзo por produto: {33AA33}R$%s\n\
{FFFFFF}Para comprar digite /comprarempresa",
BizzInfo[h][bMessage],
ConvertMoney(BizzInfo[h][bBuyPrice]),
BizzInfo[h][bLevelNeeded],
ConvertMoney(BizzInfo[h][bTill]),
BizzInfo[h][bProducts],BizzInfo[h][bMaxProducts],
ConvertMoney(BizzInfo[h][bPriceProd]));
BizzLabel[h] = CreateDynamic3DTextLabel(FormatPerigoso, COLOR_AZULBB,BizzInfo[h][bMessage], BizzInfo[h][bBuyPrice], BizzInfo[h][bLevelNeeded], BizzInfo[h][bTill], BizzInfo[h][bProducts], BizzInfo[h][bMaxProducts]+0.5,13.0, 0);
//Update3DTextLabelText(BizzLabel[h], COLOR_AZULBB, FormatPerigoso);
}
if(BizzInfo[h][bOwned] == 1)
{
DestroyDynamic3DTextLabel(BizzLabel[h]);
format(FormatPerigoso, sizeof(FormatPerigoso),
"%s\n\
{33CCFF}Dono da Empresa: {FFFFFF}%s\n\
{33CCFF}Extorsгo: {FFFFFF}%s\n\
{33CCFF}Entrada: {33AA33}R$%d\n\
{33CCFF}Nнvel: {FFFFFF}%d\n\
{FFFFFF}Aperte a letra F para entrar\n\
{33CCFF}Fundos: {33AA33}R$%s\n\
{FFFF00}Produtos: {9ACD32}%d/{FFFFFF}%d\n\
{FFFF00}Preзo por produto: {33AA33}R$%s",
BizzInfo[h][bMessage],
BizzInfo[h][bOwner],
BizzInfo[h][bExtortion],
BizzInfo[h][bEntranceCost],
BizzInfo[h][bLevelNeeded],
ConvertMoney(BizzInfo[h][bTill]),
BizzInfo[h][bProducts],BizzInfo[h][bMaxProducts],
ConvertMoney(BizzInfo[h][bPriceProd]));
BizzLabel[h] = CreateDynamic3DTextLabel(FormatPerigoso, COLOR_AZULBB,BizzInfo[h][sbEntranceX], BizzInfo[h][sbEntranceY], BizzInfo[h][sbEntranceZ]+1,20.0,0);
//Update3DTextLabelText(BizzLabel[h], COLOR_AZULBB, FormatPerigoso);
}
}
for(new h = 0; h < sizeof(SBizzInfo); h++)
{
if(SBizzInfo[h][sbOwned] == 0)
{
DestroyDynamic3DTextLabel(BizzLabel[h]);
format(FormatPerigoso, sizeof(FormatPerigoso),
"{FFFFFF}Esta empresa esta a venda\n\
%s\n\
{33CCFF}Preзo da mini empresa: {33AA33}R$%s\n\
{33CCFF}Nнvel: {FFFFFF}%d\n\
{33CCFF}Fundos: {33AA33}R$%s\n\
{FFFF00}Produtos: {9ACD32}%d/{FFFFFF}%d\n\
{FFFF00}Preзo por produto: {33AA33}R$%s\n\
{FFFFFF}Para comprar digite /comprarempresa",
SBizzInfo[h][sbMessage],
ConvertMoney(SBizzInfo[h][sbBuyPrice]),
SBizzInfo[h][sbLevelNeeded],
ConvertMoney(SBizzInfo[h][sbTill]),
SBizzInfo[h][sbProducts],SBizzInfo[h][sbMaxProducts],
ConvertMoney(SBizzInfo[h][sbPriceProd]));
BizzLabel[h] = CreateDynamic3DTextLabel(FormatPerigoso, COLOR_AZULBB,SBizzInfo[h][sbEntranceX], SBizzInfo[h][sbEntranceY], SBizzInfo[h][sbEntranceZ]+1,20.0,0);
//Update3DTextLabelText(SBizzLabel[h], COLOR_AZULBB, FormatPerigoso);
}
if(SBizzInfo[h][sbOwned] == 1)
{
DestroyDynamic3DTextLabel(BizzLabel[h]);
format(FormatPerigoso, sizeof(FormatPerigoso),
"%s\n\
{33CCFF}Dono da empresa: {FFFFFF}%s\n\
{33CCFF}Extorsгo: {FFFFFF}%s\n\
{33CCFF}Entrada: {33AA33}R$%d\n\
{33CCFF}Nнvel: {FFFFFF}%d\n\
{33CCFF}Fundos: {33AA33}%s\n\
{FFFF00}Produtos: {9ACD32}%d/{FFFFFF}%d\n\
{FFFF00}Preзo por produto: {33AA33}R$%s",
SBizzInfo[h][sbMessage],
SBizzInfo[h][sbOwner],
SBizzInfo[h][sbExtortion],
SBizzInfo[h][sbEntranceCost],
SBizzInfo[h][sbLevelNeeded],
ConvertMoney(SBizzInfo[h][sbTill]),
SBizzInfo[h][sbProducts],SBizzInfo[h][sbMaxProducts],
ConvertMoney(SBizzInfo[h][sbPriceProd]));
BizzLabel[h] = CreateDynamic3DTextLabel(FormatPerigoso, COLOR_AZULBB,SBizzInfo[h][sbEntranceX], SBizzInfo[h][sbEntranceY], SBizzInfo[h][sbEntranceZ]+1,20.0,0);
//Update3DTextLabelText(SBizzLabel[h], COLOR_AZULBB, FormatPerigoso);
}
}
for(new h = 0; h < sizeof(FBizzInfo); h++)
{
if(FBizzInfo[h][fbOwned] == 0)
{
DestroyDynamic3DTextLabel(BizzLabel[h]);
format(FormatPerigoso, sizeof(FormatPerigoso),
"%s\n\
{FFFFFF}Esta Fazenda esta a venda\n\
{33CCFF}Valor: {33AA33}R$%s\n\
{33CCFF}Nivel: {FFFFFF}%d\n\
{FFFF00}Produtos: {9ACD32}%d/{FFFFFF}%d\n\
{FFFF00}Preзo por produto: {33AA33}R$%s\n\
{FFFFFF}Para comprar digite /comprarfazenda",
FBizzInfo[h][fbMessage],
ConvertMoney(FBizzInfo[h][fbBuyPrice]),
FBizzInfo[h][fbLevelNeeded],
FBizzInfo[h][fbProducts],FBizzInfo[h][fbMaxProducts],
ConvertMoney(FBizzInfo[h][fbPriceProd]));
BizzLabel[h] = CreateDynamic3DTextLabel(FormatPerigoso, COLOR_AZULBB,FBizzInfo[h][sbEntranceX], FBizzInfo[h][sbEntranceY], FBizzInfo[h][sbEntranceZ]+1,20.0,0);
//Update3DTextLabelText(FBizzLabel[h], COLOR_AZULBB, FormatPerigoso);
}
if(FBizzInfo[h][fbOwned] == 1)
{
DestroyDynamic3DTextLabel(BizzLabel[h]);
format(FormatPerigoso, sizeof(FormatPerigoso),
"%s\n\
{33CCFF}Dono da Fazenda: {FFFFFF}%s\n\
{33CCFF}Extorcao: {FFFFFF}%s\n\
{FFFF00}Produtos: {9ACD32}%d/{FFFFFF}%d\n\
{FFFF00}Preзo por produto: {33AA33}R$%s\n\
{33CCFF}Fundos: {33AA33}R$%s",
FBizzInfo[h][fbMessage],
FBizzInfo[h][fbOwner],
FBizzInfo[h][fbExtortion],
FBizzInfo[h][fbProducts],FBizzInfo[h][fbMaxProducts],
ConvertMoney(FBizzInfo[h][fbPriceProd]),
ConvertMoney(FBizzInfo[h][fbTill]));
BizzLabel[h] = CreateDynamic3DTextLabel(FormatPerigoso, COLOR_AZULBB,FBizzInfo[h][sbEntranceX], FBizzInfo[h][sbEntranceY], FBizzInfo[h][sbEntranceZ]+1,20.0,0);
//Update3DTextLabelText(FBizzLabel[h], COLOR_AZULBB, FormatPerigoso);
}
}
return 0;
}
CMD:comprarempresa(playerid, params[])
{
new Float:oldposx, Float:oldposy, Float:oldposz;
GetPlayerName(playerid, playername, sizeof(playername));
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
if(PlayerInfo[playerid][pVIP] < 1)
{
SendClientMessage(playerid, COLOR_GREY, "Apenas players VIPs podem comprar uma empresa");
return true;
}
if(PlayerInfo[playerid][pPbiskey] != 255)
{
SendClientMessage(playerid, COLOR_GREY, " Vocк ja tem uma empresa, Digite /venderempresa para comprar outra.");
return true;
}
new string[128];
for(new b = 0; b < sizeof(SBizzInfo); b++)
{
if(PlayerToPoint(2.0, playerid, SBizzInfo[b][sbEntranceX], SBizzInfo[b][sbEntranceY], SBizzInfo[b][sbEntranceZ]) && SBizzInfo[b][sbOwned] == 0)
{
if(PlayerInfo[playerid][pLevel] < SBizzInfo[b][sbLevelNeeded])
{
format(string, sizeof(string), "Vocк precisa ser nнvel %d para comprar essa empresa",SBizzInfo[b][sbLevelNeeded]);
SendClientMessage(playerid, COLOR_GRAD5, string);
return true;
}
if(GetPlayerMoney(playerid) > SBizzInfo[b][sbBuyPrice])
{
PlayerInfo[playerid][pPbiskey] = b+100;
SBizzInfo[b][sbOwned] = 1;
SBizzInfo[b][sbLocked] = 0;
SBizzInfo[b][sbTill] = 0;
GetPlayerName(playerid, sendername, sizeof(sendername));
strmid(SBizzInfo[b][sbOwner], sendername, 0, strlen(sendername), 255);
GiveDinheiro(playerid,-SBizzInfo[b][sbBuyPrice]);
PlayerPlayMusic(playerid);
SendClientMessage(playerid, COLOR_WHITE, "Parabens, Vocк comprou uma empresa.");
SendClientMessage(playerid, COLOR_WHITE, "Digite /ajudaemp para ver os comandos de sua empresa.");
Atualizar3Dtexts();
SalvarSEmpresa(b);
DateProp(playerid);
format(string, sizeof(string), "%s comprou a mini empresa ID: %d", PlayerName(playerid), b);
BPSLogs("sempresas", string);
return true;
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo tem grana suficiente");
return true;
}
}
}
for(new b = 0; b < sizeof(BizzInfo); b++)
{
if(PlayerToPoint(2.0, playerid, BizzInfo[b][bEntranceX], BizzInfo[b][bEntranceY], BizzInfo[b][bEntranceZ]) && BizzInfo[b][bOwned] == 0)
{
if(PlayerInfo[playerid][pLevel] < BizzInfo[b][bLevelNeeded])
{
format(string, sizeof(string), "Vocк precisa ser nнvel %d para comprar essa empresa",BizzInfo[b][bLevelNeeded]);
SendClientMessage(playerid, COLOR_GRAD5, string);
return true;
}
if(GetPlayerMoney(playerid) > BizzInfo[b][bBuyPrice])
{
PlayerInfo[playerid][pPbiskey] = b;
BizzInfo[b][bOwned] = 1;
BizzInfo[b][bLocked] = 0;
BizzInfo[b][bTill] = 0;
GetPlayerName(playerid, sendername, sizeof(sendername));
strmid(BizzInfo[b][bOwner], sendername, 0, strlen(sendername), 255);
GiveDinheiro(playerid,-BizzInfo[b][bBuyPrice]);
PlayerPlayMusic(playerid);
SetPlayerInterior(playerid,BizzInfo[b][bInterior]);
SetPlayerVirtualWorld(playerid, BizzInfo[b][bWorld]);
PlayerInfo[playerid][pInt] = BizzInfo[b][bInterior];
SetPlayerPos(playerid,BizzInfo[b][bExitX],BizzInfo[b][bExitY],BizzInfo[b][bExitZ]);
GameTextForPlayer(playerid, "~w~Bem Vindo~n~Voce pode sair da sua empresa digitando /sair", 5000, 3);
PlayerInfo[playerid][pInt] = BizzInfo[b][bInterior];
PlayerInfo[playerid][pLocal] = b ;
SendClientMessage(playerid, COLOR_WHITE, "Parabens, Vocк comprou esta empresa.");
SendClientMessage(playerid, COLOR_WHITE, "Digite /ajudaemp para ver os comandos de sua empresa.");
//Atualizar3Dtexts();
//SalvarEmpresa(b);
//DateProp(playerid);
format(string, sizeof(string), "%s comprou a empresa ID: %d", PlayerName(playerid), b);
BPSLogs("empresas", string);
DateProp(playerid);
Atualizar3Dtexts();
SalvarEmpresa(b);
return true;
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Vocк nao tem grana o suficiente");
return true;
}
}
}
return true;
}
CMD:comprarempresa(playerid, params[])
{
new Float:oldposx, Float:oldposy, Float:oldposz;
GetPlayerName(playerid, playername, sizeof(playername));
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
if(PlayerInfo[playerid][pVIP] < 1)
{
SendClientMessage(playerid, COLOR_GREY, "Apenas players VIPs podem comprar uma empresa");
return true;
}
if(PlayerInfo[playerid][pPbiskey] != 255)
{
SendClientMessage(playerid, COLOR_GREY, " Vocк ja tem uma empresa, Digite /venderempresa para comprar outra.");
return true;
}
new string[128];
for(new b = 0; b < sizeof(SBizzInfo); b++)
{
if(PlayerToPoint(2.0, playerid, SBizzInfo[b][sbEntranceX], SBizzInfo[b][sbEntranceY], SBizzInfo[b][sbEntranceZ]) && SBizzInfo[b][sbOwned] == 0)
{
if(PlayerInfo[playerid][pLevel] < SBizzInfo[b][sbLevelNeeded])
{
format(string, sizeof(string), "Vocк precisa ser nнvel %d para comprar essa empresa",SBizzInfo[b][sbLevelNeeded]);
SendClientMessage(playerid, COLOR_GRAD5, string);
return true;
}
if(GetPlayerMoney(playerid) > SBizzInfo[b][sbBuyPrice])
{
PlayerInfo[playerid][pPbiskey] = b+100;
SBizzInfo[b][sbOwned] = 1;
SBizzInfo[b][sbLocked] = 0;
SBizzInfo[b][sbTill] = 0;
GetPlayerName(playerid, sendername, sizeof(sendername));
strmid(SBizzInfo[b][sbOwner], sendername, 0, strlen(sendername), 255);
GiveDinheiro(playerid,-SBizzInfo[b][sbBuyPrice]);
PlayerPlayMusic(playerid);
SendClientMessage(playerid, COLOR_WHITE, "Parabens, Vocк comprou uma empresa.");
SendClientMessage(playerid, COLOR_WHITE, "Digite /ajudaemp para ver os comandos de sua empresa.");
Atualizar3Dtexts();
SalvarSEmpresa(b);
DateProp(playerid);
format(string, sizeof(string), "%s comprou a mini empresa ID: %d", PlayerName(playerid), b);
BPSLogs("sempresas", string);
return true;
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo tem grana suficiente");
return true;
}
}
}
for(new b = 0; b < sizeof(BizzInfo); b++)
{
if(PlayerToPoint(2.0, playerid, BizzInfo[b][bEntranceX], BizzInfo[b][bEntranceY], BizzInfo[b][bEntranceZ]) && BizzInfo[b][bOwned] == 0)
{
if(PlayerInfo[playerid][pLevel] < BizzInfo[b][bLevelNeeded])
{
format(string, sizeof(string), "Vocк precisa ser nнvel %d para comprar essa empresa",BizzInfo[b][bLevelNeeded]);
SendClientMessage(playerid, COLOR_GRAD5, string);
return true;
}
if(GetPlayerMoney(playerid) > BizzInfo[b][bBuyPrice])
{
PlayerInfo[playerid][pPbiskey] = b;
BizzInfo[b][bOwned] = 1;
BizzInfo[b][bLocked] = 0;
BizzInfo[b][bTill] = 0;
GetPlayerName(playerid, sendername, sizeof(sendername));
strmid(BizzInfo[b][bOwner], sendername, 0, strlen(sendername), 255);
GiveDinheiro(playerid,-BizzInfo[b][bBuyPrice]);
PlayerPlayMusic(playerid);
SetPlayerInterior(playerid,BizzInfo[b][bInterior]);
SetPlayerVirtualWorld(playerid, BizzInfo[b][bWorld]);
PlayerInfo[playerid][pInt] = BizzInfo[b][bInterior];
SetPlayerPos(playerid,BizzInfo[b][bExitX],BizzInfo[b][bExitY],BizzInfo[b][bExitZ]);
GameTextForPlayer(playerid, "~w~Bem Vindo~n~Voce pode sair da sua empresa digitando /sair", 5000, 3);
PlayerInfo[playerid][pInt] = BizzInfo[b][bInterior];
PlayerInfo[playerid][pLocal] = b ;
SendClientMessage(playerid, COLOR_WHITE, "Parabens, Vocк comprou esta empresa.");
SendClientMessage(playerid, COLOR_WHITE, "Digite /ajudaemp para ver os comandos de sua empresa.");
Atualizar3Dtexts();
SalvarEmpresa(b);
DateProp(playerid);
format(string, sizeof(string), "%s comprou a empresa ID: %d", PlayerName(playerid), b);
BPSLogs("empresas", string);
return true;
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Vocк nao tem grana o suficiente");
return true;
}
}
}
return true;
}