30.03.2016, 14:54
Is this really bug from PPC_House Filterscript? let me explain the problem.
1. I don't know why, when player login, the another offline player car house is spawned. I didn't change the settings auto spawn all car house when the FS loaded.
2. Sometimes another house player, is added in another dialog house menu player.
Look at the picture
3. Sometimes another car house player, its deleted by it self.
4. I didn't edit this FS to much, i just added some feature like give house to other player, first time its work and theres no problem. But when i'm increase the max slot house to 1000 House, this problem its comming. And i didn't edit anything in OnPlayerConnect system in this FS.
I hope someone can help me here. Rep + for anyone who can help me. Sorry for my bad English.
1. I don't know why, when player login, the another offline player car house is spawned. I didn't change the settings auto spawn all car house when the FS loaded.
PHP код:
// Setting this to "true" will load all vehicles assigned to houses when the filterscript loads
// Setting this to "false" will load the vehicles assigned to a house when the house-owner logs in (they'll also disappear when he logs out)
// Recommended setting for popular servers (with alot of players): "false"
// In popular servers, the amount of cars could go over the samp-limit (2000), bugging everything when all cars stay loaded
// even when the owner of the vehicle is offline
new bool:LoadCarsDuringFSInit = false;
Look at the picture
3. Sometimes another car house player, its deleted by it self.
4. I didn't edit this FS to much, i just added some feature like give house to other player, first time its work and theres no problem. But when i'm increase the max slot house to 1000 House, this problem its comming. And i didn't edit anything in OnPlayerConnect system in this FS.
PHP код:
// This callback gets called when a player connects to the server
public OnPlayerConnect(playerid)
{
// Setup local variables
new HouseID, HouseSlot, Name[MAX_PLAYER_NAME];
// Get the player's name
GetPlayerName(playerid, Name, sizeof(Name));
// Loop through all houses to find the ones which belong to this player
for (HouseID = 1; HouseID < MAX_HOUSES; HouseID++)
{
// Check if the house exists
if (IsValidDynamicPickup(AHouseData[HouseID][PickupID]))
{
// Check if the house is owned
if (AHouseData[HouseID][Owned] == true)
{
// Check if the player is the owner of the house
if (strcmp(AHouseData[HouseID][Owner], Name, false) == 0)
{
// Add the HouseID to the player's account for faster reference later on
APlayerData[playerid][Houses][HouseSlot] = HouseID;
// Load housecars if they weren't loaded at FilterscriptInit
if (LoadCarsDuringFSInit == false)
HouseFile_LoadCars(HouseID);
// Select the next HouseSlot
HouseSlot++;
}
}
}
}
return 1;
}