14.03.2017, 22:40
Quote:
Replace OnPlayerEnterDynamicCP with this. Your code currently will only allow one interior to be used by all the houses loaded. You can perhaps use an array to store the details of possible interiors and then store the key into the file associated with each house.
PHP код:
|
and i want add more interior house you know what i mean now ?
PHP код:
public OnPlayerEnterDynamicCP(playerid,checkpointid)
{
for(new i = 0; i < MAX_HOUSES;i++)
{
if(checkpointid == HouseEnter[i])
{
new pName[24];
GetPlayerName(playerid,pName,24);
if(HInfo[i][Owned] == 1 && strcmp(HInfo[i][Owner],pName) == 0)
{
SetPVarInt(playerid,"PlayersInteriorHouse",GetPlayerInterior(playerid));
SetPVarInt(playerid,"PlayerVirtualWorldHouse",GetPlayerVirtualWorld(playerid));
SetPlayerInterior(playerid,2);// u can change this to the interior of ur house interior
SetPlayerPos(playerid,271.884979,306.631988,999.148437);// u can change the position of the interior
SetPlayerVirtualWorld(playerid,HInfo[i][VirtualWorld]);
PlayerInHouseID[playerid] = i;
}