Anyone can help? PPC-Parkrange
#1

Hey guys,
I would like to change the park range and the Max house per player but it doesnt work.
Here is what i did.
opens the .inc with pawno.(administrator)
Than i scroll down and changes from
Код:
#define MAX_HOUSESPERPLAYER			2 // Defines the maximum number of houses that any player can own
To
Код:
#define MAX_HOUSESPERPLAYER			3 // Defines the maximum number of houses that any player can own
Than i changed from
Код:
#define ParkRange                   150.0 // Defines the range for parking the vehicle around the house (default = 150m)
to
Код:
#define ParkRange                   156895.0 // Defines the range for parking the vehicle around the house (default = 150m)
Than i clicked on compile than and get this message:
Код:
C:\Users\WGSoshiPacoIU\Desktop\Trucking\pawno\include\PPC_ServerSettings.inc(86) : warning 203: symbol is never used: "APoliceWeapons"
C:\Users\WGSoshiPacoIU\Desktop\Trucking\pawno\include\PPC_ServerSettings.inc(86) : warning 203: symbol is never used: "BankIntrest"
C:\Users\WGSoshiPacoIU\Desktop\Trucking\pawno\include\PPC_ServerSettings.inc(86) : warning 203: symbol is never used: "CourierJobRange"
C:\Users\WGSoshiPacoIU\Desktop\Trucking\pawno\include\PPC_ServerSettings.inc(86) : warning 203: symbol is never used: "DefaultFinePerStar"
C:\Users\WGSoshiPacoIU\Desktop\Trucking\pawno\include\PPC_ServerSettings.inc(86) : warning 203: symbol is never used: "DefaultJailTime"
C:\Users\WGSoshiPacoIU\Desktop\Trucking\pawno\include\PPC_ServerSettings.inc(86) : warning 203: symbol is never used: "DefaultWarnTimeBeforeJail"
C:\Users\WGSoshiPacoIU\Desktop\Trucking\pawno\include\PPC_ServerSettings.inc(86) : warning 203: symbol is never used: "ExitBusinessTimer"
C:\Users\WGSoshiPacoIU\Desktop\Trucking\pawno\include\PPC_ServerSettings.inc(86) : warning 203: symbol is never used: "ExitHouseTimer"
C:\Users\WGSoshiPacoIU\Desktop\Trucking\pawno\include\PPC_ServerSettings.inc(86) : warning 203: symbol is never used: "IntrestEnabled"
C:\Users\WGSoshiPacoIU\Desktop\Trucking\pawno\include\PPC_ServerSettings.inc(86) : warning 203: symbol is never used: "MaxFuel"
C:\Users\WGSoshiPacoIU\Desktop\Trucking\pawno\include\PPC_ServerSettings.inc(86) : warning 203: symbol is never used: "PaymentPerPackage"
C:\Users\WGSoshiPacoIU\Desktop\Trucking\pawno\include\PPC_ServerSettings.inc(86) : warning 203: symbol is never used: "PoliceGetsWeapons"
C:\Users\WGSoshiPacoIU\Desktop\Trucking\pawno\include\PPC_ServerSettings.inc(86) : warning 203: symbol is never used: "PoliceWeaponsAmmo"
C:\Users\WGSoshiPacoIU\Desktop\Trucking\pawno\include\PPC_ServerSettings.inc(86) : warning 203: symbol is never used: "RefuelMaxPrice"
C:\Users\WGSoshiPacoIU\Desktop\Trucking\pawno\include\PPC_ServerSettings.inc(86) : warning 203: symbol is never used: "ShowBoughtHouses"
C:\Users\WGSoshiPacoIU\Desktop\Trucking\pawno\include\PPC_ServerSettings.inc(86) : warning 203: symbol is never used: "UnclampPricePerVehicle"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
Than closed it. after that i did the samp-server.exe
When i logged in i tried to park the just like a bit away it saids

