SA-MP Forums Archive
Help /enter problem - 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 /enter problem (/showthread.php?tid=319028)



Help /enter problem - Dark Crow - 17.02.2012

i have this /enter to a bank

Код:
if (PlayerToPoint(2.0, playerid,1457.90002441,-1011.50000000,26.29999924))//BANKA
			{
			    SetPlayerInterior(playerid,3);
				SetPlayerPos(playerid,-467.60000610,-196.69999695,988.79998779);
				GameTextForPlayer(playerid, "~w~ Banka", 5000, 1);
				PlayerInfo[playerid][pInt] = 3;
				PlayerInfo[playerid][pLocal] = 103;
			}
but the problem is that i always fall through the gorund its not the only one i have a couple more that i fall also if anyone can help me?


Re: Help /enter problem - Toreno - 17.02.2012

Maybe the interior you setting is wrong, have you checked if the interior you were trying to get in is interior ID 3?


Re: Help /enter problem - Dark Crow - 17.02.2012

sometimes i get in with no problem but most of the time i keep falling through the gorund!


Re: Help /enter problem - deltapro - 17.02.2012

Your interior is bugged.. just try with other interior..
___________________________
+1 rep if this is helpfull
___________________________


Re: Help /enter problem - Toreno - 17.02.2012

Do this; Once you succeed getting in, stay where the door is and type the command /save, go to your documents folder where it saves the position, on sa-mp folder and rechange the SetPlayerPos. MAYBE will be there.


Re: Help /enter problem - Dark Crow - 17.02.2012

Is there any way to freeze the player on that position untill the interier loads to stop falling from the ground?


Re: Help /enter problem - fordawinzz - 17.02.2012

yes:

pawn Код:
stock FreezePlayer(playerid, time)
{
     TogglePlayerControllable(playerid, 0);
     SetTimerEx("UnfreezePlayer", time * 1000, false, "i", playerid);
     return 1;
}
forward UnfreezePlayer(playerid);
public UnfreezePlayer(playerid)
{
     return TogglePlayerControllable(playerid, 1);
}
Usage:

pawn Код:
FreezePlayer(playerid, 2);
the time is in seconds


Re: Help /enter problem - Toreno - 17.02.2012

Yes, once he enters the building, you add this function; TogglePlayerControllable(playerid, 0); and SetTimerEx so after a few seconds, it will unfreeze that player; TogglePlayerControllable(playerid, 1);

EDIT: fordawinzz was faster.