13.01.2013, 08:04
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:
Or without the use of playerid and house id instead:
The second method is a better option, especially in the cases when you have it set so other players can enter your house.
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;
}
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;
}