Housing System
#1

hey,

I'm making a house system but with the /enter command, I'm having trouble. It just makes you fall thorugh the ground.

Heres what I've got:

pawn Код:
enum HouseInfo
{
    hSQLId,
    Renter[24],
    Rentable,
    Rentcost,
    Cost,
    Interior,
    VW,
    Locked,
    Float:Intx,
    Float:Inty,
    Float:Intz,
    Float:Iconx,
    Float:Icony,
    Float:Iconz,
};
new hInfo[MAX_HOUSES][HouseInfo];
pawn Код:
dcmd_enter(playerid, params[])
{
    #pragma unused params
    new Float:x, Float:y, Float:z;
    for(new i=0; i<MAX_HOUSES; i++)
    {
      if(PlayerToPoint(MAX_DISTANCE_TO_PROP, playerid, hInfo[i][Iconx], hInfo[i][Icony], hInfo[i][Iconz]))
        {
            GetPlayerPos(playerid, x, y, z);
            SetPlayerInterior(playerid, hInfo[i][Interior]);
            SetPlayerPos(playerid, hInfo[i][Intx], hInfo[i][Inty], hInfo[i][Intz]);
            SetPlayerVirtualWorld(playerid, hInfo[i][VW]);
        }
    }
I'm pretty sure I have the right coords and interior also.
Reply
#2

*Sorry* :S
Reply
#3

It does lol.
Reply
#4

there is all right, maybe you have a Wrong Interior for the Coords
Reply
#5

I made it the pleasure domes to test and I hear the music but I still fall. Im pretty sure these are correct.

x - -2640.762939
y - 1406.682006
x - 906.460937
Int - 4
Reply
#6

http://www.picbutler.de/bild/117445/samp017lsq8e.jpg

it isnt your House System ^^

Tip : if you find the right Position for your House you can break the loop
Reply
#7

Well yea, I can hear the sounds but I fall through, So maybe it's the z coord.
Reply
#8

You can goto SF and Enter the Pleasure Dome than you can try /interior & /save
Reply
#9

Still bugged.

This is how I'm loading them;
pawn Код:
public LoadHouses()
{
    CheckSQL();
    new resultline[256],hid,houseid,renter,rentable,rentcost,cost,interior,vw,locked,Float:intx,Float:inty,Float:intz, Float:icx, Float:icy, Float:icz, ownerid;
    mysql_query("SELECT * FROM `houses`");
    mysql_store_result();
    while(mysql_fetch_row_format(resultline,"|") == 1)
    {
      sscanf(resultline,"p|ddddddddffffffd",houseid,renter,rentable,rentcost,cost,interior,vw,locked,intx,inty, intz, icx, icy,icz, ownerid);
    hid = CreatePickup(1273, 23, icx, icy, icz, -1);
        hInfo[hid][hSQLId] = houseid;
      hInfo[hid][Renter] = renter;
      hInfo[hid][Rentable] = rentable;
      hInfo[hid][Rentcost] = rentcost;
      hInfo[hid][Cost] = interior;
      hInfo[hid][VW] = vw;
      hInfo[hid][Locked] = locked;
      hInfo[hid][Intx] = intx;
      hInfo[hid][Inty] = inty;
      hInfo[hid][Intz] = intz;
      hInfo[hid][Iconx] = icx;
      hInfo[hid][Icony] = icy;
      hInfo[hid][Iconz] = icz;
      hInfo[hid][Ownerid] = ownerid;
    }
    mysql_free_result();
    return 1;
}
Reply
#10

Hate to bump but this still isent working. I double checked the coords and they are fine.

Anyone know why I still fall through the ground?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)