Why SetPlayerJoinCam can't be show the area
#1

Why SetPlayerJoinCam can't be show the area, i am put on background of register step. anyone please help me

this SetPlayerJoinCam
pawn Код:
forward SetPlayerJoinCam(playerid);
pawn Код:
public SetPlayerJoinCam(playerid)
{
    new randcamera
    switch(randcamera)
    {
        case 1: // Gym
        {
            SetPlayerVirtualWorld(playerid, 0);
            SetPlayerInterior(playerid, 0);
            Streamer_UpdateEx(playerid,2229.4968,-1722.0701,13.5625);
            SetPlayerPos(playerid,2211.1460,-1748.3909,-10.0);
            SetPlayerCameraPos(playerid,2211.1460,-1748.3909,29.3744);
            SetPlayerCameraLookAt(playerid,2229.4968,-1722.0701,13.5625);
        }
        case 2: // LSPD
        {
            SetPlayerVirtualWorld(playerid, 0);
            SetPlayerInterior(playerid, 0);
            Streamer_UpdateEx(playerid,1554.3381,-1675.5692,16.1953);
            SetPlayerPos(playerid,1514.7783,-1700.2913,-10.0);
            SetPlayerCameraPos(playerid,1514.7783,-1700.2913,36.7506);
            SetPlayerCameraLookAt(playerid,1554.3381,-1675.5692,16.1953);
        }
        case 3: // All Saints
        {
            SetPlayerVirtualWorld(playerid, 0);
            SetPlayerInterior(playerid, 0);
            Streamer_UpdateEx(playerid,1175.5581,-1324.7922,18.1610);
            SetPlayerPos(playerid, 1188.4574,-1309.2242,-10.0);
            SetPlayerCameraPos(playerid,1188.4574,-1309.2242,13.5625+6.0);
            SetPlayerCameraLookAt(playerid,1175.5581,-1324.7922,18.1610);
        }
        case 4: // Unity
        {
            SetPlayerVirtualWorld(playerid, 0);
            SetPlayerInterior(playerid, 0);
            Streamer_UpdateEx(playerid,1716.1129,-1880.0715,22.0264);
            SetPlayerPos(playerid,1716.1129,-1880.0715,-10.0);
            SetPlayerCameraPos(playerid,1755.0413,-1824.8710,20.2100);
            SetPlayerCameraLookAt(playerid,1716.1129,-1880.0715,22.0264);
        }
    }
    return 1;
}
this registrasi step
pawn Код:
if (RegistrationStep[playerid] == 0 && gPlayerLogged[playerid] != 1)
    {
        ClearChatbox(playerid, 10);
        format(string, sizeof(string), "Welcome to Republic State Roleplay, Berjalan Dengan Versi %s", Version);
        SendClientMessage(playerid, COLOR_YELLOW1, string);
        SendClientMessage(playerid, COLOR_YELLOW2, " ");
        new message[] = "\t\t\t\t\t\t Republic State Roleplay Terms and Conditions \n\n\n\n\n\n 1- Server ini mengandung konten dewasa.\n\n 2- Server ini tidak boleh menggunakan program Ilegal atau program ketiga.";
        new message2[] = "\n\n 3- membaca ini berarti ada menyetujui semua /rules diserver ini jika kamu melanggar akan di kick atau dibanned.\n\n 4- By reading this you also agree that you will obey administrators ALWAYS, unless it breaks any term (1) (2) (3) (5).\n\n\n Press on 'Setuju' jika kamu setuju, 'Tolak' jika kamu menolak.";
        format(string, sizeof(string),"%s %s",message,message2);
        ShowPlayerDialog(playerid, 1244, DIALOG_STYLE_MSGBOX,"Republic State Roleplay Terms and Conditions",string,"Setuju","Tolak");
        SetPlayerJoinCam(playerid);
        //PlayerPlaySound(playerid, 1187, 0.0, 0.0, 0.0);
        PlayerInfo[playerid][pModel] = Peds[classid][0];

    }
    else
    {
        SpawnPlayer(playerid);
    }
    return false;
Reply
#2

Quote:
Originally Posted by kurniarocki
Посмотреть сообщение
Why SetPlayerJoinCam can't be show the area, i am put on background of register step. anyone please help me

