You can use something such as
http://forum.sa-mp.com/archive/index.php/t-124091.html to fade the screen in and out like in singleplayer.
You can also use GameTextForPlayer(using style #1) to emulate the location text at the bottom-left of the screen.
Then as others have suggested you can use a pickup for the actual enter / exit visual. Note also some servers may be using the default enter / exit pickups from singleplayer.
Example:
pawn Код:
new PlayerEntering[MAX_PLAYERS] = -1;
enum enterData
{
bool: eActive,
Float: eX,
Float: eY,
Float: eZ,
Float: eAngle,
eInt,
eVW,
eName[32]
}
new EnterExits[MAX_PICKUPS][enterData];
public OnPlayerConnect(playerid)
{
PlayerEntering[playerid] = -1;
return true;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(EnterExits[pickupid][eActive])
{
FadePlayerScreen(playerid, 10000);
PlayerEntering[playerid] = pickupid;
}
return 1;
}
public OnFadeComplete(playerid, beforefade)
{
if(PlayerEntering[playerid] == -1) return 1;
new pickupid = PlayerEntering[playerid];
if(beforefade)
{
SetPlayerPos(playerid, EnterExits[pickupid][eX], EnterExits[pickupid][eY], EnterExits[pickupid][eZ]);
SetPlayerInterior(playerid, EnterExits[pickupid][eInt]);
SetPlayerVirtualWorld(playerid, EnterExits[pickupid][eVW]);
SetPlayerFacingAngle(playerid, EnterExits[pickupid][eAngle]);
TogglePlayerControllable(playerid, 0);
}
else
{
new string[44];
format(string, sizeof string, "~b %s", EnterExits[pickupid][eName]);
GameTextForPlayer(playerid, string, 2000, 1);
TogglePlayerControllable(playerid, 1);
PlayerEntering[playerid] = -1;
}
return 1;
}