24.06.2010, 12:59
Okey, I've got this:
But for some reason... This doesn't work as it should...
It says: Not at an entrance, when i'm at an entrance....
Anyone knows why?
pawn Код:
dcmd_enter(playerid, params[])
{
#pragma unused params
for(new f=0; f<=MAX_FACTIONS; f++)
{
if(PlayerToPoint(1.0,playerid,FactionInfo[f][fEnterX],FactionInfo[f][fEnterY],FactionInfo[f][fEnterZ]))
{
if(FactionInfo[f][fLocked] == 1 && PlayerInfo[playerid][pFaction] != f)
{
GameTextForPlayer(playerid,"~r~Locked",3000,1);
return 1;
}
SetPlayerPos(playerid,FactionInfo[f][fInteriorX],FactionInfo[f][fInteriorY],FactionInfo[f][fInteriorZ]);
SetPlayerInterior(playerid,FactionInfo[f][fInteriorID]);
SetPlayerVirtualWorld(playerid,FactionInfo[f][fVirtual]);
return 1;
}
else return SendErrorMessage(playerid, ".: Info: Not at an entrance :.");
}
return 1;
}
It says: Not at an entrance, when i'm at an entrance....
Anyone knows why?