I tried everything but didnt work.
Can anyone help me? this is the .inc of PPC-Trucking link can be found here
https://sampforum.blast.hk/showthread.php?tid=196493
Here is the code of PPC_serversetting.inc
Код:
//************************************************************************************************************************************
// You may edit these values if you like
//************************************************************************************************************************************

// Default max number of players is set to 500, re-define it to 50
#include <a_samp>
#undef MAX_PLAYERS
#define MAX_PLAYERS 50

// Bank system
new bool:IntrestEnabled = true; // The intrest has been enabled (or disabled when false)
new Float:BankIntrest = 0.001; // The intrest a player receives every hour is by default 0.1% (0.001 means 0.1%)
								// Setting this to 1.0 would mean 100%, that would double the player's bank account every hour)

// Set timer-delay for exiting houses (this timer freezes a player when he exits a house, this allows the game to load the environment
// before the player starts to fall, also the player's vehicles assigned to the house he exits from, are respawned by this timer)
new ExitHouseTimer = 1000;
new ExitBusinessTimer = 1000;

// This allows you to toggle the red houses on the map (bought houses appear on the map as red house icons when this is set to "true")
new bool:ShowBoughtHouses = false;

// Define maximum fuel amount (default: 5000) and maximum price for a complete refuel (default: 1000)
// Changing MaxFuel changes how fast a vehicle will run without fuel
//      (setting it to 2500 for example, let's vehicles run out of fuel twice as fast)
// RefuelMaxPrice is the price you pay for a total refuel (when the vehicle has no more fuel), the price to pay is calculated
//      by the amount of fuel to refuel (pay 50% of RefuelMaxPrice when vehicle has half a fuel-tank left)
new MaxFuel = 5000;
new RefuelMaxPrice = 1000;

// Define housing parameters
#define MAX_HOUSES					2000 // Defines the maximum number of houses that can be created
#define MAX_HOUSESPERPLAYER			3 // Defines the maximum number of houses that any player can own
#define HouseUpgradePercent         100 // Defines the percentage for upgrading a house (house of 10m can be upgraded for 5m when set to 50)
#define ParkRange                   156895.0 // Defines the range for parking the vehicle around the house (default = 150m)

// Define business parameters
#define MAX_BUSINESS                1000 // Defines the maximum number of businesses that can be created
#define MAX_BUSINESSPERPLAYER		2 // Defines the maximum number of businesses that any player can own

// Defines for the toll-system
#define MAX_TOLLGATES				20

// Defines for spikestrips
#define MAX_SPIKESTRIPS             10 // Defines a maximum of 10 spikestrips

// Defines for the speedcameras
#define MAX_CAMERAS					100

// Defines for police
new bool:PoliceGetsWeapons = false;
// These are the weapons that a police player will get when "PoliceGetsWeapons = true"
// 5 = Baseball Bat
// 24 = Desert Eagle
// 25 = Shotgun
// 28 = Micro SMG
// 30 = AK-47
// 34 = Sniper Rifle
// 38 = Minigun
// 39 = Satchel Charge
// 41 = Spraycan
// 10 = Purple Dildo
// 46 = Parachute
// 40 = Detonator
new APoliceWeapons[12] = {5, 24, 25, 28, 30, 34, 38, 39, 41, 10, 46, 40};
new PoliceWeaponsAmmo = 5000;



// Jailing system variables
new DefaultJailTime = 120; // Set default jailtime to 2 minutes
new DefaultFinePerStar = 5000; // Set the fine for each wanted level (star)
new DefaultWarnTimeBeforeJail = 60; // Allow the wanted player 60 seconds to pull over (always set this value to multiples of 5: 5, 10, 15, 20, ...)



// Courier variables
new Float:CourierJobRange = 1000.0;
new PaymentPerPackage = 500;



