[help] door for dynamiobject - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [help] door for dynamiobject (
/showthread.php?tid=600379)
[help] door for dynamiobject -
ratxrat - 07.02.2016
hay all im new in samp scripting, i have door system but if get in door if dynamic object allways fall im creat interior inthe sky.
this my code
Код HTML:
CMD:enter(playerid, params[])
{
for(new i=0; i < MAX_DOORS; i++)
{
if(!IsPlayerInRangeOfPoint(playerid, 2.0, DoorInfo[i][dExteriorX], DoorInfo[i][dExteriorY], DoorInfo[i][dExteriorZ]) && DoorInfo[i][dExteriorInt] == GetPlayerInterior(playerid) && DoorInfo[i][dExteriorVir] == GetPlayerVirtualWorld(playerid)) continue;
SetPlayerInterior(playerid, DoorInfo[i][dInteriorInt]);
SetPlayerVirtualWorld(playerid, DoorInfo[i][dInteriorVir]);
SetPlayerPos(playerid, DoorInfo[i][dInteriorX], DoorInfo[i][dInteriorY], DoorInfo[i][dInteriorZ]);
SetPlayerFacingAngle(playerid, DoorInfo[i][dInteriorAngle]);
SetCameraBehindPlayer(playerid);
}
return 1;
}
how to use timer for freeze player wen stream loading?
sory for my bad english
Re: [help] door for dynamiobject -
Sascha - 07.02.2016
Код:
CMD:enter(playerid, params[])
{
for(new i=0; i < MAX_DOORS; i++)
{
if(!IsPlayerInRangeOfPoint(playerid, 2.0, DoorInfo[i][dExteriorX], DoorInfo[i][dExteriorY], DoorInfo[i][dExteriorZ]) && DoorInfo[i][dExteriorInt] == GetPlayerInterior(playerid) && DoorInfo[i][dExteriorVir] == GetPlayerVirtualWorld(playerid)) continue;
SetPlayerInterior(playerid, DoorInfo[i][dInteriorInt]);
SetPlayerVirtualWorld(playerid, DoorInfo[i][dInteriorVir]);
SetPlayerPos(playerid, DoorInfo[i][dInteriorX], DoorInfo[i][dInteriorY], DoorInfo[i][dInteriorZ]);
SetPlayerFacingAngle(playerid, DoorInfo[i][dInteriorAngle]);
TogglePlayerControllable(playerid, 0);
SetTimerEx("SafetyTime", 2000, false, "i", playerid);
SetCameraBehindPlayer(playerid);
}
return 1;
}
forward SafetyTime(playerid);
public SafetyTime(playerid)
{
TogglePlayerControllable(playerid, 1);
return 1;
}
Re: [help] door for dynamiobject -
ratxrat - 07.02.2016
thanks dude + rep