[Ajuda] Criar empresa bugado - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Criar empresa bugado (
/showthread.php?tid=665471)
Criar empresa bugado -
ROBSONSOARES - 05.04.2019
Galera eu to modificando um gm aki, soh que quando eu dou /criarempresa , o samp-server fecha, ja verifiquei tudo e nгo to conseguindo achar o problema , se alguйm puder ajudar eu agradeзo.
OBS: QUANDO EU DIGITO O COMANDO APARECE O DIALOG, E QUANDO EU SELECIONO UMA EMPRESA DA LISTA FECHA O (SAMP-SERVER)
Re: Criar empresa bugado -
Feconito - 05.04.2019
teria como enviar o codigo do dialog, porque sem codigo algum nao poderemos ajudar.
Re: Criar empresa bugado -
ROBSONSOARES - 05.04.2019
Code:
Dialog_CreateBusSelType(playerid, response, listitem)
{
// Just close the dialog if the player clicked "Cancel"
if(!response) return 1;
// Setup some local variables
new BusType, BusID, Float:x, Float:y, Float:z, Msg[128], bool:EmptySlotFound = false;
// Get the player's position
GetPlayerPos(playerid, x, y, z);
// Get the business-type from the option the player chose
BusType = listitem + 1;
// Find a free business-id
for (BusID = 1; BusID < MAX_BUSINESS; BusID++)
{
// Check if this business ID is free
if (ABusinessData[BusID][BusinessType] == 0)
{
EmptySlotFound = true;
break; // Stop processing
}
}
// Check if an empty slot has been found
if (EmptySlotFound == false)
{
// If no empty slot was found, let the player know about it and exit the function
SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Numero mбximo de empresas atingido");
return 1;
}
// Set some default data at the index of NextFreeBusinessID (NextFreeBusinessID will point to the next free business-index)
ABusinessData[BusID][BusinessX] = x;
ABusinessData[BusID][BusinessY] = y;
ABusinessData[BusID][BusinessZ] = z;
ABusinessData[BusID][BusinessType] = BusType;
ABusinessData[BusID][BusinessLevel] = 1;
ABusinessData[BusID][Owned] = false;
// Add the pickup and 3DText at the location of the business-entrance (where the player is standing when he creates the business)
Business_CreateEntrance(BusID);
// Save the business
BusinessFile_Save(BusID);
// Inform the player that he created a new house
format(Msg, 128, "{FFFFFF}Empresa criada com sucesso. ID: {ffffff}%i{FF0000}.", BusID);
SendClientMessage(playerid, 0xFFFFFFFF, Msg);
return 1;
}
Re: Criar empresa bugado -
Don_Speed - 05.04.2019
Falta de scriptfiles .