/enter
#1

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;
}
Reply
#2

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;

Reply
#3

Код:
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
Reply
#4

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...
Reply
#5

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?
Reply
#6

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

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?
Reply
#8

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
Reply
#9

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?
Reply
#10

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)