SA-MP Forums Archive
/enter Not work - 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 Not work (/showthread.php?tid=251287)



/enter Not work - Aizen - 26.04.2011

This is my pawno code
Код:
#include <a_samp>
new driving;
public OnGameModeInit()
{
    DisableInteriorEnterExits();
    driving = CreatePickup(1239,1,2045.5084228516,-1908.2283935547,12.99134349823);
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/enter",cmdtext,true,6) == 0)
		{
	    	if(IsPlayerInRangeOfPoint(playerid,10,2045.5084228516,-1908.2283935547,12.99134349823))
			{
			    SetPlayerInterior(5,playerid);
				SetPlayerPos(playerid,1299.14,-794.77,1084.00);
				
				
				return 1;
			}
		}
    if (strcmp("/exit",cmdtext,true,6) == 0)
		{
	    	if(IsPlayerInRangeOfPoint(playerid,10,1299.14,-794.77,1084.00))
			{
				SetPlayerInterior(0,playerid);
			    SetPlayerPos(playerid,2045.5084228516,-1908.2283935547,12.99134349823);
				return 1;
			}
		}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == driving)
        {
        GameTextForPlayer(playerid,"~r~ /enter ~y~ to enter this building",5000,5);
        }
i cant enter building


Re: /enter Not work - Gertin - 26.04.2011

https://sampforum.blast.hk/showthread.php?tid=158915

pawn Код:
SetPlayerInterior(playerid,5);
And

pawn Код:
SetPlayerInterior(playerid,0);



Re: /enter Not work - Aizen - 26.04.2011

Well i follow diddychop313 tutorial,but i still cant enter


Re: /enter Not work - JaTochNietDan - 26.04.2011

He gave you the answer, you're using the parameters the wrong way around in the SetPlayerInterior function, see the correct usage of it on the SA-MP Wiki:

https://sampwiki.blast.hk/wiki/SetPlayerInterior


Re: /enter Not work - Aizen - 26.04.2011

Well ,/enter still not work.
This is my code:
Код:
#include <a_samp>
new driving;

public OnGameModeInit()
{
    DisableInteriorEnterExits();
    driving = CreatePickup(1239,1,2045.5084228516,-1908.2283935547,12.99134349823);
	
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/enter",cmdtext,true,6) == 0)
		{
	    	if(IsPlayerInRangeOfPoint(playerid,10,2045.5084228516,-1908.2283935547,12.99134349823))
			{
			    SetPlayerInterior(playerid,5);
				SetPlayerPos(playerid,1299.14,-794.77,1084.00);
				
				
				return 1;
			}
		}
    if (strcmp("/exit",cmdtext,true,6) == 0)
		{
	    	if(IsPlayerInRangeOfPoint(playerid,10,1299.14,-794.77,1084.00))
			{
				SetPlayerInterior(playerid,0);
			    SetPlayerPos(playerid,2045.5084228516,-1908.2283935547,12.99134349823);
				return 1;
			}
		}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == driving)
        {
        GameTextForPlayer(playerid,"~r~ /enter ~y~ to enter this building",5000,5);
        }
    
    
	
   
    return 1;
}