how do i can add other dialog here
#1

hello i want release new fs, but it bug

here code

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid)
        {
        case DialogF: // The case = our dialog id
            {
            switch(listitem)
            {
                case 0: // If he selects the first option
                {
                  if(GetPlayerMoney(playerid) < 9999999) return SendClientMessage(playerid, -1, "[ERROR]{FFFFFF}You don't have enough cash to purchase this superpower!");
                  SendClientMessage(playerid, -1, "you have buy superpower in 5 mins >:O");
                  SuperPower[playerid] = 1;
                  SetPlayerHealth(playerid,999999.0);//can't die while using superpower lol
                  SetPlayerArmour(playerid,999999.0);//can't die while using superpower lol
                  SendClientMessage(playerid, -1, "Superpower has been {00ffff}enabled{ffffff}!");
                  SetPlayerAttachedObject( playerid, 4, 2976, 15, 0.000000, 0.100000, -0.500000, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000 );
                  SetPlayerAttachedObject( playerid, 2, 18688, 5, -0.300000, 0.200000, -1.500000, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000 );
                  SetTimerEx("cancle1",20000,0,"i",playerid);
                }
                case 1: // If the user selects the second option
                {
                if(SuperPower[playerid] == 1)
                {
                GivePlayerMoney(playerid,25000);
                SuperPower[playerid] = 0;
                for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
                if(IsPlayerAttachedObjectSlotUsed(playerid, i)) RemovePlayerAttachedObject(playerid, i);
                }
                else return SendClientMessage(playerid,-1,"you Must Buy superpower to sell it !");
                 {
     /* // how do i can put another dialog here
        case DialogF+1: // The case = our dialog id
            {
            switch(listitem)
            {
                case 0: // If he selects the first option
                {
                  if(GetPlayerMoney(playerid) < 9999999) return SendClientMessage(playerid, -1, "[ERROR]{FFFFFF}You don't have enough cash to purchase this superpower!");
                  SendClientMessage(playerid, -1, "you have buy superpower in 5 mins >:O");
                  SuperPower[playerid] = 1;
                  SetPlayerHealth(playerid,999999.0);//can't die while using superpower lol
                  SetPlayerArmour(playerid,999999.0);//can't die while using superpower lol
                  SendClientMessage(playerid, -1, "Superpower has been {00ffff}enabled{ffffff}!");
                  SetPlayerAttachedObject( playerid, 4, 2976, 15, 0.000000, 0.100000, -0.500000, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000 );
                  SetPlayerAttachedObject( playerid, 2, 18688, 5, -0.300000, 0.200000, -1.500000, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000 );
                  SetTimerEx("cancle1",20000,0,"i",playerid);
                }
                case 1: // If the user selects the second option
                {
                if(SuperPower[playerid] == 1)
                {
                GivePlayerMoney(playerid,25000);
                SuperPower[playerid] = 0;
                for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
                if(IsPlayerAttachedObjectSlotUsed(playerid, i)) RemovePlayerAttachedObject(playerid, i);
                }
                else return SendClientMessage(playerid,-1,"you Must Buy superpower to sell it !");
                */

             }
           }
        }
    }
return 1;
}
Reply
#2

What's the Problem?
Reply
#3

look at code . i make /* */ it is error
Reply
#4

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid)
    {
        case DialogF: // The case = our dialog id
        {
            if(response)
            {
                switch(listitem)
                {
                    case 0: // If he selects the first option
                    {
                      if(GetPlayerMoney(playerid) < 9999999) return SendClientMessage(playerid, -1, "[ERROR]{FFFFFF}You don't have enough cash to purchase this superpower!");
                      SendClientMessage(playerid, -1, "you have buy superpower in 5 mins >:O");
                      SuperPower[playerid] = 1;
                      SetPlayerHealth(playerid,999999.0);//can't die while using superpower lol
                      SetPlayerArmour(playerid,999999.0);//can't die while using superpower lol
                      SendClientMessage(playerid, -1, "Superpower has been {00ffff}enabled{ffffff}!");
                      SetPlayerAttachedObject( playerid, 4, 2976, 15, 0.000000, 0.100000, -0.500000, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000 );
                      SetPlayerAttachedObject( playerid, 2, 18688, 5, -0.300000, 0.200000, -1.500000, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000 );
                      SetTimerEx("cancle1",20000,0,"i",playerid);
                    }
                    case 1: // If the user selects the second option
                    {
                      if(SuperPower[playerid] == 1)
                      {
                          GivePlayerMoney(playerid,25000);
                          SuperPower[playerid] = 0;
                          for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
                          if(IsPlayerAttachedObjectSlotUsed(playerid, i)) RemovePlayerAttachedObject(playerid, i);
                      }
                      else return SendClientMessage(playerid,-1,"you Must Buy superpower to sell it !");
                    }
                }
            }
        }
        case DialogF2:
        {
            if(response)
            {
                switch(listitem)
                {
                    case 0: // If he selects the first option
                    {
                      if(GetPlayerMoney(playerid) < 9999999) return SendClientMessage(playerid, -1, "[ERROR]{FFFFFF}You don't have enough cash to purchase this superpower!");
                      SendClientMessage(playerid, -1, "you have buy superpower in 5 mins >:O");
                      SuperPower[playerid] = 1;
                      SetPlayerHealth(playerid,999999.0);//can't die while using superpower lol
                      SetPlayerArmour(playerid,999999.0);//can't die while using superpower lol
                      SendClientMessage(playerid, -1, "Superpower has been {00ffff}enabled{ffffff}!");
                      SetPlayerAttachedObject( playerid, 4, 2976, 15, 0.000000, 0.100000, -0.500000, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000 );
                      SetPlayerAttachedObject( playerid, 2, 18688, 5, -0.300000, 0.200000, -1.500000, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000 );
                      SetTimerEx("cancle1",20000,0,"i",playerid);
                    }
                    case 1: // If the user selects the second option
                    {
                      if(SuperPower[playerid] == 1)
                      {
                          GivePlayerMoney(playerid,25000);
                          SuperPower[playerid] = 0;
                          for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
                          if(IsPlayerAttachedObjectSlotUsed(playerid, i)) RemovePlayerAttachedObject(playerid, i);
                      }
                      else return SendClientMessage(playerid,-1,"you Must Buy superpower to sell it !");
                    }
                }
            }
        }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)