22.11.2010, 07:59
(
Последний раз редактировалось iggy1; 22.11.2010 в 08:25.
)
https://sampwiki.blast.hk/wiki/SetPlayerVirtualWorld
https://sampwiki.blast.hk/wiki/SetVehicleVirtualWorld
Use them only players in the same virtualworld can see see each other, same for vehicles.
EDIT: If you want a different virtual world for each one use an integer variable as a counter and set the world of the player/vehicle to that number. And increase it by one everytime its used.
eg,
If you want players in the same vehicle to see each other you will need to check if a player is already in the vehicle and if so... Set The player who is entering to the same world as the player in the vehicle......... (and thats why i don't write tutorials)
https://sampwiki.blast.hk/wiki/SetVehicleVirtualWorld
Use them only players in the same virtualworld can see see each other, same for vehicles.
EDIT: If you want a different virtual world for each one use an integer variable as a counter and set the world of the player/vehicle to that number. And increase it by one everytime its used.
eg,
pawn Код:
new counter;//global
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if (GetVehicleModel(vehicleid) == 592 && ispassenger == 1)
{
counter++; //decrease by one when they leave the interior
SetPlayerInterior(playerid,9);
SetPlayerVirtualWorld(playerid, counter);//*
SetPlayerFacingAngle(playerid,0.0);
SetPlayerPos(playerid, 315.856170,1024.496459,1949.797363);
SetCameraBehindPlayer(playerid);
InAndrom[playerid]=vehicleid;
}
return 1;
}

