Jump to content

Problema comanda de teleportare


FeVosFeR

Recommended Posts

Am:

Spoiler

CMD:go(playerid, params[])
{
    if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to log in first.");
    if(PlayerInfo[playerid][pAdmin] > 0)
    {
        new name[30];
        ShowPlayerDialog(playerid, DIALOG_GO, DIALOG_STYLE_LIST, "SERVER: Teleport Locations", "HQ Locations\nHouse Interiors\nRace Tracks\nPopular Locations\nGym Interiors\nOther", "Select", "Cancel");
        GetPlayerName(playerid, name, sizeof(name));
    }
    return 1;
}

si

Spoiler

    if(dialogid == DIALOG_GO)
    {
        if(response)
        {
            switch(listitem)
            {
                case 0: ShowPlayerDialog(playerid, DIALOG_GO3, DIALOG_STYLE_LIST, "SERVER: HQ Locations", "Los Santos Police Departament\nFederal Bureau Of Investigation\nNational Guard\nLos Aztecas\nGrove Street\nLos Vagos\nLas Venturas Police Departament\nNews Reporters\nBallas\nHitman Agency\nSchool Instructors\nTaxi Los Santos\nParamedic Las Venturas", "Select", "Cancel");
                case 1: ShowPlayerDialog(playerid, DIALOG_GO2, DIALOG_STYLE_LIST, "SERVER: Race Tracks", "Dirt Track\nVice Stadium\nBloodbowl Stadium\n8-Track Stadium\nKickstart Stadium", "Select", "Cancel");
                case 2: ShowPlayerDialog(playerid, DIALOG_GO1, DIALOG_STYLE_LIST, "SERVER: House Interiors", "Madd Doggs'\nCJ's House\nRyder's House\nTiger Skin Brothel\nColonel Fuhrberger's\nCrack Den\nDenise's Room\nKatie's Room", "Select", "Cancel");
                case 3: ShowPlayerDialog(playerid, DIALOG_GO4, DIALOG_STYLE_LIST, "SERVER: Popular Locations", "Bank (exterior)\nGym (exterior)\nAll Saints Hospital\nCounty General Hospital\nNewbie Spawn\n", "Select", "Cancel");
                case 4: ShowPlayerDialog(playerid, DIALOG_GO6, DIALOG_STYLE_LIST, "SERVER: Gym Interiors", "Ganton Gym (LS)\nCobra Martial Arts (SF)\nBelow the Belt Gym (LV)", "Select", "Cancel");
                case 5: ShowPlayerDialog(playerid, DIALOG_GO5, DIALOG_STYLE_LIST, "SERVER: Other Locations", "RC Battlefield\nArea 69\nWarehouse 1\nWarehouse 2\nMeat Factory\nSherman Dam\n", "Select", "Cancel");
            }
        }
        return 1;
    }
    if(dialogid == DIALOG_GO1)
    {
        if(response)
        {
            switch(listitem)
            {
                case 0: {
                    SetPlayerVirtualWorld(playerid, 0);
                    SetPlayerInterior(playerid, 5);
                    SetPlayerPos(playerid, 1267.663208, -781.323242, 1091.906250);
                }
                case 1: {
                    SetPlayerVirtualWorld(playerid, 0);
                    SetPlayerInterior(playerid, 3);
                    SetPlayerPos(playerid, 2496.049804, -1695.238159, 1014.742187);
                }
                case 2: {
                    SetPlayerVirtualWorld(playerid, 0);
                    SetPlayerInterior(playerid, 2);
                    SetPlayerPos(playerid, 2454.717041, -1700.871582, 1013.515197);
                }
                case 3: {
                    SetPlayerVirtualWorld(playerid, 0);
                    SetPlayerInterior(playerid, 3);
                    SetPlayerPos(playerid, 964.106994, -53.205497, 1001.124572);
                }
                case 4: {
                    SetPlayerVirtualWorld(playerid, 0);
                    SetPlayerInterior(playerid, 8);
                    SetPlayerPos(playerid, 2807.619873, -1171.899902, 1025.570312);
                }
                case 5: {
                    SetPlayerVirtualWorld(playerid, 0);
                    SetPlayerInterior(playerid, 5);
                    SetPlayerPos(playerid, 318.564971, 1118.209960, 1083.882812);
                }
                case 6: {
                    SetPlayerVirtualWorld(playerid, 0);
                    SetPlayerInterior(playerid, 1);
                    SetPlayerPos(playerid, 244.411987, 305.032989, 999.148437);
                }
                case 7: {
                    SetPlayerVirtualWorld(playerid, 0);
                    SetPlayerInterior(playerid, 2);
                    SetPlayerPos(playerid, 271.884979, 306.631988, 999.148437);
                }
            }
        }
    }
    if(dialogid == DIALOG_GO2)
    {
        if(response)
        {
            switch(listitem)
            {
                case 0: {
                    SetPlayerVirtualWorld(playerid, 0);
                    SetPlayerInterior(playerid, 4);
                    SetPlayerPos(playerid, -1444.645507, -664.526000, 1053.572998);
                }
                case 1: {
                    SetPlayerVirtualWorld(playerid, 0);
                    SetPlayerInterior(playerid, 1);
                    SetPlayerPos(playerid, -1401.829956, 107.051300, 1032.273437);
                }
                case 2: {
                    SetPlayerVirtualWorld(playerid, 0);
                    SetPlayerInterior(playerid, 15);
                    SetPlayerPos(playerid, -1398.103515, 937.631164, 1036.479125);
                }
                case 3: {
                    SetPlayerVirtualWorld(playerid, 0);
                    SetPlayerInterior(playerid, 7);
                    SetPlayerPos(playerid, -1398.065307, -217.028900, 1051.115844);
                }
                case 4: {
                    SetPlayerVirtualWorld(playerid, 0);
                    SetPlayerInterior(playerid, 14);
                    SetPlayerPos(playerid, -1465.268676, 1557.868286, 1052.531250);
                }
            }
        }
    }
    if(dialogid == DIALOG_GO3)
    {
        if(response)
        {
            switch(listitem)
            {
                case 0: {
                    SetPlayerVirtualWorld(playerid, 0);
                    SetPlayerInterior(playerid, 0);
                    SetPlayerPos(playerid, 1554.7621, -1675.5870, 16.1953);
                }
                case 1: {
                    SetPlayerVirtualWorld(playerid, 0);
                    SetPlayerInterior(playerid, 0);
                    SetPlayerPos(playerid, 627.6160, -571.7920, 17.6242);
                }
                case 2: {
                    SetPlayerVirtualWorld(playerid, 0);
                    SetPlayerInterior(playerid, 0);
                    SetPlayerPos(playerid, 1654.0095, -1654.7570, 22.5156);
                }
                case 3: {
                    SetPlayerVirtualWorld(playerid, 0);
                    SetPlayerInterior(playerid, 0);
                    SetPlayerPos(playerid, 1456.7423, 2773.3423, 10.8203);
                }
                case 4: {
                    SetPlayerVirtualWorld(playerid, 0);
                    SetPlayerInterior(playerid, 0);
                    SetPlayerPos(playerid, 2495.3271, -1690.6740, 14.7656);
                }
                case 5: {
                    SetPlayerVirtualWorld(playerid, 0);
                    SetPlayerInterior(playerid, 0);
                    SetPlayerPos(playerid, 725.6769, -1440.4506, 13.5391);
                }
                case 6: {
                    SetPlayerVirtualWorld(playerid, 0);
                    SetPlayerInterior(playerid, 0);
                    SetPlayerPos(playerid, 2287.1047, 2431.7996, 10.8203);
                }
                case 7; {
                    SetPlayerVirtualWorld(playerid, 0);
                    SetPlayerInterior(playerid, 0);
                    SetPlayerPos(playerid, -329.5258, 1536.7759, 76.6117);
                }
                case 8: {
                    SetPlayerVirtualWorld(playerid, 0);
                    SetPlayerInterior(playerid, 0);
                    SetPlayerPos(playerid, 1455.2687, 750.8684, 11.0234);
                }
                case 9: {
                    SetPlayerVirtualWorld(playerid, 0);
                    SetPlayerInterior(playerid, 0);
                    SetPlayerPos(playerid, 1081.1794, -345.3979, 73.9825);
                }
                case 10: {
                    SetPlayerVirtualWorld(playerid, 0);
                    SetPlayerInterior(playerid, 0);
                    SetPlayerPos(playerid, 2435.3064, 1671.0139, 10.8203);
                }
                case 11: {
                    SetPlayerVirtualWorld(playerid, 0);
                    SetPlayerInterior(playerid, 0);
                    SetPlayerPos(playerid, 1754.4260, -1894.0844, 13.5569);
                }
                case 12: {
                    SetPlayerVirtualWorld(playerid, 0);
                    SetPlayerInterior(playerid, 0);
                    SetPlayerPos(playerid, 1614.92480, 1816.09631, 10.91310);
                }
            }
        }
    }
    if(dialogid == DIALOG_GO4)
    {
        if(response)
        {
            switch(listitem)
            {
                case 0: {
                    SetPlayerVirtualWorld(playerid, 0);
                    SetPlayerInterior(playerid, 0);
                    SetPlayerPos(playerid, 595.5443,-1250.3405,18.2836);
                }
                case 1: {
                    SetPlayerVirtualWorld(playerid, 0);
                    SetPlayerInterior(playerid, 0);
                    SetPlayerPos(playerid, 2222.6714, -1724.8436, 13.5625);
                }
                case 2: {
                    SetPlayerVirtualWorld(playerid, 0);
                    SetPlayerInterior(playerid, 0);
                    SetPlayerPos(playerid, 1172.359985, -1323.313110, 15.402919);
                }
                case 3: {
                    SetPlayerVirtualWorld(playerid, 0);
                    SetPlayerInterior(playerid, 0);
                    SetPlayerPos(playerid, 2034.196166, -1402.591430, 17.295030);
                }
                case 4: {
                    SetPlayerVirtualWorld(playerid, 0);
                    SetPlayerInterior(playerid, 0);
                    SetPlayerPos(playerid, 738.9963, -1417.2211, 13.5234);
                }
            }
        }
    }
    if(dialogid == DIALOG_GO5)
    {
        if(response)
        {
            switch(listitem)
            {
                case 0: {
                       SetPlayerVirtualWorld(playerid, 0);
                    SetPlayerInterior(playerid, 10);
                    SetPlayerPos(playerid, -975.975708, 1060.983032, 1345.671875);
                }
                case 1: {
                       SetPlayerVirtualWorld(playerid, 0);
                    SetPlayerInterior(playerid, 0);
                    SetPlayerPos(playerid, 223.431976, 1872.400268, 13.734375);
                }
                case 2: {
                    SetPlayerVirtualWorld(playerid, 0);
                    SetPlayerInterior(playerid, 1);
                    SetPlayerPos(playerid, 1412.639892, -1.787510, 1000.924377);
                 }
                case 3: {
                    SetPlayerVirtualWorld(playerid, 0);
                    SetPlayerInterior(playerid, 18);
                    SetPlayerPos(playerid, 1302.519897, -1.787510, 1001.028259);
                }
                case 4: {
                    SetPlayerVirtualWorld(playerid, 0);
                    SetPlayerInterior(playerid, 1);
                    SetPlayerPos(playerid, 963.418762, 2108.292480, 1011.030273);
                }
                case 5: {
                    SetPlayerVirtualWorld(playerid, 0);
                    SetPlayerInterior(playerid, 17);
                    SetPlayerPos(playerid, -959.564392, 1848.576782, 9.000000);
                }
            }
        }
    }
    if(dialogid == DIALOG_GO6)
    {
        if(response)
        {
            switch(listitem)
            {
                case 0: {
                    SetPlayerVirtualWorld(playerid, 0);
                    SetPlayerInterior(playerid, 5);
                    SetPlayerPos(playerid, 772.111999, -3.898649, 1000.728820);
                }
                case 1: {
                       SetPlayerVirtualWorld(playerid, 0);
                    SetPlayerInterior(playerid, 6);
                    SetPlayerPos(playerid, 774.213989, -48.924297, 1000.585937);
                }
                case 2: {
                    SetPlayerVirtualWorld(playerid, 0);
                    SetPlayerInterior(playerid, 7);
                    SetPlayerPos(playerid, 773.579956, -77.096694, 1000.655029);
                }
            }
        }
    }

