27.04.2013, 15:11
Hello
Try this, i'm not a very good scripter, but try...
I hope help you
PT
Try this, i'm not a very good scripter, but try...
pawn Код:
for(new ptidx = 0; ptidx< sizeof(DoorInfo); ptidx++) // Dynamic Doors < sizeof(
{
if(IsPlayerInRangeOfPoint(playerid, 2, DoorInfo[ptidx][dOX], DoorInfo[ptidx][dOY], DoorInfo[ptidx][dOZ]))
{
if(DoorInfo[ptidx][dCInt])
{
Pause(playerid);
}
else
{
SetPlayerInterior(playerid, DoorInfo[ptidx][dIInt]);
SetPlayerVirtualWorld(playerid, DoorInfo[ptidx][dIVW]);
SetPlayerFacingAngle(playerid, DoorInfo[ptidx][dIA]);
SetCameraBehindPlayer(playerid);
SetPlayerPos(playerid, DoorInfo[ptidx][dIX], DoorInfo[ptidx][dIY], DoorInfo[ptidx][dIZ]);
}
return 1;
}
}
for(new ptiidx=0; ptiidx<MAX_DOORS; ptiidx++) // Dynamic Doors
{
if(IsPlayerInRangeOfPoint(playerid, 2, DoorInfo[ptiidx][dIX], DoorInfo[ptiidx][dIY], DoorInfo[ptiidx][dIZ]) && GetPlayerVirtualWorld(playerid) == DoorInfo[ptiidx][dIVW] && GetPlayerInterior(playerid) == DoorInfo[ptiidx][dIInt])
{
if(DoorInfo[ptiidx][dCExt])
{
Pause(playerid);
}
else
{
SetPlayerInterior(playerid, DoorInfo[ptiidx][dOInt]);
SetPlayerVirtualWorld(playerid, DoorInfo[ptiidx][dOVW]);
SetPlayerFacingAngle(playerid, DoorInfo[ptiidx][dOA]);
SetCameraBehindPlayer(playerid);
SetPlayerPos(playerid, DoorInfo[ptiidx][dOX], DoorInfo[ptiidx][dOY], DoorInfo[ptiidx][dOZ]);
}
return 1;
}
}
PT