15.02.2010, 14:31
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:
I'm pretty sure I have the right coords and interior also.
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]);
}
}