Housing System - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Housing System (
/showthread.php?tid=127897)
Housing System -
jamesb93 - 15.02.2010
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.
Re: Housing System -
BlackFoX - 15.02.2010
*Sorry* :S
Re: Housing System -
jamesb93 - 15.02.2010
It does lol.
Re: Housing System -
BlackFoX - 15.02.2010
there is all right, maybe you have a Wrong Interior for the Coords
Re: Housing System -
jamesb93 - 15.02.2010
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
Re: Housing System -
BlackFoX - 15.02.2010
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
Re: Housing System -
jamesb93 - 15.02.2010
Well yea, I can hear the sounds but I fall through, So maybe it's the z coord.
Re: Housing System -
BlackFoX - 15.02.2010
You can goto SF and Enter the Pleasure Dome than you can try /interior & /save
Re: Housing System -
jamesb93 - 15.02.2010
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;
}
Re: Housing System -
jamesb93 - 15.02.2010
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?