[Ajuda] Criar empresa bugado
#1

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)
Reply
#2

teria como enviar o codigo do dialog, porque sem codigo algum nao poderemos ajudar.
Reply
#3

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;
}
Reply
#4

Falta de scriptfiles .
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)