SA-MP Forums Archive
Help with interior - 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: Help with interior (/showthread.php?tid=253958)



Help with interior - lsrgta - 08.05.2011

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!


Re: Help with interior - MadeMan - 08.05.2011

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



Re: Help with interior - lsrgta - 08.05.2011

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


Re: Help with interior - lsrgta - 08.05.2011

Quote:

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

Where did you get that part from?