Would somebody help me here ?
#1

Would somebody help me to complete this ?

pawn Код:
enum hInfo
{
    hOwner[24],
    hOwned,
    hID,
    hPrice,
    hInterior,
    hVirtualWorld,
    hEnterCheckpoint,
    Float:Xpos,
    Float:Ypos,
    Float:Zpos,

}
new HouseInfo[MAX_HOUSES][hInfo];

CMD:createhouse(playerid, params[])
{
    new HVW, HID, HPrice, HInt,string[128], houseid;
    new Float:x,Float:y,Float:z;
    if(sscanf(params, "iiii", HID, HInt, HVW, HPrice)) return SendClientMessage(playerid, COLOR_WHITE, "/createhouse [House ID] [interior] [Virualworld] [price]");

    HouseInfo[houseid][hID] = HID;
    HouseInfo[houseid][hInterior] = HInt;
    HouseInfo[houseid][hVirtualWorld] = HVW;
    HouseInfo[houseid][hPrice] = HPrice;

    GetPlayerPos(playerid,x,y,z);
    CreateDynamicCP(x,y,z,1.0,-1,-1,-1,50.0);

    format(string, sizeof(string), "House ID: %i\nOwner: No Owner\n Price: %i", HID, HPrice);
    CreateDynamic3DTextLabel(string,COLOR_WHITE,x,y,z,50.0);
    return 1;
}

What to put in here to make the player enter the interior that i put in /createhouse? it's something about looping all houses
pawn Код:
public OnPlayerEnterDynamicCP(playerid,checkpointid)
Reply
#2

You need
pawn Код:
new HouseCheckPoint[MAX_HOUSES];
pawn Код:
HouseCheckPoint[houseid] = CreateDynamicCP(x,y,z,1.0,-1,-1,-1,50.0);
in OnPlayerEnterDynamicCP(playerid,checkpointid)

pawn Код:
for(new i=0; i != MAX_HOUSES; i++)
    if(HouseCheckPoint[i] == checkpointid)
    {
        // set pos int vw
        break; // stops the loop
    }
Reply
#3

thank you, but didn't understand well,
i have to make a new variable to each checkpoint ?
and how to loop the x,y,z positions for each interior ?
Reply
#4

Looks like your missing data to me, your missing an exit coordinate for the house.
Reply
#5

Quote:
Originally Posted by [uL]Pottus
Посмотреть сообщение
Looks like your missing data to me, your missing an exit coordinate for the house.
i know that, because i can't know how to make it because i want the houses with different interiors, so how to do the XYZ coordinates for more than 1 interior
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)