this SetPlayerJoinCam
pawn Код:
forward SetPlayerJoinCam(playerid);
pawn Код:
public SetPlayerJoinCam(playerid)
{
    new randcamera
    switch(randcamera)
    {
        case 1: // Gym
        {
            SetPlayerVirtualWorld(playerid, 0);
            SetPlayerInterior(playerid, 0);
            Streamer_UpdateEx(playerid,2229.4968,-1722.0701,13.5625);
            SetPlayerPos(playerid,2211.1460,-1748.3909,-10.0);
            SetPlayerCameraPos(playerid,2211.1460,-1748.3909,29.3744);
            SetPlayerCameraLookAt(playerid,2229.4968,-1722.0701,13.5625);
        }
        case 2: // LSPD
        {
            SetPlayerVirtualWorld(playerid, 0);
            SetPlayerInterior(playerid, 0);
            Streamer_UpdateEx(playerid,1554.3381,-1675.5692,16.1953);
            SetPlayerPos(playerid,1514.7783,-1700.2913,-10.0);
            SetPlayerCameraPos(playerid,1514.7783,-1700.2913,36.7506);
            SetPlayerCameraLookAt(playerid,1554.3381,-1675.5692,16.1953);
        }
        case 3: // All Saints
        {
            SetPlayerVirtualWorld(playerid, 0);
            SetPlayerInterior(playerid, 0);
            Streamer_UpdateEx(playerid,1175.5581,-1324.7922,18.1610);
            SetPlayerPos(playerid, 1188.4574,-1309.2242,-10.0);
            SetPlayerCameraPos(playerid,1188.4574,-1309.2242,13.5625+6.0);
            SetPlayerCameraLookAt(playerid,1175.5581,-1324.7922,18.1610);
        }
        case 4: // Unity
        {
            SetPlayerVirtualWorld(playerid, 0);
            SetPlayerInterior(playerid, 0);
            Streamer_UpdateEx(playerid,1716.1129,-1880.0715,22.0264);
            SetPlayerPos(playerid,1716.1129,-1880.0715,-10.0);
            SetPlayerCameraPos(playerid,1755.0413,-1824.8710,20.2100);
            SetPlayerCameraLookAt(playerid,1716.1129,-1880.0715,22.0264);
        }
    }
    return 1;
}
this registrasi step
pawn Код:
if (RegistrationStep[playerid] == 0 && gPlayerLogged[playerid] != 1)
    {
        ClearChatbox(playerid, 10);
        format(string, sizeof(string), "Welcome to Republic State Roleplay, Berjalan Dengan Versi %s", Version);
        SendClientMessage(playerid, COLOR_YELLOW1, string);
        SendClientMessage(playerid, COLOR_YELLOW2, " ");
        new message[] = "\t\t\t\t\t\t Republic State Roleplay Terms and Conditions \n\n\n\n\n\n 1- Server ini mengandung konten dewasa.\n\n 2- Server ini tidak boleh menggunakan program Ilegal atau program ketiga.";
        new message2[] = "\n\n 3- membaca ini berarti ada menyetujui semua /rules diserver ini jika kamu melanggar akan di kick atau dibanned.\n\n 4- By reading this you also agree that you will obey administrators ALWAYS, unless it breaks any term (1) (2) (3) (5).\n\n\n Press on 'Setuju' jika kamu setuju, 'Tolak' jika kamu menolak.";
        format(string, sizeof(string),"%s %s",message,message2);
        ShowPlayerDialog(playerid, 1244, DIALOG_STYLE_MSGBOX,"Republic State Roleplay Terms and Conditions",string,"Setuju","Tolak");
        SetPlayerJoinCam(playerid);
        //PlayerPlaySound(playerid, 1187, 0.0, 0.0, 0.0);
        PlayerInfo[playerid][pModel] = Peds[classid][0];

    }
    else
    {
        SpawnPlayer(playerid);
    }
    return false;
