[Help] SetPlayerCameraPos
#1

pawn Код:
public ChangeCameraPos(playerid) {
    //PlayerPlaySound(playerid, NEWBIE_SOUND, 0, 0, 0);
    switch(PlayerData[playerid][CharSection]) {
        \case 0: {
            SetPlayerCameraPos(playerid, 1251.4520,-1532.6771,65.3674);
            SetPlayerCameraLookAt(playerid, 1251.4520,-1532.6771,65.3674);
        }
        case 1: {
            SetPlayerCameraPos(playerid, 1359.8655,-1369.7157,51.0468);
            SetPlayerCameraLookAt(playerid, 1328.4507,-1305.0004,52.1333);
        }
        case 2: {
            SetPlayerCameraPos(playerid, 1325.9688,-1292.2819,52.7100);
            SetPlayerCameraLookAt(playerid, 1361.1189,-1279.2610,19.1288);
        }
        case 3: {
            SetPlayerCameraPos(playerid, 1362.2842,-1271.0098,30.1774);
            SetPlayerCameraLookAt(playerid, 1333.0168,-1238.1396,51.9701);
        }
        case 4: {
            SetPlayerCameraPos(playerid, 1269.0106,-1220.9059,52.3422);
            SetPlayerCameraLookAt(playerid, 1210.0986,-1312.1886,52.3422);
        }
        case 5: {
            SetPlayerCameraPos(playerid, 1165.7990,-1335.6470,52.4943);
            SetPlayerCameraLookAt(playerid,1126.0809,-1391.8074,52.7647);
        }
        case 6: {
            SetPlayerCameraPos(playerid, 1126.0996,-1392.4324,53.2352);
            SetPlayerCameraLookAt(playerid,1128.8578,-1484.7311,30.3264);
            KillTimer(TimerData[CharacterTimer]);\
            ShowPlayerDialog(playerid,DIALOG_SEX,DIALOG_STYLE_MSGBOX,"Sex","Tutorial [1/2]\n\nSelect your sex.","Male","Female");
        }
        \case 7: {
            SetPlayerCameraPos(playerid, 1129.0856,-1490.1184,22.7690);
            SetPlayerCameraLookAt(playerid,1126.3595,-1524.8308,37.9895);
        }
        case 8: {
            SetPlayerCameraPos(playerid, 1127.3058,-1582.8749,39.0475);
            SetPlayerCameraLookAt(playerid,1118.9020,-1618.4146,23.2062);
        }
        case 9: {
            SetPlayerCameraPos(playerid, 1114.6967,-1618.6840,23.6799);
            SetPlayerCameraLookAt(playerid,1099.9460,-1618.8319,17.2066);
        }
        case 10: {
            SetPlayerCameraPos(playerid, 1047.2883,-1618.9766,14.9827);
            SetPlayerCameraLookAt(playerid,1042.3197,-1619.1023,15.7392);
        }
        case 11: {
            SetPlayerCameraPos(playerid, 1038.8868,-1683.5524,16.0992);
            SetPlayerCameraLookAt(playerid,1079.1548,-1755.8051,16.2016);
        }
        case 12: {
            SetPlayerCameraPos(playerid, 1080.2899,-1757.2166,16.7763);
            SetPlayerCameraLookAt(playerid,1113.8271,-1789.5876,35.4530);
        }
        case 13: {
            SetPlayerCameraPos(playerid, 1120.2208,-1794.1539,35.9443);
            SetPlayerCameraLookAt(playerid,1549.9337,-1360.5562,337.9000);
            KillTimer(TimerData[CharacterTimer]); \
            ShowPlayerDialog(playerid,DIALOG_RULES,DIALOG_STYLE_MSGBOX,"Sex","Tutorial [2/2]\n\nYou've made your character.\nThank you for registering.\n\n- Make sure you have your hacks turned off\n- If you wan't DM, go to a DM server.","Accept","Cancel");
        }
        case 14: {
            SetPlayerCameraPos(playerid, 1546.6477,-1356.6077,362.7994);
            SetPlayerCameraLookAt(playerid,1597.5997,-1610.1779,295.3549);
        }
        case 15: {
            SetPlayerCameraPos(playerid, 1881.0586,-1832.7437,101.6864);
            SetPlayerCameraLookAt(playerid,1981.1537,-1962.5801,16.2211);
            SetPlayerPos(playerid, 246.4072,2581.2532,63.5703);    
            SendNPCMessage(playerid, "Train driver", "We are at Los Santos! Everyone board off!");
            SetPlayerFacingAngle(playerid, 350.5531);
            SetPlayerSkin(playerid, NEWBIE_SKIN);
            SetPlayerVirtualWorld(playerid, 0);
        }
        case 16: {
            TogglePlayerControllable(playerid, 1);
            SpawnPlayer(playerid);
            SetPlayerSkin(playerid, NEWBIE_SKIN);
            SetPlayerPos(playerid, 246.4072,2581.2532,63.5703);
            SetCameraBehindPlayer(playerid);
            KillTimer(TimerData[CharacterTimer]);
            AccountData[playerid][Reg] = 1;
            SaveAccount(playerid);
        }
    }
    PlayerData[playerid][CharSection] ++;
}

