Jump to content
  • 0

Bug coordonate 0, 0, 0


TheGodfather

Question

10 answers to this question

Recommended Posts

  • 0
15 hours ago, TheGodfather said:

Da, serverul merge bine

Daca modul de joc este facut de la 0, trebuie sa existe niste coordonate in public-ul OnPlayerSpawn. Du-te pe harta si salveaza o pozitie unde vrei sa fie spawn-ul, apoi pune in public-ul OnPlayerSpawn "SetPlayerPos(playerid, X, Y, Z);" X, Y si Z reprezentand coordonatele salvate de tine. Cand salvezi o pozitie, poti gasi coordonatele in "Documents\GTA San Andreas User Files\SAMP" si ai un fisier care se numeste "savedpositions.txt".

Sper ca am inteles corect problema ta si sa te ajute aceasta solutie. In cazul in care nu este solutia corecta si exista deja ceea ce ti-am zis in public-ul OnPlayerSpawn, poti spune si incercam sa gasim o alta solutie.

Link to comment
Share on other sites

  • 0

De obicei te da acolo cand te loghezi. Singura problema ar putea fi ca nu functioneaza cum trebuie functiile de la SetPlayerCameraLookAt, posibil ai schimbat ceva si acum nu iti mai arata deloc datorita unor greseli. Posibil e si bugat gamemode-ul in sine (din cate vad iti apar in kill-list joinurile) sau si faptul ca e posibil sa ai lag si sa nu execute serverul functiile cum trebuie. Unde e hostat serverul?

Link to comment
Share on other sites

  • 0
8 hours ago, TheGodfather said:

Gamemode-ul este cel editat de hpq123, b-hood. Nu am schimbat nimic la onplayerspawn, mergea bine dar dupa un timp ma da acolo aiurea

Ok, deci am inteles eu gresit problema. Te da la coordonatele 0, 0, 0 in momentul in care te autentifici, nu cand te spawnezi.

Atunci problema ar putea fi de la functia InterpolateCameraPos. Verifica sa vezi ce coordonate ai acolo sau daca iti lipseste aceasta functie de la OnPlayerRequestClass.

Link to comment
Share on other sites

  • 0

Astea sunt toate locurile in care apar cele 2 functii mentionate in ultimul mesaj scris de tine.

public OnPlayerRequestClass(playerid, classid) {
    if(IsPlayerLogged[playerid] == 1) SpawnPlayer(playerid);
    return true;
}