It`s can`t show you the area becouse you didn`t define which area to show.Just take a look.For this I am suggesting you this function https://sampwiki.blast.hk/wiki/Random take a look.
Reply
#3

How to?
Reply
#4

this correct ??
pawn Код:
public SetPlayerJoinCam(playerid)
{
    new randcamera = Random(1,4);
    switch(randcamera)
    {
        case 1: // Gym
        {
            SetPlayerVirtualWorld(playerid, 0);
            SetPlayerInterior(playerid, 0);
            Streamer_UpdateEx(playerid,2229.4968,-1722.0701,13.5625);
            SetPlayerPos(playerid,2211.1460,-1748.3909,-10.0);
            SetPlayerCameraPos(playerid,2211.1460,-1748.3909,29.3744);
            SetPlayerCameraLookAt(playerid,2229.4968,-1722.0701,13.5625);
        }
        case 2: // LSPD
        {
            SetPlayerVirtualWorld(playerid, 0);
            SetPlayerInterior(playerid, 0);
            Streamer_UpdateEx(playerid,1554.3381,-1675.5692,16.1953);
            SetPlayerPos(playerid,1514.7783,-1700.2913,-10.0);
            SetPlayerCameraPos(playerid,1514.7783,-1700.2913,36.7506);
            SetPlayerCameraLookAt(playerid,1554.3381,-1675.5692,16.1953);
        }
        case 3: // All Saints
        {
            SetPlayerVirtualWorld(playerid, 0);
            SetPlayerInterior(playerid, 0);
            Streamer_UpdateEx(playerid,1175.5581,-1324.7922,18.1610);
            SetPlayerPos(playerid, 1188.4574,-1309.2242,-10.0);
            SetPlayerCameraPos(playerid,1188.4574,-1309.2242,13.5625+6.0);
            SetPlayerCameraLookAt(playerid,1175.5581,-1324.7922,18.1610);
        }
        case 4: // Unity
        {
            SetPlayerVirtualWorld(playerid, 0);
            SetPlayerInterior(playerid, 0);
            Streamer_UpdateEx(playerid,1716.1129,-1880.0715,22.0264);
            SetPlayerPos(playerid,1716.1129,-1880.0715,-10.0);
            SetPlayerCameraPos(playerid,1755.0413,-1824.8710,20.2100);
            SetPlayerCameraLookAt(playerid,1716.1129,-1880.0715,22.0264);
        }
    }
    return 1;
}
Reply
#5

Ok.Cases are starting with 0 not with 1:
pawn Код:
public SetPlayerJoinCam(playerid)
{
    new randcamera = random(4);
    switch(randcamera)
    {
        case 0: // Gym
        {
            SetPlayerVirtualWorld(playerid, 0);
            SetPlayerInterior(playerid, 0);
            Streamer_UpdateEx(playerid,2229.4968,-1722.0701,13.5625);
            SetPlayerPos(playerid,2211.1460,-1748.3909,-10.0);
            SetPlayerCameraPos(playerid,2211.1460,-1748.3909,29.3744);
            SetPlayerCameraLookAt(playerid,2229.4968,-1722.0701,13.5625);
        }
        case 1: // LSPD
        {
            SetPlayerVirtualWorld(playerid, 0);
            SetPlayerInterior(playerid, 0);
            Streamer_UpdateEx(playerid,1554.3381,-1675.5692,16.1953);
            SetPlayerPos(playerid,1514.7783,-1700.2913,-10.0);
            SetPlayerCameraPos(playerid,1514.7783,-1700.2913,36.7506);
            SetPlayerCameraLookAt(playerid,1554.3381,-1675.5692,16.1953);
        }
        case 2: // All Saints
        {
            SetPlayerVirtualWorld(playerid, 0);
            SetPlayerInterior(playerid, 0);
            Streamer_UpdateEx(playerid,1175.5581,-1324.7922,18.1610);
            SetPlayerPos(playerid, 1188.4574,-1309.2242,-10.0);
            SetPlayerCameraPos(playerid,1188.4574,-1309.2242,13.5625+6.0);
            SetPlayerCameraLookAt(playerid,1175.5581,-1324.7922,18.1610);
        }
        case 3: // Unity
        {
            SetPlayerVirtualWorld(playerid, 0);
            SetPlayerInterior(playerid, 0);
            Streamer_UpdateEx(playerid,1716.1129,-1880.0715,22.0264);
            SetPlayerPos(playerid,1716.1129,-1880.0715,-10.0);
            SetPlayerCameraPos(playerid,1755.0413,-1824.8710,20.2100);
            SetPlayerCameraLookAt(playerid,1716.1129,-1880.0715,22.0264);
        }
    }
    return 1;
}
Try this.This should work.
Reply
#6

thanks, Rep for you
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)