public ChangeCameraPosEx(playerid) {
    PlayerPlaySound(playerid, 1058, 0, 0, 0);
    switch(PlayerData[playerid][CharSection]) {
        case 0: {
            SetPlayerCameraPos(playerid, 1251.4520,-1532.6771,65.3674);
            SetPlayerCameraLookAt(playerid, 1251.4520,-1532.6771,65.3674);
        }
        case 1: {
            SetPlayerCameraPos(playerid, 1359.8655,-1369.7157,51.0468);
            SetPlayerCameraLookAt(playerid, 1328.4507,-1305.0004,52.1333);
        }
        case 2: {
            SetPlayerCameraPos(playerid, 1325.9688,-1292.2819,52.7100);
            SetPlayerCameraLookAt(playerid, 1361.1189,-1279.2610,19.1288);
        }
        case 3: {
            SetPlayerCameraPos(playerid, 1362.2842,-1271.0098,30.1774);
            SetPlayerCameraLookAt(playerid, 1333.0168,-1238.1396,51.9701);
        }
        case 4: {
            SetPlayerCameraPos(playerid, 1269.0106,-1220.9059,52.3422);
            SetPlayerCameraLookAt(playerid, 1210.0986,-1312.1886,52.3422);
        }
        case 5: {
            SetPlayerCameraPos(playerid, 1165.7990,-1335.6470,52.4943);
            SetPlayerCameraLookAt(playerid,1126.0809,-1391.8074,52.7647);
        }
        case 6: {
            SetPlayerCameraPos(playerid, 1126.0996,-1392.4324,53.2352);
            SetPlayerCameraLookAt(playerid,1128.8578,-1484.7311,30.3264);
        }
        case 7: {
            SetPlayerCameraPos(playerid, 1129.0856,-1490.1184,22.7690);
            SetPlayerCameraLookAt(playerid,1126.3595,-1524.8308,37.9895);
        }
        case 8: {
            SetPlayerCameraPos(playerid, 1127.3058,-1582.8749,39.0475);
            SetPlayerCameraLookAt(playerid,1118.9020,-1618.4146,23.2062);
        }
        case 9: {
            SetPlayerCameraPos(playerid, 1114.6967,-1618.6840,23.6799);
            SetPlayerCameraLookAt(playerid,1099.9460,-1618.8319,17.2066);
        }
        case 10: {
            SetPlayerCameraPos(playerid, 1047.2883,-1618.9766,14.9827);
            SetPlayerCameraLookAt(playerid,1042.3197,-1619.1023,15.7392);
        }
        case 11: {
            SetPlayerCameraPos(playerid, 1038.8868,-1683.5524,16.0992);
            SetPlayerCameraLookAt(playerid,1079.1548,-1755.8051,16.2016);
        }
        case 12: {
            SetPlayerCameraPos(playerid, 1080.2899,-1757.2166,16.7763);
            SetPlayerCameraLookAt(playerid,1113.8271,-1789.5876,35.4530);
        }
        case 13: {
            SetPlayerCameraPos(playerid, 1120.2208,-1794.1539,35.9443);
            SetPlayerCameraLookAt(playerid,1549.9337,-1360.5562,337.9000);
        }
        case 14: {
            SetPlayerCameraPos(playerid, 1546.6477,-1356.6077,362.7994);
            SetPlayerCameraLookAt(playerid,1597.5997,-1610.1779,295.3549);
        }
        case 15: {
            SetPlayerCameraPos(playerid, 1881.0586,-1832.7437,101.6864);
            SetPlayerCameraLookAt(playerid,1981.1537,-1962.5801,16.2211);
            SetPlayerPos(playerid, 246.4072,2581.2532,63.5703);
            SetPlayerFacingAngle(playerid, 350.5531);
        }
        case 16: {
            PlayerData[playerid][CharSection] = -1;
        }
    }
    PlayerData[playerid][CharSection] ++;
}

Can you rewrite this so it only does
(not All those camera positions)

And Spawns you


pawn Код:
ShowPlayerDialog(playerid,DIALOG_SEX,DIALOG_STYLE_MSGBOX,"Sex","Tutorial [1/2]\n\nSelect your sex.","Male","Female");

ShowPlayerDialog(playerid,DIALOG_RULES,DIALOG_STYLE_MSGBOX,"Sex","Tutorial [2/2]\n\nYou've made your character.\nThank you for registering.\n\n- Make sure you have your hacks turned off\n- If you wan't DM, go to a DM server.","Accept","Cancel");

Reason i ask for help i am not sure about all those Cases after you already spawn?
Reply
#2

This is some kind of a tutorial? And you want to skip it?
Reply
#3

Join this 173.0.60.226:7778 you can see
I dont want all the cameras moving everywhere i only want the

pawn Код:
ShowPlayerDialog(playerid,DIALOG_SEX,DIALOG_STYLE_MSGBOX,"Sex","Tutorial [1/2]\n\nSelect your sex.","Male","Female");

ShowPlayerDialog(playerid,DIALOG_RULES,DIALOG_STYLE_MSGBOX,"Sex","Tutorial [2/2]\n\nYou've made your character.\nThank you for registering.\n\n- Make sure you have your hacks turned off\n- If you wan't DM, go to a DM server.","Accept","Cancel");
And for you to spawn
Reply
#4

Where do you call ChangeCameraPos ?
Reply
#5

Where do i call?
Reply
#6

Quote:
Originally Posted by farmer1710
Посмотреть сообщение
Where do i call?
Reply
#7

xD i am new to scripting Trying to learn
Reply
#8

Quote:
Originally Posted by farmer1710
Посмотреть сообщение
Where do i call?
In other words, find and show us all the places in your script that have the word 'ChangeCameraPos'
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)