[Pedido] Mostrar quem carrego/descarrego em um comboio
#1

Olб, queria pedir para melhorar esse comando e fazer com que mostre, que trailer estб atrelado ao caminhгo dele e se ele jб carrego uma entrega, ou se jб descarrego.

Код:
COMMAND:comboiomembros(playerid, params[])
{
	// Setup local variables
	new Name[24], MemberList[1000], Convoy;

	// Send the command to all admins so they can see it
	SendAdminText(playerid, "/comboiomembros", params);

	// Check if the player has logged in
	if (APlayerData[playerid][LoggedIn] == true)
	{
		// Check if the member is in a convoy
		if (APlayerData[playerid][InConvoy] == true)
		{
			// Get the convoyID of the member
			Convoy = APlayerData[playerid][ConvoyID];

			// Loop through all members
			for (new i; i < CONVOY_MAX_MEMBERS; i++)
			{
			    if (AConvoys[Convoy][Members][i] != -1) // Check if this member-spot is occupied
				{
					// Get the name of the member
					GetPlayerName(AConvoys[Convoy][Members][i], Name, sizeof(Name));
					// Add the membernames to the list
					format(MemberList, 1000, "%s%s\n", MemberList, Name);
				}
			}

			// Show the dialog
			ShowPlayerDialog(playerid, DialogConvoyMembers, DIALOG_STYLE_LIST, "Membros do comboio", MemberList, "OK", "Cancelar");
		}
		else
		    SendClientMessage(playerid, -1, "{ff0000}Vocк nгo й um mmembro de um comboio.");
	}
	else
	    return 0;

	// Let the server know that this was a valid command
	return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)