[Pomoc] Dialog

Započeo Ante_Dracar aka Lopa, Avgust 25, 2010, 18:15:43 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

evo nije mi jasno napravio sam dialog dakle evo sta ja sad upisem /map pojavi mi se dialog kliknem na policija i nece da mi se pojavi cp na policiji,molim pomoc...
if(strcmp(cmd, "/map", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
            new x_nr[256];
        x_nr = strtok(cmdtext, idx);
            if(!strlen(x_nr)) {
                ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Gradska vijecnica", "vjecnica \npolicija", "U redu", "Odustani");
return 1;
}
else if(strcmp(x_nr,"vijecnica",true) == 0)
{
                CP[playerid] = 81;
        SetPlayerCheckpoint(playerid, -1494.2909,919.9765,7.1875,7.0);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Odabir: Gradska Vijecnica");
}
else if(strcmp(x_nr,"policija",true) == 0)
{
                CP[playerid] = 82;
        SetPlayerCheckpoint(playerid, -1605.6317,711.7258,13.8672,7.0);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Odabir: Policijska Stanica");
}
else if(strcmp(x_nr,"banka",true) == 0)
{
                CP[playerid] = 83;
        SetPlayerCheckpoint(playerid, -2352.5420,493.4432,30.8402,7.0);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Odabir: Zagrebacka banka");
}
            else if(strcmp(x_nr,"ilegalniposlovi",true) == 0)
{
                CP[playerid] = 84;
        SetPlayerCheckpoint(playerid, -2389.3999,2370.3818,3.5923,7.0);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Odabir: Ilegali Poslovi");
            }
            else if(strcmp(x_nr,"sfinterspar",true) == 0)
{
                CP[playerid] = 85;
                SetPlayerCheckpoint(playerid, -2442.9116,752.9581,35.1719,7.0);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Odabir: San Fierro Interspar");
}
else if(strcmp(x_nr,"bsinterspar",true) == 0)
{
                CP[playerid] = 86;
        SetPlayerCheckpoint(playerid, -2491.2778,2363.1719,10.2725,7.0);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Odabir: San Fierro Bay Side Interspar");
}
else if(strcmp(x_nr,"paintball",true) == 0)
{
                CP[playerid] = 87;
        SetPlayerCheckpoint(playerid, -2026.568237,-101.364898,35.164100,7.0);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Odabir: Gradska Paintball arena");
            }
            else if(strcmp(x_nr,"polaganje",true) == 0)
{
                CP[playerid] = 88;
        SetPlayerCheckpoint(playerid, -2029.6514,-121.2742,35.1779,7.0);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Odabir: Gradska Paintball arena");
            }
else if(strcmp(x_nr,"sfjahf",true) == 0)
{
                CP[playerid] = 89;
        SetPlayerCheckpoint(playerid, -1704.5482,785.7136,25.2998,7.0);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Odabir: Gradski Casino");
}
else if(strcmp(x_nr,"jizzys",true) == 0)
{
                CP[playerid] = 90;
        SetPlayerCheckpoint(playerid, -2624.4346,1412.1604,7.0938,7.0);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Odabir: Jizzy`s Club");
}
    else if(strcmp(x_nr,"bar",true) == 0)
{
                CP[playerid] = 91;
        SetPlayerCheckpoint(playerid, -1978.0576,84.7796,27.6889,7.0);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Odabir: Classic Rock Bar");
}
else if(strcmp(x_nr,"burger",true) == 0)
{
                CP[playerid] = 92;
        SetPlayerCheckpoint(playerid, -1911.4158,828.9231,35.1719,7.0);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Odabir: Burger Shot");
}
else if(strcmp(x_nr,"pizza",true) == 0)
{
                CP[playerid] = 93;
        SetPlayerCheckpoint(playerid, -1807.8591,944.9744,24.8906,7.0);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Odabir: Well Stacked Pizza");
}
else if(strcmp(x_nr,"cluckinbell",true) == 0)
{
                CP[playerid] = 94;
        SetPlayerCheckpoint(playerid, -1816.3649,617.0126,35.1719,7.0);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Odabir: Cluckin Bell");
        }
else if(strcmp(x_nr,"krafna",true) == 0)
{
                CP[playerid] = 95;
        SetPlayerCheckpoint(playerid, -2767.3848,788.8003,52.7813,7.0);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Odabir: Slasticarnica Krafnic");
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "Nema tog mjesta na listi.");
return 1;
}
    }
    return 1;
}


hvala unaprjed...

ovo ti ide pod public OnPlayerCommand

if(strcmp(cmd, "/map", true) == 0)
   {
       if(IsPlayerConnected(playerid))
       {
            new x_nr[256];
           x_nr = strtok(cmdtext, idx);
            if(!strlen(x_nr)) {
                ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Gradska vijecnica", "vjecnica \npolicija", "U redu", "Odustani");
            return 1;
         }


a ostalo ti ide pod public OnDialogResponse


ne "valjda", nego tako mora ic. drugacije ne ide s dialozima.