SA-MP Forums Archive
Help house - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help house (/showthread.php?tid=385317)



Help house - Mustafa6155 - 15.10.2012

Hello guys can someone help me with GarHouse v2.0 i got any thing like plugins, filterscript,scriptfiles and other..
i can't buy an house i logged in as /rcon login pass then i did /createhouse 150000 in the video but he createt then i can't buy that house help please


Re: Help house - Roel - 15.10.2012

What does it say when you use the buy command?


Re: Help house - Mustafa6155 - 15.10.2012

Roel wait
https://sampforum.blast.hk/showthread.php?tid=283501
I got this one
i bought it how to make an /enter command??
and exit


Re: Help house - Roel - 15.10.2012

I think there is already a /enter /exit command inside the filterscript, but do you have an enter exit command in your gamemode?
Because if you have those will conflict with eachother.


Re: Help house - Mustafa6155 - 15.10.2012

oke i will see Roel


Re: Help house - Mustafa6155 - 15.10.2012

Only this Roel
Quote:

COMMAND:enter(playerid, params[])
{
// Setup local variables
new HouseID, IntID;

// If a player hasn't logged in properly, he cannot use this command
if (INT_IsPlayerLoggedIn(playerid) == 0) return 0;

// Check if the player isn't inside a vehicle (the player must be on foot to use this command)
if (GetPlayerVehicleSeat(playerid) == -1)
{
// Loop through all houses
for (HouseID = 1; HouseID < MAX_HOUSES; HouseID++)
{
// Check if the house exists
if (IsValidDynamicPickup(AHouseData[HouseID][PickupID]))
{
// 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 interior to put the player in
IntID = AHouseData[HouseID][HouseLevel]; // Get the level of the house

// Set the worldid so other players cannot see him anymore (but allow all players in the same house to see eachother)
SetPlayerVirtualWorld(playerid, 5000 + HouseID);
// Set the player inside the interior of the house
SetPlayerInterior(playerid, AHouseInteriors[IntID][InteriorID]);
// Set the position of the player at the spawn-location of the house's interior
SetPlayerPos(playerid, AHouseInteriors[IntID][IntX], AHouseInteriors[IntID][IntY], AHouseInteriors[IntID][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;
}
}
}
}

// If no house was in range, allow other script to use this command too (business-script for example)
return 0;
}

Not other not exit where at this??


Re: Help house - Roel - 15.10.2012

What gamemode are you using? Your own or a downlaoded?


Re: Help house - Mustafa6155 - 15.10.2012

Roel this is the own downloaded FS i use my own GM mygamemodemp


Re: Help house - Roel - 15.10.2012

You should check
pawn Код:
if (INT_IsPlayerLoggedIn(playerid) == 0) return 0;
And for the rest I don't know anything else then can be wrong since I don't know about other scripts.


Re: Help house - Mustafa6155 - 15.10.2012

please how make that /enter and /exit command?? and i checked Roel