Cand dau COMPILE imi da STOP WORKING pawno. Eu am modificat doar DIALOG_GO3 si am adaugat case-uri.

HELP ME VA ROG! 

Link to comment
Share on other sites

Singura problema pe care o vad cu codul tau e  la case 0 de la DIALOG_GO care e posibil sa intre in 

error 075: input line too long (after substitutions)

Desi nu vad de ce ti-ar da crash

O solutie ar fi sa folosesti acest compilator  pentru ca are multe buguri rezolvate: https://github.com/pawn-lang/compiler/releases/download/v3.10.8/pawnc-3.10.8-windows.zip bagi cele 3 fisiere in folderul pawno

pawn.cfg

Si pawn.cfg tot in folderul pawno

Link to comment
Share on other sites

2 hours ago, Banditul said:

Singura problema pe care o vad cu codul tau e  la case 0 de la DIALOG_GO care e posibil sa intre in 


error 075: input line too long (after substitutions)

Desi nu vad de ce ti-ar da crash

O solutie ar fi sa folosesti acest compilator  pentru ca are multe buguri rezolvate: https://github.com/pawn-lang/compiler/releases/download/v3.10.8/pawnc-3.10.8-windows.zip bagi cele 3 fisiere in folderul pawno

pawn.cfg

Si pawn.cfg tot in folderul pawno

