Help with Dialog
#1

This is Command
Код:
if(strcmp(cmd, "/gorivo", true) == 0)
    {
        if(Veh == 292||Veh == 293||Veh == 294||Veh == 295||Veh == 296||Veh == 297||Veh == 298||Veh == 299||Veh == 300)
        {
           if(PlayerInfo[playerid][pJob] == 1)
          {
                if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 301 || IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)) != 302 || IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)) != 303 || IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)) != 304 || IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)) != 305)
                {
                      SendClientMessage(playerid, COLOR_GREY, "Nemas Zakacenu prikolicu za razvoz goriva!");
		   			  return 1;
                }
             if(PlayerInfo[playerid][pJob] == 18)
             {
                       SendClientMessage(playerid,COLOR_YELLOW,"GAZDA:Odaberi rutu i kreci sa poslom!");
                       ShowPlayerDialog(playerid, 5555, DIALOG_STYLE_LIST, "Prijevoz Goriva","Los Santos>Benzinske\nLS Rafinerija>SF Gradiliste\nLos Santos>San Francisco>Las Venturas", "Uredu", "Odustani");
             }
             else
             {
                  	SendClientMessage(playerid, COLOR_GREY, "Vec imas aktiviran razvoz goriva!");
                    return 1;
               }
          }
       }
       return 1;
    }
	if(strcmp(cmd, "/Sljunak", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
          if(Veh == 299 || Veh == 300 || Veh == 292 || Veh == 293 || Veh == 294 || Veh == 245 || Veh == 296 ||  Veh == 297 ||  Veh == 298 ||  Veh == 296)
          {
                if(PlayerInfo[playerid][pJob] == 1)
                {
                      SendClientMessage(playerid, COLOR_GREY, "Nemas Posao kamiondije!");
		   			  return 1;
                }
             if(PlayerInfo[playerid][pJob] == 18)
             {
						if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 306 || IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)) != 307 || IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)) != 308)
					   SendClientMessage(playerid,COLOR_YELLOW,"GAZDA:Odaberi rutu i kreci sa poslom!");
                       ShowPlayerDialog(playerid, 5556, DIALOG_STYLE_LIST, "Prijevoz Sljunka","Los Santos>Kamenolom\nCementara>Kamenolom\nKamenolom>Los Santos", "Uredu", "Odustani");
             }
             else
             {
                  SendClientMessage(playerid, COLOR_GREY, "Vec imas aktiviran razvoz Sljunka!");
                    return 1;
               }
          }
       }
       return 1;
    }
	if(strcmp(cmd, "/Roba", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
  	      if(Veh == 299 || Veh == 300 || Veh == 292 || Veh == 293 || Veh == 294 || Veh == 245 || Veh == 296 ||  Veh == 297 ||  Veh == 298 ||  Veh == 296)
          {
                if(PlayerInfo[playerid][pJob] == 1)
                {
                      SendClientMessage(playerid, COLOR_GREY, "Nemas Posao kamiondije!");
		   			  return 1;
                }
             if(PlayerInfo[playerid][pJob] == 18)
             {
						if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 309 || IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)) != 310 || IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)) != 311 || IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)) != 312)
					   SendClientMessage(playerid,COLOR_YELLOW,"GAZDA:Odaberi rutu i kreci sa poslom!");
                       ShowPlayerDialog(playerid, 5557, DIALOG_STYLE_LIST, "Prijevoz Robe","Los Santos Trgovine\nLos Santos>San Francisco>Las Venturas", "Uredu", "Odustani");
             }
             else
             {
                  SendClientMessage(playerid, COLOR_GREY, "Vec imas aktiviran razvoz Sljunka!");
                    return 1;
               }
          }
       }
       return 1;
    }
Код:
if(dialogid == 5555)
	{
 		if(response)
		{
			if(listitem == 0) // Los Santos>Benzinske
			{
				SetPlayerCheckpoint(playerid, 2677.5691,-2123.9280,13.1175,7.0);
				SendClientMessage(playerid, COLOR_LIGHTBLUE, "Prije nego sto pocnes razvoziti Gorivo,napuni cisternu!.");
				IsGorivo1[playerid] = 1;
			}
			if(listitem == 1) //LS Rafinerija>SF Gradiliste
			{
				SetPlayerCheckpoint(playerid, 2677.5691,-2123.9280,13.1175,7.0);
				SendClientMessage(playerid, COLOR_LIGHTBLUE, "Prije nego sto pocnes razvoziti Gorivo,napuni cisternu!.");
				IsGorivo2[playerid] = 1;
			}
			if(listitem == 2) // Los Santos>San Francisco>Las Venturas
			{
				SetPlayerCheckpoint(playerid, 2677.5691,-2123.9280,13.1175,7.0);
				SendClientMessage(playerid, COLOR_LIGHTBLUE, "Prije nego sto pocnes razvoziti Gorivo,napuni cisternu!.");
				IsGorivo3[playerid] = 1;
   			}
		}
	}
    if(dialogid == 5556)
	{
 		if(response)
		{
			if(listitem == 0) // Los Santos>Kamenolom
			{
				SendClientMessage(playerid,COLOR_GREEN,"Aktivirao si Prijevoz Sljunka iz Los Santosa u Kamenolom,Napuni Prikolicu");
				SetPlayerCheckpoint(playerid, 2677.5691,-2123.9280,13.1175,7.0);
			}
			if(listitem == 1) //Cementara>Kamenolom
			{
				SendClientMessage(playerid,COLOR_GREEN,"Aktivirao si Prijevoz Sljunka iz Cementare do Kamenoloma,Otidi po Sljunak");
				SetPlayerCheckpoint(playerid, 2677.5691,-2123.9280,13.1175,7.0);
			}
			if(listitem == 2) // Kamenolom>Los Santos
			{
				SendClientMessage(playerid,COLOR_GREEN,"Aktivirao si Prijevoz Sljunka iz Kamenoloma u Los Santos,Otidi po Sljunak!");
				SetPlayerCheckpoint(playerid, 2677.5691,-2123.9280,13.1175,7.0);
			}
		}
	}
	if(dialogid == 5557)
		{
 		if(response)
		{
			if(listitem == 0) // Los Santos Trgovine
			{
				SendClientMessage(playerid,COLOR_GREEN,"Aktivirao si Prijevoz Robe po Los Santos Trgovinama");
				SetPlayerCheckpoint(playerid, 2677.5691,-2123.9280,13.1175,7.0);
			}
			if(listitem == 1) //Los Santos>San Francisco>Las Venturas
			{
				SendClientMessage(playerid,COLOR_GREEN,"Aktivirao si Prijevoz Robe po Los Santosu,San Francuscu,Las Venturasu");
				SetPlayerCheckpoint(playerid, 2677.5691,-2123.9280,13.1175,7.0);
			}
		}
	}
THIS is dialog...
When I click "odustani" I immediately kick-a, I do not know how to solve it, since I was a very important ... and there's still a problem, my server itself off: S, how to solve it?
Reply
#2

someone help??
Reply
#3

*****************BUMP*****************
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)