/enter Not work
#1

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
Reply
#2

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

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

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

Well i follow diddychop313 tutorial,but i still cant enter
Reply
#4

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
Reply
#5

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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)