Acum cand dau ''Compile'' da eroare la fiecare linie de pe GameMode =]]]

Nici marimea nu e de vina...

Edited by FeVosFeR
Link to comment
Share on other sites

if(dialogid == DIALOG_GO)
    {
        if(response)
        {
            switch(listitem)
            {
                case 0: 
                {
                    new string[255];
                    strcat(string, "Los Santos Police Departament\nFederal Bureau Of Investigation\nNational Guard\nLos Aztecas\n", sizeof(string));
                    strcat(string, "Grove Street\nLos Vagos\nLas Venturas Police Departament\nNews Reporters\nBallas\nHitman Agency\nSchool Instructors\nTaxi Los Santos\nParamedic Las Venturas", sizeof(string));
                    ShowPlayerDialog(playerid, DIALOG_GO3, DIALOG_STYLE_LIST, "SERVER: HQ Locations", string, "Select", "Cancel");
                }
                case 1: ShowPlayerDialog(playerid, DIALOG_GO2, DIALOG_STYLE_LIST, "SERVER: Race Tracks", "Dirt Track\nVice Stadium\nBloodbowl Stadium\n8-Track Stadium\nKickstart Stadium", "Select", "Cancel");
                case 2: ShowPlayerDialog(playerid, DIALOG_GO1, DIALOG_STYLE_LIST, "SERVER: House Interiors", "Madd Doggs'\nCJ's House\nRyder's House\nTiger Skin Brothel\nColonel Fuhrberger's\nCrack Den\nDenise's Room\nKatie's Room", "Select", "Cancel");
                case 3: ShowPlayerDialog(playerid, DIALOG_GO4, DIALOG_STYLE_LIST, "SERVER: Popular Locations", "Bank (exterior)\nGym (exterior)\nAll Saints Hospital\nCounty General Hospital\nNewbie Spawn\n", "Select", "Cancel");
                case 4: ShowPlayerDialog(playerid, DIALOG_GO6, DIALOG_STYLE_LIST, "SERVER: Gym Interiors", "Ganton Gym (LS)\nCobra Martial Arts (SF)\nBelow the Belt Gym (LV)", "Select", "Cancel");
                case 5: ShowPlayerDialog(playerid, DIALOG_GO5, DIALOG_STYLE_LIST, "SERVER: Other Locations", "RC Battlefield\nArea 69\nWarehouse 1\nWarehouse 2\nMeat Factory\nSherman Dam\n", "Select", "Cancel");
            }
        }
        return 1;
    }

Asta ar fi o modalitate.  Desi e foarte ciudat ca iti da crash, altceva inafara de asta n-am vazut(lipsa de paranteze, acoalde prost puse etc). si esti sigur ca aia e toata conmanda de go? Pentru ca vad ca ai definit variabila name, ai luat numele dar nu faci absolut nimic cu ele

Si faptul ca iti da erori cand incerci sa folosesti acel compilator inseamna ca ai niste probleme prin  gm pentru ca fata de compilatorul normal asta adauga pe langa viteza de compilare si verificari suplimentare

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
Reply to this topic...

×   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.