When i enter a place all CMD disable
#1

When i add this filterscript
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/enter", true))
    {
        if(IsPlayerInRangeOfPoint(playerid, 3.0, -2655.207519,639.643737,14.454549))
        {
            SetPlayerPos(playerid, 1170.0588,-1352.4019,2423.0461); // SF Hospital Entrance
            SetPlayerInterior(playerid, 1);
        }
    }
    if(!strcmp(cmdtext, "/exit", true))
    {
        if(IsPlayerInRangeOfPoint(playerid, 3.0, 286.148986,-40.644397,1001.515625))
        {
            SetPlayerPos(playerid, -2655.207519,639.643737,14.454549);// SF Hospital Exit
            SetPlayerInterior(playerid, 0);
        }
    }
    return 1;
}
when go at the pickup i press /enter and i enter and all is good but when i enter all commands becomes disabled and cannot get out of that place !!!
Reply
#2

What do you mean ? sorry i cannot understand you
Reply
#3

What you mean with? Which commands?
Quote:

all commands

Reply
#4

I mean what are the area checks ? and what is wrong with that code so when i do /enter i get stuck and i cannot get in again
Reply
#5

if you are hard coding the door in you may want the exit near where you are placed when you enter the hospital
Reply
#6

:/ don't understand what point you want ?!
Reply
#7

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/enter", true))
    {
        if(IsPlayerInRangeOfPoint(playerid, 3.0, -2655.207519,639.643737,14.454549))
        {
            SetPlayerPos(playerid, 1170.0588,-1352.4019,2423.0461); // SF Hospital Entrance
            SetPlayerInterior(playerid, 1);
        }
        return 1;
    }
    if(strcmp(cmdtext, "/exit", true))
    {
        if(IsPlayerInRangeOfPoint(playerid, 3.0, 286.148986,-40.644397,1001.515625))
        {
            SetPlayerPos(playerid, -2655.207519,639.643737,14.454549);// SF Hospital Exit
            SetPlayerInterior(playerid, 0);
        }
        return 1;
    }
    return 0;
}
try that
Reply
#8

Now no command in thw whole server work
Reply
#9

Bump
N.B: after 48 hours
Reply
#10

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/enter", true))
    {
        if(IsPlayerInRangeOfPoint(playerid, 3.0, -2655.207519,639.643737,14.454549))
        {
            SetPlayerPos(playerid, 1170.0588,-1352.4019,2423.0461); // SF Hospital Entrance
            SetPlayerInterior(playerid, 1);
        }
        return 1;
    }
    if(strcmp(cmdtext, "/exit", true))
    {
        if(IsPlayerInRangeOfPoint(playerid, 3.0, 1170.0588,-1352.4019,2423.0461))
        {
            SetPlayerPos(playerid, -2655.207519,639.643737,14.454549);// SF Hospital Exit
            SetPlayerInterior(playerid, 0);
        }
        return 1;
    }
^that will place the exit where you enterd the hospital and removed the return 0; after the cmd so it can reach the rest of you code
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)