24.08.2011, 19:53
Code:
if(newkeys & KEY_FIRE) { if(IsPlayerInRangeOfPoint(playerid, 20.0, X, Y, Z)) { SetPlayerPos(playerid, X, Y, Z); SetPlayerInterior(playerid, InteriorID); SetPlayerVirtualWorld(playerid, 0); } }
if(newkeys & KEY_FIRE) { if(IsPlayerInRangeOfPoint(playerid, 20.0, X, Y, Z)) { SetPlayerPos(playerid, X, Y, Z); SetPlayerInterior(playerid, InteriorID); SetPlayerVirtualWorld(playerid, 0); } }
if(newkeys & KEY_FIRE)
{
if(IsPlayerInRangeOfPoint(playerid, 20.0, X, Y, Z))
{
SetPlayerPos(playerid, X, Y, Z);
SetPlayerInterior(playerid, InteriorID);
SetPlayerVirtualWorld(playerid, 0);
}
if(IsPlayerInRangeOfPoint(playerud, 20.0, X, Y, Z))
{
//Set the players position back to where you entered, and... done.
}
}
new Entering[MAX_PLAYERS];
if(newkeys & KEY_FIRE)
{
if(IsPlayerInRangeOfPoint(playerid,20, X, Y, Z))//enter
{
SetPlayerPos(playerid,X,Y,Z);
SetPlayerInterior(playerid,InteriorID);
SetPlayerVirtualWorld(playerid,0);
Entering[playerid] = 1;
}
if(IsPlayerInRangeOfPoint(playerud,20.0,X,Y,Z))//exit
{
if(Entering[playerid] == 1)
{
SetPlayerPos(playerid,X,Y,Z);
SetPlayerInterior(playerid,InteriorID);
SetPlayerVirtualWorld(playerid,0);
}
}
}