Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- COMMAND:enter(playerid, params[])
- {
- new BusID, BusType;
- if (GetPlayerVehicleSeat(playerid) == -1)
- {
- for (new BusSlot; BusSlot < MAX_BUSINESSPERPLAYER; BusSlot++)
- {
- BusID = APlayerData[playerid][Business][BusSlot];
- if (BusID != 0)
- {
- if (IsPlayerInRangeOfPoint(playerid, 2.5, ABusinessData[BusID][BusinessX], ABusinessData[BusID][BusinessY], ABusinessData[BusID][BusinessZ]))
- {
- 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}pouzij /busmenu pro nastaveni");
- }
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment