Bug help!
#1

Hello guy's

I have a problem with my PPC_Trucking GM, the problem is that the business /enter command isn't work and I think its bugged because it used to work, now it has stopped work. I don't if I should post the enter script or whatever but if Im to post script please reply and help me!

You will be reward with
  • V.I.P
  • Level 3- Admin
  • I will pay you with paypal 10 dollars or pounds
Please help me fix the bug!, Thank you NPG.
Reply
#2

At least post the Enter command.
Reply
#3

Quote:
Originally Posted by Vanter
Посмотреть сообщение
At least post the Enter command.
// This command lets the player enter the house/business if he's the owner
COMMAND:enter(playerid, params[])
{
// Setup local variables
new HouseID, hLevel, BusID, BusType;

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

// Check if the player has logged in
if (APlayerData[playerid][LoggedIn] == true)
{
// Make sure the player isn't inside a vehicle
if (GetPlayerVehicleID(playerid) == 0)
{
// Loop through all houses
for (HouseID = 1; HouseID < MAX_HOUSES; HouseID++)
{
// Check if this house exists
if (AHouseData[HouseID][PickupID] != 0)
{
// Check if the player is in range of the house-pickup
if (IsPlayerInRangeOfPoint(playerid, 2.5, AHouseData[HouseID][HouseX], AHouseData[HouseID][HouseY], AHouseData[HouseID][HouseZ]))
{
// Check if the house is closed to the public
if (AHouseData[HouseID][HouseOpened] == false)
{
// The house isn't open to the public, so keep anyone out who isn't the owner of the house
if (House_PlayerIsOwner(playerid, HouseID) == 0)
{
// Let the player know that this house isn't open to the public and he can't enter it
SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}This house isn't open to the public, you can't enter it");
return 1;
}
}

// The house is open to the public, or the player trying to enter is the owner, so let the player inside the house

// Get the level of the house
hLevel = AHouseData[HouseID][HouseLevel];
// Set the worldid so other players cannot see him anymore
SetPlayerVirtualWorld(playerid, 5000 + HouseID);
// Set the player inside the interior of the house
SetPlayerInterior(playerid, AHouseInteriors[hLevel][InteriorID]);
// Set the position of the player at the spawn-location of the house's interior
SetPlayerPos(playerid, AHouseInteriors[hLevel][IntX], AHouseInteriors[hLevel][IntY], AHouseInteriors[hLevel][IntZ]);
// Also set a tracking-variable to enable /housemenu to track in which house the player is
APlayerData[playerid][CurrentHouse] = HouseID;
// Also let the player know he can use /housemenu to upgrade/exit his house
SendClientMessage(playerid, 0xFFFFFFFF, "{00FF00}Use {FFFF00}/housemenu{00FF00} to change options for your house");

// Exit the function
return 1;
}
}
}

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

// Check if the player has owned 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, 1000 + playerid);
// 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 upgrade/exit his business
SendClientMessage(playerid, 0xFFFFFFFF, "{00FF00}Use {FFFF00}/busmenu{00FF00} to change options for your business");

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

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

Ohai, I suggest to upload you're code at http://pastebin.com/.
Reply
#5

Quote:
Originally Posted by Matnix
Посмотреть сообщение
Ohai, I suggest to upload you're code at http://pastebin.com/.
Oh my bad, can you help though?
Reply
#6

Please...?
Reply
#7

Just post your script code as [pawn] tag
Reply
#8

Ok can you jst help me
Reply
#9

Forum Rules


Provide Details - If you do not get help, please re-evaluate the explanation of the issue you provided, it may not be providing enough information for people to help you.

Provide Code - People are not psychic, if there's an issue in your code they need to see that code. If you are worried about people stealing it, don't be - its nothing special! If you are unwilling to provide code and want help in private, post here and be prepared to wait a long time and pay a lot of money.

Don't Post Huge Scripts - If you have more than a few lines of code (or logs, or anything not prose), do not put it in your post directly, use pastebin.com instead.

Include All Source Code - Scripts or other programmed things released on these forums MUST include ALL source. If you do not wish to include the source code that is your right, and you are free to release binary-only versions elsewhere, this is only a condition for releasing programs here.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)