function ShowExam(playerid, type) {
    if(StepExam[playerid] == 0) {
        for(new i = 0; i < 13; i++) PlayerTextDrawShow(playerid, ExamTD[i]);
        SelectTextDraw(playerid, 0x52EF4AFF);
        TogglePlayerControllable(playerid, false);
        InterpolateCameraPos(playerid, 2637.850830, -985.842224, 111.864707, 2637.850830, -985.842224, 111.864707, 1000);
        InterpolateCameraLookAt(playerid, 2635.984130, -985.135314, 107.280380, 2633.261962, -984.218200, 110.722541, 1000);
        SetPlayerInterior(playerid, 0);
    }
    ExamTime[playerid] = 30;
    PlayerTextDrawSetString(playerid, ExamTD[4], "~b~00:30");
    switch(type) {
        case 0: {
            switch(StepExam[playerid]) {
                case 0: {
                    PlayerTextDrawSetString(playerid, ExamTD[6], "On who you can make DM? (1/5)");
                    PlayerTextDrawSetString(playerid, ExamTD[10], "1. No one.");
                    PlayerTextDrawSetString(playerid, ExamTD[11], "2. Cops.");
                    PlayerTextDrawSetString(playerid, ExamTD[12], "3. Everyone.");
                }
                case 1: {
                    PlayerTextDrawSetString(playerid, ExamTD[6], "What happens if you do C-Bug? (2/5)");
                    PlayerTextDrawSetString(playerid, ExamTD[10], "1. Nothing.");
                    PlayerTextDrawSetString(playerid, ExamTD[11], "2. I will be banned.");
                    PlayerTextDrawSetString(playerid, ExamTD[12], "3. I receive money.");
                }
                case 2: {
                    PlayerTextDrawSetString(playerid, ExamTD[6], "With what this license helps me? (3/5)");
                    PlayerTextDrawSetString(playerid, ExamTD[10], "1. Access to weapons.");
                    PlayerTextDrawSetString(playerid, ExamTD[11], "2. Nothing.");
                    PlayerTextDrawSetString(playerid, ExamTD[12], "3. I will be kicked.");
                }
                case 3: {
                    PlayerTextDrawSetString(playerid, ExamTD[6], "I can sell this license? (4/5)");
                    PlayerTextDrawSetString(playerid, ExamTD[10], "1. Yes.");
                    PlayerTextDrawSetString(playerid, ExamTD[11], "2. I can trade it.");
                    PlayerTextDrawSetString(playerid, ExamTD[12], "3. No.");
                }
                case 4: {
                    PlayerTextDrawSetString(playerid, ExamTD[6], "I can use weapons without this license? (5/5)");
                    PlayerTextDrawSetString(playerid, ExamTD[10], "1. No.");
                    PlayerTextDrawSetString(playerid, ExamTD[11], "2. Yes.");
                    PlayerTextDrawSetString(playerid, ExamTD[12], "3. I will be kicked.");
                }
                case 5: {
                    ExamHP[playerid] = 10;
                    SetCameraBehindPlayer(playerid);
                    TogglePlayerControllable(playerid, true);
                    for(new i = 0; i < 13; i++) PlayerTextDrawHide(playerid, ExamTD[i]);
                    SetPlayerPosEx(false, playerid, 291.5567,-135.8325,1004.0625);
                    CancelSelectTextDraw(playerid);
                    SetPlayerInterior(playerid, 7);
                    GivePlayerWeapon(playerid, 23, 10);
                    SCM(playerid, COLOR_LIGHTBLUE, "License: {FFFFFF}Destroy this box.");
                    ExamTime[playerid] = 0;
                }
            }
        }
        case 1: {
            switch(StepExam[playerid]) {
                case 0: {
                    PlayerTextDrawSetString(playerid, ExamTD[6], "What i can do with a boat license? (1/4)");
                    PlayerTextDrawSetString(playerid, ExamTD[10], "1. To swim.");
                    PlayerTextDrawSetString(playerid, ExamTD[11], "2. To fish.");
                    PlayerTextDrawSetString(playerid, ExamTD[12], "3. To drive a boat.");
                }
                case 1: {
                    PlayerTextDrawSetString(playerid, ExamTD[6], "where i am allowed to go? (2/4)");
                    PlayerTextDrawSetString(playerid, ExamTD[10], "1. Through LV.");
                    PlayerTextDrawSetString(playerid, ExamTD[11], "2. Through water.");
                    PlayerTextDrawSetString(playerid, ExamTD[12], "3. Through air.");
                }
                case 2: {
                    PlayerTextDrawSetString(playerid, ExamTD[6], "How i start a boat? (3/4)");
                    PlayerTextDrawSetString(playerid, ExamTD[10], "1. Pressing key '2'.");
                    PlayerTextDrawSetString(playerid, ExamTD[11], "2. Using /engine.");
                    PlayerTextDrawSetString(playerid, ExamTD[12], "3. It starts automatically.");
                }
                case 3: {
                    PlayerTextDrawSetString(playerid, ExamTD[6], "Are you allowed to take the boat on the dry land? (4/4)");
                    PlayerTextDrawSetString(playerid, ExamTD[10], "1. No.");
                    PlayerTextDrawSetString(playerid, ExamTD[11], "2. Maybe.");
                    PlayerTextDrawSetString(playerid, ExamTD[12], "3. Yes.");
                }
                case 4: {
                    SetCameraBehindPlayer(playerid);
                    TogglePlayerControllable(playerid, true);
                    for(new i = 0; i < 13; i++) PlayerTextDrawHide(playerid, ExamTD[i]);
                    SetPlayerInterior(playerid, false);
                    SetPlayerVirtualWorld(playerid, false);
                    ExamCar[playerid] = CreateVehicleEx(446, 2232.7983,411.4962,-0.5455,316.5272, 1, 1, -1, 0);
                    Gas[ExamCar[playerid]] = 100;
                    ExamTime[playerid] = 0;
                    CancelSelectTextDraw(playerid);
                    CP[playerid] = 120;
                    SetPlayerRaceCheckpointEx(playerid, 0, DMVBOAT[CP[playerid]-120][0], DMVBOAT[CP[playerid]-120][1], DMVBOAT[CP[playerid]-120][2], DMVBOAT[CP[playerid]-120][0], DMVBOAT[CP[playerid]-120][1], DMVBOAT[CP[playerid]-120][2], 10.0);
                    new engine,lights,alarm,bonnet,boot,objective;
                    SetVehicleParamsEx(ExamCar[playerid],engine,lights,alarm,1,bonnet,boot,objective);
                    PutPlayerInVehicleEx(playerid, ExamCar[playerid], 0);
                }
            }            
        }
    }
    return 1;

function Camera(playerid) {
    InterpolateCameraPos(playerid, 2206.400146, 2485.206787, 104.116271, 2065.331054, 2227.627197, 63.345684, 40000);
    InterpolateCameraLookAt(playerid, 2203.034667, 2482.306396, 101.822631, 2067.583007, 2231.956542, 62.256824, 40100);
    SetPlayerPosEx(false, playerid, 2269.6230, -74.9329, 26.7724);
    SetPlayerVirtualWorld(playerid, 9999);
    return true;
}

Link to comment
Share on other sites

  • 0
2 hours ago, TheGodfather said:

public OnPlayerRequestClass(playerid, classid) {
    if(IsPlayerLogged[playerid] == 1) SpawnPlayer(playerid);
    return true;
}

Exact ce ziceam, nu ai InterpolateCameraPos / InterpolateCameraLookAt sau SetPlayerCameraPos / SetPlayerCameraLookAt in public-ul OnPlayerRequestClass.

Incearca sa descarci cameditor (din cate imi aduc aminte, ai deja in filterscripts acel cameditor, daca zici ca este gamemode-ul lui HPQ123) si sa salvezi o pozitie a camerei, apoi pune ceea ce ti-a salvat la OnPlayerRequestClass.

Edited by S0NNIX
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.