need help other players cant get in business...
#1

there is command /enter to enter the business and just the owner of the biz can enter other players cant ...
i wanted to change it for all players to get in the businnes ... can anyone help me with this?

here is the cmd to Enter to business
pawn Код:
// This command lets the player enter the house/business if he's the owner
COMMAND:enter(playerid, params[])
{
    // If a player hasn't logged in properly, he cannot use this command
    if (INT_IsPlayerLoggedIn(playerid) == 0) return 0;

    // Setup local variables
    new BusID, BusType;

    // Make sure the player isn't inside a vehicle
    if (GetPlayerVehicleSeat(playerid) == -1)
    {
        // Loop through all player-owned businesses
        for (new BusSlot; BusSlot < MAX_BUSINESSPERPLAYER; BusSlot++)
        {
            // Get the business-id at the selected slot from the player
            BusID = APlayerData[playerid][Business][BusSlot];

            // Check if the player has a business in this slot
            if (BusID != 0)
            {
                // Check if the player is in range of the business-pickup
                if (IsPlayerInRangeOfPoint(playerid, 2.5, ABusinessData[BusID][BusinessX], ABusinessData[BusID][BusinessY], ABusinessData[BusID][BusinessZ]))
                {
                    // Get the business-type
                    BusType = ABusinessData[BusID][BusinessType];

                    // Set the worldid so other players cannot see him anymore
                    SetPlayerVirtualWorld(playerid, 2000 + BusID);
                    // Set the player inside the interior of the business
                    SetPlayerInterior(playerid, ABusinessInteriors[BusType][InteriorID]);
                    // Set the position of the player at the spawn-location of the business's interior
                    SetPlayerPos(playerid, ABusinessInteriors[BusType][IntX], ABusinessInteriors[BusType][IntY], ABusinessInteriors[BusType][IntZ]);

                    // Also set a tracking-variable to enable /busmenu to track in which business the player is
                    APlayerData[playerid][CurrentBusiness] = BusID;
                    // Also let the player know he can use /busmenu to control his business
                    SendClientMessage(playerid, 0xFFFFFFFF, "{00FF00}Use {FFFF00}/busmenu{00FF00} to change options for your business");

                    // Exit the function
                    return 1;
                }
            }
        }
    }

    // If no business was in range, allow other scripts to use the same command (like the housing-script)
    return 0;
}
Reply
#2

There is nothing in this code, that forbids players to enter into business. Show us /enter command
Reply
#3

It might be because you set like
pawn Код:
if(bInfo[Player[playerid][OwnedBusiness] == business)
and then they will be able to see it. Do not make it like that.
Reply
#4

pawn Код:
// This command lets the player enter the house/business if he's the owner
COMMAND:enter(playerid, params[])
{
    // If a player hasn't logged in properly, he cannot use this command
    if (INT_IsPlayerLoggedIn(playerid) == 0) return 0;

    // Setup local variables
    new BusID, BusType;

    // Make sure the player isn't inside a vehicle
    if (GetPlayerVehicleSeat(playerid) == -1)
    {
        // Loop through all player-owned businesses
        for (new BusSlot; BusSlot < MAX_BUSINESSPERPLAYER; BusSlot++)
        {
            // Get the business-id at the selected slot from the player
            BusID = APlayerData[playerid][Business][BusSlot];

            // Check if the player has a business in this slot
            if (BusID != 0)
            {
                // Check if the player is in range of the business-pickup
                if (IsPlayerInRangeOfPoint(playerid, 2.5, ABusinessData[BusID][BusinessX], ABusinessData[BusID][BusinessY], ABusinessData[BusID][BusinessZ]))
                {
                    // Get the business-type
                    BusType = ABusinessData[BusID][BusinessType];

                    // Set the worldid so other players cannot see him anymore
                    SetPlayerVirtualWorld(playerid, 2000 + BusID);
                    // Set the player inside the interior of the business
                    SetPlayerInterior(playerid, ABusinessInteriors[BusType][InteriorID]);
                    // Set the position of the player at the spawn-location of the business's interior
                    SetPlayerPos(playerid, ABusinessInteriors[BusType][IntX], ABusinessInteriors[BusType][IntY], ABusinessInteriors[BusType][IntZ]);

                    // Also set a tracking-variable to enable /busmenu to track in which business the player is
                    APlayerData[playerid][CurrentBusiness] = BusID;
                    // Also let the player know he can use /busmenu to control his business
                    SendClientMessage(playerid, 0xFFFFFFFF, "{00FF00}Use {FFFF00}/busmenu{00FF00} to change options for your business");

                    // Exit the function
                    return 1;
                }
            }
        }
    }

    // If no business was in range, allow other scripts to use the same command (like the housing-script)
    return 0;
}
here is the cmd /enter
how i can do it and for other players to enter not just the owner
Reply
#5

That's not brining any sence.. There is nothing that causes your problem in the codes you provide us.
Reply
#6

can anyone make it that all players can get in store??
..
Reply
#7

pawn Код:
// Loop through all player-owned businesses
        for (new BusSlot; BusSlot < MAX_BUSINESSPERPLAYER; BusSlot++)
        {
            // Get the business-id at the selected slot from the player
            BusID = APlayerData[playerid][Business][BusSlot];

            // Check if the player has a business in this slot
            if (BusID != 0)
            {
I think this is it, correct me if I'm wrong. If a player does not have a BizSlot, wouldn't it prevent them from entering?
Reply
#8

anyone will help pls
Reply
#9

bump
can anyone make a command that other players can get in biz??
Reply
#10

bump ...
anyone??
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)