Help (Explain) About System
#4

Quote:
Originally Posted by 4D1L
Посмотреть сообщение
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 код:
public OnPlayerEnterDynamicCP(playerid,checkpointid

    for(new 
0MAX_HOUSES;i++) 
    { 
        if(
checkpointid == HouseEnter[i]) 
        { 
            new 
pName[24]; 
            
GetPlayerName(playerid,pName,24); 
            if(
HInfo[i][Owned] == && 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
            } 
            if(
HInfo[i][Owned] == && strcmp(HInfo[i][Owner],pName)!= 0
            { 
                
SendClientMessage(playerid,-1,"You don't own this house"); 
            } 
            if(
HInfo[i][Owned] == 0
            { 
            
SendClientMessage(playerid,-1,"/buy to buy this lovely house"); 
            } 
        } 
        if(
checkpointid == HouseExit[i]) 
        { 
            
SetPlayerPos(playerid,HInfo[i][XPos]+3,HInfo[i][YPos],HInfo[i][ZPos]); 
            
SetPlayerInterior(playerid,GetPVarInt(playerid,"PlayersInteriorHouse")); 
            
SetPlayerVirtualWorld(playerid,GetPVarInt(playerid ,"PlayerVirtualWorldHouse")); 
        } 
    } 
    return 
1

thats my problems i can made 1 house only
and i want add more interior house you know what i mean now ?

PHP код:
public OnPlayerEnterDynamicCP(playerid,checkpointid

    for(new 
0MAX_HOUSES;i++) 
    { 
        if(
checkpointid == HouseEnter[i]) 
        { 
            new 
pName[24]; 
            
GetPlayerName(playerid,pName,24); 
            if(
HInfo[i][Owned] == && 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
            } 
this my problems cant made new interior in this system 1only can use and i want explain to add new interior
Reply


Messages In This Thread
Help (Explain) About System - by ommar8080 - 13.03.2017, 15:03
Re: Help (Explain) About System - by ommar8080 - 14.03.2017, 22:16
Re: Help (Explain) About System - by 4D1L - 14.03.2017, 22:23
Re: Help (Explain) About System - by ommar8080 - 14.03.2017, 22:40
Re: Help (Explain) About System - by ommar8080 - 17.03.2017, 02:51
Re: Help (Explain) About System - by Toroi - 17.03.2017, 07:52
Re: Help (Explain) About System - by ommar8080 - 17.03.2017, 08:27
Re: Help (Explain) About System - by Toroi - 17.03.2017, 08:48

Forum Jump:


Users browsing this thread: 1 Guest(s)