#1

Why My /enter Doesnt Work?

The Code Is This:

Coordinates:

pawn Код:
new infopickup;

main()
{
    print("\n----------------------------------");
    print(" Script Testing By Max_Coldheart ");
    print("----------------------------------\n");
    infopickup = CreatePickup(1239,1,1480.9829,-1769.9470,18.7958);
    DisableInteriorEnterExits();
}
No Errors When Compiling:
pawn Код:
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase
But When I try to use /enter, it doesnt put me inside cityhall.

My /enter Command:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp("/enter", cmdtext, true, 6) == 0)
        {
           if(IsPlayerInRangeOfPoint(playerid, 10, 1480.9829,-1769.9470,18.7959))
            {
                SetPlayerPos(playerid,388.8720,173.8050,1008.3828);
                SetPlayerInterior(playerid, 3);
                return 1;
            }
        }
    if(strcmp("/exit", cmdtext, true, 5) == 0)
     {
        if(IsPlayerInRangeOfPoint(playerid,10,388.8720,173.8050,1008.3828))
            {
                SetPlayerPos(playerid,1480.9829,-1769.9470,18.7958);
                SetPlayerInterior(playerid, 0);
                return 1;
            }
    }
    return 1;
}
The /exit doesnt work either

How To Fix This
Reply
#2

Quote:
Originally Posted by Max_Coldheart
Посмотреть сообщение
Why My /enter Doesnt Work?

The Code Is This:

Coordinates:

pawn Код:
new infopickup;

main()
{
    print("\n----------------------------------");
    print(" Script Testing By Max_Coldheart ");
    print("----------------------------------\n");
    DisableInteriorEnterExits();
}
infopickup = CreatePickup(1239,1,1480.9829,-1769.9470,18.795;
No Errors When Compiling:
pawn Код:
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase
But When I try to use /enter, it doesnt put me inside cityhall.

My /enter Command:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp("/enter", cmdtext, true, 6) == 0)
        {
           if(IsPlayerInRangeOfPoint(playerid, 10, 1480.9829,-1769.9470,18.7959))
            {
                SetPlayerPos(playerid,388.8720,173.8050,1008.3828);
                return 1;
            }
        }
    if(strcmp("/exit", cmdtext, true, 5) == 0)
     {
        if(IsPlayerInRangeOfPoint(playerid,10,388.8720,173.8050,1008.3828))
            {
                SetPlayerPos(playerid,1480.9829,-1769.9470,18.7958);
                return 1;
            }
    }
    return 1;
}
The /exit doesnt work either

How To Fix This
Tray now this?
Reply
#3

Why It Doesnt Work
Reply
#4

Put infopickup = CreatePickup(1239,1,1480.9829,-1769.9470,18.795; under your OnGameModeInit()

+ Maybe, you are not in the range, maybe your range is wrong!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)