[Help]Entrance & Exit Scripting
#4

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

He was probably using this function, so it was a different virtual world for every player.
Ways to do this are:
pawn Code:
CMD:enter(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(...
    {
        SetPlayerPos(playerid, ....
        SetPlayerVirtualWorld(playerid, playerid); //Why is there 2 playerid\'s here? Because nobody has the same player id, so there will never be two players in the same virtual world at once.
    }
    return 1;
}
Or without the use of playerid and house id instead:
pawn Code:
CMD:enter(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(...
    {
        SetPlayerPos(playerid, ....
        SetPlayerVirtualWorld(playerid, HouseInfo[houseidhere][ID]); //Nobody has the same house ID, unless they\'re both entering the same house.
    }
    return 1;
}
The second method is a better option, especially in the cases when you have it set so other players can enter your house.
Reply


Messages In This Thread
[Help]Entrance & Exit Scripting - by luis_mendoza - 13.01.2013, 07:42
Re: [Help]Entrance & Exit Scripting - by RajatPawar - 13.01.2013, 07:47
Re: [Help]Entrance & Exit Scripting - by luis_mendoza - 13.01.2013, 07:51
Re: [Help]Entrance & Exit Scripting - by Threshold - 13.01.2013, 08:04
Re: [Help]Entrance & Exit Scripting - by luis_mendoza - 13.01.2013, 08:12
Re: [Help]Entrance & Exit Scripting - by RajatPawar - 13.01.2013, 08:16
Re: [Help]Entrance & Exit Scripting - by luis_mendoza - 13.01.2013, 08:17
Re: [Help]Entrance & Exit Scripting - by luis_mendoza - 13.01.2013, 10:29

Forum Jump:


Users browsing this thread: 1 Guest(s)