How is this possible
#8

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;
}
Reply


Messages In This Thread
How is this possible - by Hotspot - 31.08.2015, 15:08
Re: How is this possible - by xVIP3Rx - 31.08.2015, 15:11
Re: How is this possible - by CrazyChoco - 31.08.2015, 15:11
Re: How is this possible - by IceBilizard - 31.08.2015, 16:02
Re: How is this possible - by lanix - 31.08.2015, 17:06
Re: How is this possible - by Hotspot - 01.09.2015, 15:49
Re: How is this possible - by Hotspot - 01.09.2015, 15:54
Re: How is this possible - by Abagail - 01.09.2015, 15:55
Re: How is this possible - by Hotspot - 03.09.2015, 14:45

Forum Jump:


Users browsing this thread: 1 Guest(s)