Small query not working as its supposed to
#3

Sorry, I only posted a snippet of the code to save space, I'll post the full code instead.

Код:
COMMAND:busmenu(playerid, params[])
{
	// Setup local variables
	new OptionsList[200], DialogTitle[200], BusID;

	// Check if the player has logged in
	if (APlayerData[playerid][LoggedIn] == true)
	{
	    BusID = APlayerData[playerid][CurrentBusiness];
	    if(ABusinessData[BusID][Owner] == APlayerData[playerid][PlayerName])
	    {
			// Check if the player is inside a business
			if (BusID != 0)
			{
				format(DialogTitle, sizeof(DialogTitle), "Select option for %s", ABusinessData[APlayerData[playerid][CurrentBusiness]][BusinessName]);
				format(OptionsList, sizeof(OptionsList), "%sChange business-name\n", OptionsList);
				format(OptionsList, sizeof(OptionsList), "%sUpgrade business\n", OptionsList);
				format(OptionsList, sizeof(OptionsList), "%sRetrieve business earnings\n", OptionsList);
				format(OptionsList, sizeof(OptionsList), "%sSell business\n", OptionsList);
				format(OptionsList, sizeof(OptionsList), "%sExit business\n", OptionsList);
				// Show the businessmenu
				ShowPlayerDialog(playerid, DialogBusinessMenu, DIALOG_STYLE_LIST, DialogTitle, OptionsList, "Select", "Cancel");
			}
			else
			{
				SendClientMessage(playerid, 0xFF0000FF, "You're not inside a business");
			}
		}
		else
		{
			return 0;
		}
	}
	else
	{
	    return 0;
	}

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


Messages In This Thread
Small query not working as its supposed to - by Stevee - 12.06.2012, 18:28
Re: Small query not working as its supposed to - by iggy1 - 12.06.2012, 18:30
Re: Small query not working as its supposed to - by Stevee - 12.06.2012, 18:33
Re: Small query not working as its supposed to - by iggy1 - 12.06.2012, 18:34
Re: Small query not working as its supposed to - by Stevee - 12.06.2012, 18:37
Re: Small query not working as its supposed to - by Stevee - 12.06.2012, 19:01
Re: Small query not working as its supposed to - by iggy1 - 12.06.2012, 19:21
Re: Small query not working as its supposed to - by Stevee - 12.06.2012, 19:29

Forum Jump:


Users browsing this thread: 3 Guest(s)