SA-MP Forums Archive
In Interior - Remove Player on map - 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: In Interior - Remove Player on map (/showthread.php?tid=337095)



Edited - WarriorEd22 - 24.04.2012

Edited... fixed.


Re: In Interior - Remove Player on map - Face9000 - 24.04.2012

Try this:

https://sampwiki.blast.hk/wiki/SetPlayerVirtualWorld
https://sampwiki.blast.hk/wiki/Function:SetPlayerInterior

https://sampwiki.blast.hk/wiki/GetPlayerInterior
https://sampwiki.blast.hk/wiki/GetPlayerVirtualWorld


Re: In Interior - Remove Player on map - WarriorEd22 - 24.04.2012

Yes I've read those but I have no clue what to put add and combine. xD


Respuesta: In Interior - Remove Player on map - OPremium - 24.04.2012

Try using OnPlayerInteriorChange like this:

pawn Код:
public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
    SetPlayerVirtualWorld(playerid, newinteriorid);
    return 1;
}



Re: Respuesta: In Interior - Remove Player on map - nickdodd25 - 25.04.2012

Quote:
Originally Posted by OPremium
Посмотреть сообщение
Try using OnPlayerInteriorChange like this:

pawn Код:
public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
    SetPlayerVirtualWorld(playerid, newinteriorid);
    return 1;
}
Added some more to that so the player gets back to the right world when the player leaves the interior. This is not tested but i believe it works.
pawn Код:
public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
    if(GetPlayerVirtualWorld(playerid) == 0)
    {
        SetPlayerVirtualWorld(playerid, 1+playerid);//sets the player in world 1 then + the players id. so no other players will ever see eachother on the map.
    }
    else
    {
        SetPlayerVirtualWorld(playerid, 0);
    }
    return 1;
}