// Unclamp price per vehicle
new UnclampPricePerVehicle = 20000;
I also found the command of /park
Код:
// This command checks if the player is inside a vehicle that he owns and if he's in range of the house where the vehicle is assigned to
COMMAND:park(playerid, params[])
{
	// Setup local variables
	new Float:x, Float:y, Float:z, Float:rot, vid, HouseID, Msg[128];
	new engine,lights,alarm,doors,bonnet,boot,objective;

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

	// Check if the player has logged in
	if (APlayerData[playerid][LoggedIn] == true)
	{
		// Check if the player is inside a vehicle (he must be the driver)
		if (GetPlayerVehicleSeat(playerid) == 0)
		{
			// Get the vehicle-id
			vid = GetPlayerVehicleID(playerid);
			// Get the HouseID to which this vehicle belongs
			HouseID = AVehicleData[vid][BelongsToHouse];

			// Check if the vehicle is owned (owner-check is not really required, as another player would get kicked out very fast)
			// AND it must belong to a house that the player owns
			if ((AVehicleData[vid][Owned] == true) && (HouseID != 0))
			{
				// Check if the vehicle is in range of the house-entrance (you cannot park a vehicle further away from your house than 150m)
				if (IsPlayerInRangeOfPoint(playerid, ParkRange, AHouseData[HouseID][HouseX], AHouseData[HouseID][HouseY], AHouseData[HouseID][HouseZ]))
				{
					// Get the player's position and angle
					GetVehiclePos(vid, x, y, z);
					GetVehicleZAngle(vid, rot);
					// Save those values for the vehicle
					AVehicleData[vid][SpawnX] = x;
					AVehicleData[vid][SpawnY] = y;
					AVehicleData[vid][SpawnZ] = z;
					AVehicleData[vid][SpawnRot] = rot;

					// Find the vehicle in the player's houses
					for (new i; i < MAX_HOUSESPERPLAYER; i++)
					{
						// Get the HouseID of the current house
					    HouseID = APlayerData[playerid][Houses][i];

						// Loop through all carslots of this house to find the vehicle-id
						for (new CarSlot; CarSlot < 10; CarSlot++)
						{
							// Check if this carslot holds the same vehicle-id
						    if (AHouseData[HouseID][VehicleIDs][CarSlot] == vid)
						    {
			                    House_ReplaceVehicle(HouseID, CarSlot); // Re-create the vehicle at the same spot the player wants to park his vehicle
			                    PutPlayerInVehicle(playerid, AHouseData[HouseID][VehicleIDs][CarSlot], 0);
								// Turn on the engine
								GetVehicleParamsEx(AHouseData[HouseID][VehicleIDs][CarSlot], engine, lights, alarm, doors, bonnet, boot, objective);
								SetVehicleParamsEx(AHouseData[HouseID][VehicleIDs][CarSlot], 1, lights, alarm, doors, bonnet, boot, objective);
			                    break; // Stop the for-loop
							}
						}
					}

					// Let the player know he parked his vehicle
					SendClientMessage(playerid, 0x00FF00FF, "You've parked your vehicle");

					// Save the player-file (and his houses)
					PlayerFile_Save(playerid);
				}
				else
				{
				    format(Msg, 128, "{FF0000}You need to be within %im of your house to park this vehicle", ParkRange);
				    SendClientMessage(playerid, 0xFFFFFFFF, Msg);
				}
			}
			else
			    SendClientMessage(playerid, 0xFF0000FF, "You cannot park a vehicle that's not owned by you");
		}
		else
		    SendClientMessage(playerid, 0xFF0000FF, "You must be driving a vehicle you own to park it");
	}
	else
	    return 0;

	// Let the server know that this was a valid command
	return 1;
}
I hope you guys can help me i tried to explain the problem as good as i can
Reply
#2

Simple Add me on skype for help
Skype : SampDeTix
Reply
#3

No idea where, but your probably missing a '}' (bracket) somewhere
Reply
#4

@DeTix don't put your skype's date on posts, at least send him a PM
@se7enevolution use the "new" like
new APoliceWeapons;
new BankInterest;
and if it's a sscanf (like strings, names,) use the appropriates callbacks
Reply
#5

try compile the gamemode first
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)