Help with interior
#1

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext,"/assassinenter",true) == 0)
    {
        if (IsPlayerInRangeOfPoint(playerid,3,2795.5496,-1619.3833,10.9219))
        {
            SetPlayerPos(playerid,452.489990,-18.179698,1001.132812);
            SetPlayerInterior(playerid,1);
        }
        return 1;
    }
    if(strcmp(cmdtext,"/assassinexit",true) == 0)
    {
        if (IsPlayerInRangeOfPoint(playerid,3,2795.5496,-1619.3833,10.9219))
        {
SetPlayerPos(playerid,3,2795.5496,-1619.3833,10.9219);
SetPlayerInterior(playerid,0);
        }
        return 1;
    }
    return 0;
}

Basically, I know i've did this wrong.

Can you redo this?

this is what I need:

pawn Код:
AddPlayerClass(2,953.2938,-910.3906,45.7656,359.6866,0,0,0,0,0,0); //     (The point where you enter interior)
Command to enter "/assassinenter" Command to exit "/assassinexit"

pawn Код:
and the interior id is World of coq 1   452.489990,-18.179698,1001.132812


Thanks!
Reply
#2

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext,"/assassinenter",true) == 0)
    {
        if (IsPlayerInRangeOfPoint(playerid,3,953.2938,-910.3906,45.7656))
        {
            SetPlayerPos(playerid,452.489990,-18.179698,1001.132812);
            SetPlayerInterior(playerid,1);
        }
        return 1;
    }
    if(strcmp(cmdtext,"/assassinexit",true) == 0)
    {
        if (IsPlayerInRangeOfPoint(playerid,3,452.489990,-18.179698,1001.132812))
        {
            SetPlayerPos(playerid,953.2938,-910.3906,45.7656);
            SetPlayerInterior(playerid,0);
        }
        return 1;
    }
    return 0;
}
Reply
#3

Is there anyway you make this so when you walk up to entrance you auto-enter?
Reply
#4

Quote:

if (IsPlayerInRangeOfPoint(playerid,3,953.2938,-910.3906,45.7656))

Where did you get that part from?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)