SA-MP Forums Archive
enter exit help.. - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: enter exit help.. (/showthread.php?tid=178045)



enter exit help.. - FrankC - 20.09.2010

Hello,
I think this is my enter, exit code:

Код:
	if(IsKeyJustDown(KEY_CROUCH, newkeys, oldkeys) )
	{
	    if( Player[playerid][PrisonDuration] >= 1 )
	    {
	        SendClientMessage( playerid, WHITE, "This feature isn't available whilst you're prisoned / jailed." );
	    }
	    else
	    {
			if(IsPlayerInRangeOfPoint( playerid, 3, BankIntX, BankIntY, BankIntZ) )
			{
			    SetPlayerInterior( playerid, 0 );
			    TextDrawHideForPlayer( playerid, ExitTextdraw);
			    SetPlayerPos( playerid, BankExtX, BankExtY, BankExtZ);
			}

			for(new i = 0; i < sizeof(Houses); i++)
			{
			    if(GetPlayerVirtualWorld( playerid ) >= 55000 && GetPlayerVirtualWorld( playerid ) < 65000 && IsPlayerInRangeOfPoint( playerid, 3, Houses[i][hInteriorX], Houses[i][hInteriorY], Houses[i][hInteriorZ]) )
			    {
			        if( Player[playerid][InHouse] != 0 )
			        {
				        SetPlayerVirtualWorld( playerid, 0 );
				        SetPlayerInterior( playerid, Houses[Player[playerid][InHouse]][hExteriorID]);
				        SetPlayerPos( playerid, Houses[Player[playerid][InHouse]][hExteriorX], Houses[Player[playerid][InHouse]][hExteriorY], Houses[Player[playerid][InHouse]][hExteriorZ]);
			            Player[playerid][InHouse] = 0;
			            TextDrawHideForPlayer( playerid, ExitTextdraw);
		            }
		            else
		            {
				        SetPlayerVirtualWorld( playerid, 0 );
				        SetPlayerInterior( playerid, Houses[i][hExteriorID]);
				        SetPlayerPos( playerid, Houses[i][hExteriorX], Houses[i][hExteriorY], Houses[i][hExteriorZ]);
		            }
			    }
			}
And if i press C i go into a building and if i want to go out its also C.
i wanna change that to /enter for enter and /exit for exit how can i change that
and dosnt this looks like the correct code?


Re: enter exit help.. - FrankC - 20.09.2010

Can anybody help me?
- If you dont understand what im asking for just say