03.02.2011, 02:19
pawn Код:
enum BINFO
{
BInt,
Float:BPosX,
Float:BPosY,
Float:BPosZ,
Float:BIntX,
Float:BIntY,
Float:BIntZ,
};
new Buildings[][BINFO] = {
// Interior, Entrancex, Entrancey, Entrancez, Interiorx, Interiory, Interiorz
{0, 555.55, 555.55, 555.55, 666.66, 666.66, 666.66},
{1, 111.11, 111.11, 111.11, 222.22, 222.22, 22.22}
};
CMD:enter(playerid, params[])
{
for(new i = 0; i < sizeof(Buildings); ++i)
{
if(IsPlayerInRangeOfPoint(playerid, 10, Buildings[i][BPosX], Buildings[i][BPosY], Buildings[i][BPosZ]))
{
SetPlayerPos(playerid, Buildings[i][BIntX], Buildings[i][BIntY], Buildings[i][BIntZ]);
SetPlayerInterior(playerid, Buildings[i][BInt]);
}
}
return 1;
}