SA-MP Forums Archive
/enter - 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)
+--- Thread: /enter (/showthread.php?tid=544440)



/enter - mkmk - 01.11.2014

Why's this command not working? I'm pretty sure it's all correct.

pawn Код:
CMD:enter(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid, 2.0, 100,626.9647,-571.8541,17.9207,91.3678,0,0,0,0,0,0))
    {
        SetPlayerPos(playerid, 247.0330,65.7600,1003.6406);
        SetPlayerInterior(playerid, 6);
        SetPlayerVirtualWorld(playerid, 5);
    }
    if(IsPlayerInRangeOfPoint(playerid, 2.0, 100,626.9647,-571.8541,17.9207,91.3678,0,0,0,0,0,0))
    {
        SetPlayerPos(playerid, 247.0330,65.7600,1003.6406);
        SetPlayerInterior(playerid, 6);
        SetPlayerVirtualWorld(playerid, 5);
    }
    return 1;
}



Re: /enter - [BOPE]Seu._.Madruga - 01.11.2014

Tente assim...

Ajudei? +Rep

PHP код:
CMD:enter(playeridparams[])
{
    if(
IsPlayerInRangeOfPoint(playerid2.0100,626.9647,-571.8541,17.9207,91.3678,0,0,0,0,0,0))
    {
        
SetPlayerVirtualWorld(playerid5);
        
SetPlayerPos(playerid247.0330,65.7600,1003.6406);
        
SetPlayerInterior(playerid6);      
    }
    return 
1;




Re: /enter - Thanos1997 - 01.11.2014

Код:
CMD:enter(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid, 2.0, 100,626.9647,-571.8541,17.9207,91.3678,0,0,0,0,0,0))
    {
        SetPlayerPos(playerid, 247.0330,65.7600,1003.6406);
        SetPlayerInterior(playerid, 6);
        SetPlayerVirtualWorld(playerid, 5);
    }
    else if(IsPlayerInRangeOfPoint(playerid, 2.0, 100,626.9647,-571.8541,17.9207,91.3678,0,0,0,0,0,0))
    {
        SetPlayerPos(playerid, 247.0330,65.7600,1003.6406);
        SetPlayerInterior(playerid, 6);
        SetPlayerVirtualWorld(playerid, 5);
    }
    return 1;
}
try this


Re: /enter - Dziugsas - 02.11.2014

Quote:
Originally Posted by Thanos1997
Посмотреть сообщение
Код:
CMD:enter(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid, 2.0, 100,626.9647,-571.8541,17.9207,91.3678,0,0,0,0,0,0))
    {
        SetPlayerPos(playerid, 247.0330,65.7600,1003.6406);
        SetPlayerInterior(playerid, 6);
        SetPlayerVirtualWorld(playerid, 5);
    }
    else if(IsPlayerInRangeOfPoint(playerid, 2.0, 100,626.9647,-571.8541,17.9207,91.3678,0,0,0,0,0,0))
    {
        SetPlayerPos(playerid, 247.0330,65.7600,1003.6406);
        SetPlayerInterior(playerid, 6);
        SetPlayerVirtualWorld(playerid, 5);
    }
    return 1;
}
try this
These are the same if you havent noticed...


Re: /enter - mkmk - 02.11.2014

Can I just say, nothing happens when I type the command - don't even get unknown command or anything.

Could it be something to do with the fact that when I type /save the coords change each time?


Re: /enter - Malicious - 02.11.2014

IsPlayerInRangeOfPoint(playerid, 2.0, x, y, z))
The other bits you have in there are unnecessary.
Just like the Cords you have on SetPlayerPos

I assume this is for the Dillimore Police Station so here's what I have for you.
Код:
CMD:enter(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid, 2.0, 627.3657, -571.5280, 17.8458))
    {
        SetPlayerPos(playerid, 247.0330,65.7600,1003.6406);
        SetPlayerInterior(playerid, 6);
        SetPlayerVirtualWorld(playerid, 5);
    }
    if(IsPlayerInRangeOfPoint(playerid, 2.0, 100,611.1243, -582.5122, 17.3781))
    {
        SetPlayerPos(playerid, 247.0330,65.7600,1003.6406);
        SetPlayerInterior(playerid, 6);
        SetPlayerVirtualWorld(playerid, 5);
    }
    return 1;
}



Re: /enter - mkmk - 02.11.2014

Quote:
Originally Posted by Malicious
Посмотреть сообщение
IsPlayerInRangeOfPoint(playerid, 2.0, x, y, z))
The other bits you have in there are unnecessary.
Just like the Cords you have on SetPlayerPos

I assume this is for the Dillimore Police Station so here's what I have for you.
Код:
CMD:enter(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid, 2.0, 627.3657, -571.5280, 17.8458))
    {
        SetPlayerPos(playerid, 247.0330,65.7600,1003.6406);
        SetPlayerInterior(playerid, 6);
        SetPlayerVirtualWorld(playerid, 5);
    }
    if(IsPlayerInRangeOfPoint(playerid, 2.0, 100,611.1243, -582.5122, 17.3781))
    {
        SetPlayerPos(playerid, 247.0330,65.7600,1003.6406);
        SetPlayerInterior(playerid, 6);
        SetPlayerVirtualWorld(playerid, 5);
    }
    return 1;
}
I legit love you xD
+rep.

Also, how would I make /exit? x.x.
ANOTHER thing -_- - how would I make you able to use /enter for multiple places?


Re: /enter - Malicious - 02.11.2014

Quote:
Originally Posted by mkmk
Посмотреть сообщение
I legit love you xD
+rep.

Also, how would I make /exit? x.x.
ANOTHER thing -_- - how would I make you able to use /enter for multiple places?
what you can do for /exit is basically do the same as /enter, but reverse it - for example, use the coordinates from the "SetPlayerPos" and use them as the "IsPlayerInRangeOfPoint", and as for the multiple places, you can just add them manually like you have already - Hope this helps

btw: you don't need to give me +rep, I am here to help, no cost


Re: /enter - mkmk - 02.11.2014

Quote:
Originally Posted by Malicious
Посмотреть сообщение
what you can do for /exit is basically do the same as /enter, but reverse it - for example, use the coordinates from the "SetPlayerPos" and use them as the "IsPlayerInRangeOfPoint", and as for the multiple places, you can just add them manually like you have already - Hope this helps

btw: you don't need to give me +rep, I am here to help, no cost
I feels right to rep you bro. Also, what do I set the interior ID to then? What's the "normal worlds" interior?


Re: /enter - Malicious - 02.11.2014

Normal world is "0" as default to everything, the use of :

Worlds: https://sampwiki.blast.hk/wiki/SetPlayerVirtualWorld
Interior IDs: http://weedarr.wikidot.com/interior
Setting Interior: https://sampwiki.blast.hk/wiki/Function:SetPlayerInterior