Kako napraviti Create/Edit Object IG

Započeo Teodor, April 24, 2020, 19:45:05 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 3 gostiju pregledaju ovu temu.

Problem(error/warning):Kao sto pise u naslovu, kako da napravim Create/Edit Object In Game, ako ima neki tutorijal kako to da napravim. Naravno da se sacuva svi ti Objecti koju su Creatovani i Editovani posle restarta
Dio skripte:
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log):
Slika/video ingame problema(obavezno ako je ingame problem): link slike


Citat: .agency poslato April 24, 2020, 20:27:01 POSLE PODNE
https://forum.sa-mp.com/showthread.php?t=384195
Ne radi mi /createobject NZM sto ukucam /createobject izadje mi Dialog_style_input tu upisem ID objeta i nista se ne desi

Citat: Teodor poslato April 24, 2020, 22:28:16 POSLE PODNE
Ne radi mi /createobject NZM sto ukucam /createobject izadje mi Dialog_style_input tu upisem ID objeta i nista se ne desi
Koji mod koristis?




Citat: V01D poslato April 27, 2020, 15:23:27 POSLE PODNE
Proveri OnDialogResponse
Jedno objasnjenje kako ja sad ovo da ubacim u svoj mod, provalio sam da sam izbacio DialogResponse zbog ovih errora

[pawn]
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 10002 && response)// 1199
   {
       if(!Numbers(inputtext) && strval(inputtext) != -1) return SendClientMessage(playerid,DEF_COL_RED,"You only can use numbers!"),ShowPlayerDialog(playerid,10001,DIALOG_STYLE_LIST,"{A80000}Edit Object","Position\nVirtual World\nInterior ID\nStream Distance\nDelete Object","Next","Close");
      new id = EDIT_OBJECT_ID[playerid];
      new EDITOR_QUERY[256];
      format(EDITOR_QUERY, sizeof(EDITOR_QUERY), "UPDATE `OBJECTS` SET `VW`=%d WHERE `ID`=%d",
      strval(inputtext),
      EDITOR_OBJECT[id][OBJ_DB_ID]);
      db_free_result(db_query(EDITOR_DATABASE, EDITOR_QUERY));
      SendClientMessage(playerid,DEF_COL_WHITE,"You successful changed to virtualworld of this object.");
      return ShowPlayerDialog(playerid,10001,DIALOG_STYLE_LIST,"{A80000}Edit Object","Position\nVirtual World\nInterior ID\nStream Distance\nDelete Object","Next","Close");
   }
    if(dialogid == 10003 && response)// 1211
   {
      if(!Numbers(inputtext) && strval(inputtext) != -1) return SendClientMessage(playerid,DEF_COL_RED,"You only can use numbers!"),ShowPlayerDialog(playerid,10001,DIALOG_STYLE_LIST,"{A80000}Edit Object","Position\nVirtual World\nInterior ID\nStream Distance\nDelete Object","Next","Close");
      new id = EDIT_OBJECT_ID[playerid];
      new EDITOR_QUERY[256];
      format(EDITOR_QUERY, sizeof(EDITOR_QUERY), "UPDATE `OBJECTS` SET `INT`=%d WHERE `ID`=%d",
      strval(inputtext),
      EDITOR_OBJECT[id][OBJ_DB_ID]);
      db_free_result(db_query(EDITOR_DATABASE, EDITOR_QUERY));
       SendClientMessage(playerid,DEF_COL_WHITE,"You successful changed to interior of this object.");
       return ShowPlayerDialog(playerid,10001,DIALOG_STYLE_LIST,"{A80000}Edit Object","Position\nVirtual World\nInterior ID\nStream Distance\nDelete Object","Next","Close");
   }
    if(dialogid == 10004 && response)
   {
      if(!Numbers(inputtext) && strval(inputtext) != -1) return SendClientMessage(playerid,DEF_COL_RED,"You only can use numbers!"),ShowPlayerDialog(playerid,10001,DIALOG_STYLE_LIST,"{A80000}Edit Object","Position\nVirtual World\nInterior ID\nStream Distance\nDelete Object","Next","Close");
      new id = EDIT_OBJECT_ID[playerid];
      new EDITOR_QUERY[256];
      format(EDITOR_QUERY, sizeof(EDITOR_QUERY), "UPDATE `OBJECTS` SET `DISTANCE`=%d WHERE `ID`=%d",
      strval(inputtext),
      EDITOR_OBJECT[id][OBJ_DB_ID]);
      db_free_result(db_query(EDITOR_DATABASE, EDITOR_QUERY));
      SendClientMessage(playerid,DEF_COL_WHITE,"You successful changed to distance of this object.");
      return ShowPlayerDialog(playerid,10001,DIALOG_STYLE_LIST,"{A80000}Edit Object","Position\nVirtual World\nInterior ID\nStream Distance\nDelete Object","Next","Close");
   }
    if(dialogid == 10001 && response)
   {
       if(listitem == 0)
       {
          EditDynamicObject(playerid, EDIT_OBJECT_ID[playerid]);
          return SendClientMessage(playerid,DEF_COL_WHITE,"Usage ESC or the save icon to save the position.");
       }
       if(listitem == 1)
       {
          ShowPlayerDialog(playerid,10002,DIALOG_STYLE_INPUT,"{A80000}Virtual World","Insert the virtualworld you wan't to only stream this object in.\nUsage -1 to show it in all virtualworlds.","Save","Close");
       }
       if(listitem == 2)
       {
          ShowPlayerDialog(playerid,10003,DIALOG_STYLE_INPUT,"{A80000}Virtual World","Insert the interior you wan't to only stream this object in.\nUsage -1 to show it in all interior\nUsage /interior to see your currently interior.","Save","Close");
       }
       if(listitem == 3)
       {
          ShowPlayerDialog(playerid,10004,DIALOG_STYLE_INPUT,"{A80000}Virtual World","Insert the stream distance of this object. Default is 100.","Save","Close");
       }
       if(listitem == 4)
       {
           new EDITOR_QUERY[256];
         format(EDITOR_QUERY, sizeof(EDITOR_QUERY), "DELETE FROM `OBJECTS` WHERE `ID`=%d",EDITOR_OBJECT[EDIT_OBJECT_ID[playerid]][OBJ_DB_ID]);
         db_free_result(db_query(EDITOR_DATABASE, EDITOR_QUERY));
         DestroyDynamicObject(EDIT_OBJECT_ID[playerid]);
         return SendClientMessage(playerid,DEF_COL_WHITE,"You succesful deleted this object.");
       }
   }
   if(dialogid == 10000 && response)
   {
       if(!Numbers(inputtext)) return SendClientMessage(playerid,DEF_COL_RED,"You only can use numbers!"),ShowPlayerDialog(playerid,10000,DIALOG_STYLE_INPUT,"{A80000}Insert Object ID","Insert the object ID that you wan't to create.","Create","Close");
       new Float:editor[3],id;
       GetPlayerPos(playerid,editor[0],editor[1],editor[2]);
       id = CreateDynamicObject(strval(inputtext), editor[0]+1, editor[1]+1, editor[2], 0.0,0.0,0.0, -1, -1, -1, 100.0);

      if(id > DEF_MAX_OBJECTS) return SendClientMessageToAll(DEF_COL_WHITE,"Error while creating object, it seems you are trying to create more objects then the max amount of objects.");
      
        EDITOR_OBJECT[id][OBJ_MODEL] = strval(inputtext);
        EDITOR_OBJECT[id][OBJ_X] = editor[0]+1;
        EDITOR_OBJECT[id][OBJ_Y] = editor[1]+1;
        EDITOR_OBJECT[id][OBJ_Z] = editor[2];
        EDITOR_OBJECT[id][OBJ_RX] = 0.0;
        EDITOR_OBJECT[id][OBJ_RY] = 0.0;
        EDITOR_OBJECT[id][OBJ_RZ] = 0.0;
        EDITOR_OBJECT[id][OBJ_VW] = -1;
        EDITOR_OBJECT[id][OBJ_INTERIOR] = -1;
        EDITOR_OBJECT[id][OBJ_STREAM_DISTANCE] = 100.0;
        EDIT_OBJECT_ID[playerid] = id;
        EditDynamicObject(playerid, id);
       
        new EDITOR_QUERY[256];
        format(EDITOR_QUERY, sizeof(EDITOR_QUERY), "INSERT INTO `OBJECTS` (`MODEL`, `X`, `Y`, `Z`, `INT`) VALUES (%d,'%f','%f','%f',%d)",
      EDITOR_OBJECT[id][OBJ_MODEL],
      EDITOR_OBJECT[id][OBJ_X],
      EDITOR_OBJECT[id][OBJ_Y],
      EDITOR_OBJECT[id][OBJ_Z],
      id+1000);
      db_free_result(db_query(EDITOR_DATABASE, EDITOR_QUERY));
       new DBResult:EDITOR_RESULT;
        format(EDITOR_QUERY,sizeof(EDITOR_QUERY),"SELECT `ID` FROM `OBJECTS` WHERE `INT`=%d",id+1000);
        EDITOR_RESULT = db_query(EDITOR_DATABASE,EDITOR_QUERY);
        if(db_num_rows(EDITOR_RESULT) == 1)
        {
            new temp[16];
            db_get_field(EDITOR_RESULT,0,temp,16);
          EDITOR_OBJECT[id][OBJ_DB_ID] = strval(temp);
          SendClientMessage(playerid,DEF_COL_WHITE,"Object ID received.");
        }
        db_free_result(EDITOR_RESULT);
      format(EDITOR_QUERY, sizeof(EDITOR_QUERY), "UPDATE `OBJECTS` SET `INT`=-1 WHERE `ID`=%d",EDITOR_OBJECT[id][OBJ_DB_ID]);
      db_free_result(db_query(EDITOR_DATABASE, EDITOR_QUERY));
        SendClientMessage(playerid,DEF_COL_WHITE,"Object saved to database, Usage /editobject or /selectobject to edit this object.");
   }
   return 1;
}
[/pawn]

ERRORI:

[pawn]
C:\Users\teodo\Desktop\Moj Server\gamemodes\DMTest.pwn(1199) : error 002: only a single statement (or expression) can follow each "case"
C:\Users\teodo\Desktop\Moj Server\gamemodes\DMTest.pwn(1199 -- 1200) : error 029: invalid expression, assumed zero
C:\Users\teodo\Desktop\Moj Server\gamemodes\DMTest.pwn(1211) : warning 225: unreachable code
Pawn compiler 3.10.4           Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
[/pawn]

[pawn]public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 10002)
    {
         if(response)
      {
          if(!Numbers(inputtext) && strval(inputtext) != -1) return SendClientMessage(playerid,DEF_COL_RED,"You only can use numbers!"),ShowPlayerDialog(playerid,10001,DIALOG_STYLE_LIST,"{A80000}Edit Object","Position\nVirtual World\nInterior ID\nStream Distance\nDelete Object","Next","Close");
         new id = EDIT_OBJECT_ID[playerid];
         new EDITOR_QUERY[256];
         format(EDITOR_QUERY, sizeof(EDITOR_QUERY), "UPDATE `OBJECTS` SET `VW`=%d WHERE `ID`=%d",
         strval(inputtext),
         EDITOR_OBJECT[id][OBJ_DB_ID]);
         db_free_result(db_query(EDITOR_DATABASE, EDITOR_QUERY));
         SendClientMessage(playerid,DEF_COL_WHITE,"You successful changed to virtualworld of this object.");
         return ShowPlayerDialog(playerid,10001,DIALOG_STYLE_LIST,"{A80000}Edit Object","Position\nVirtual World\nInterior ID\nStream Distance\nDelete Object","Next","Close");
      }
   }   
    else if(dialogid == 10003)
   {
      if(response)
      {
          if(!Numbers(inputtext) && strval(inputtext) != -1) return SendClientMessage(playerid,DEF_COL_RED,"You only can use numbers!"),ShowPlayerDialog(playerid,10001,DIALOG_STYLE_LIST,"{A80000}Edit Object","Position\nVirtual World\nInterior ID\nStream Distance\nDelete Object","Next","Close");
         new id = EDIT_OBJECT_ID[playerid];
         new EDITOR_QUERY[256];
         format(EDITOR_QUERY, sizeof(EDITOR_QUERY), "UPDATE `OBJECTS` SET `INT`=%d WHERE `ID`=%d",
         strval(inputtext),
         EDITOR_OBJECT[id][OBJ_DB_ID]);
         db_free_result(db_query(EDITOR_DATABASE, EDITOR_QUERY));
          SendClientMessage(playerid,DEF_COL_WHITE,"You successful changed to interior of this object.");
          return ShowPlayerDialog(playerid,10001,DIALOG_STYLE_LIST,"{A80000}Edit Object","Position\nVirtual World\nInterior ID\nStream Distance\nDelete Object","Next","Close");
      }
   }
    else if(dialogid == 10004)
   {
      if(response)
      {
          if(!Numbers(inputtext) && strval(inputtext) != -1) return SendClientMessage(playerid,DEF_COL_RED,"You only can use numbers!"),ShowPlayerDialog(playerid,10001,DIALOG_STYLE_LIST,"{A80000}Edit Object","Position\nVirtual World\nInterior ID\nStream Distance\nDelete Object","Next","Close");
         new id = EDIT_OBJECT_ID[playerid];
         new EDITOR_QUERY[256];
         format(EDITOR_QUERY, sizeof(EDITOR_QUERY), "UPDATE `OBJECTS` SET `DISTANCE`=%d WHERE `ID`=%d",
         strval(inputtext),
         EDITOR_OBJECT[id][OBJ_DB_ID]);
         db_free_result(db_query(EDITOR_DATABASE, EDITOR_QUERY));
         SendClientMessage(playerid,DEF_COL_WHITE,"You successful changed to distance of this object.");
         return ShowPlayerDialog(playerid,10001,DIALOG_STYLE_LIST,"{A80000}Edit Object","Position\nVirtual World\nInterior ID\nStream Distance\nDelete Object","Next","Close");
      }
   }
    else if(dialogid == 10001)
   {
      if(response)
      {
          if(listitem == 0)
          {
             EditDynamicObject(playerid, EDIT_OBJECT_ID[playerid]);
             return SendClientMessage(playerid,DEF_COL_WHITE,"Usage ESC or the save icon to save the position.");
          }
          if(listitem == 1)
          {
             ShowPlayerDialog(playerid,10002,DIALOG_STYLE_INPUT,"{A80000}Virtual World","Insert the virtualworld you wan`t to only stream this object in.\nUsage -1 to show it in all virtualworlds.","Save","Close");
          }
          if(listitem == 2)
          {
             ShowPlayerDialog(playerid,10003,DIALOG_STYLE_INPUT,"{A80000}Virtual World","Insert the interior you wan`t to only stream this object in.\nUsage -1 to show it in all interior\nUsage /interior to see your currently interior.","Save","Close");
          }
          if(listitem == 3)
          {
             ShowPlayerDialog(playerid,10004,DIALOG_STYLE_INPUT,"{A80000}Virtual World","Insert the stream distance of this object. Default is 100.","Save","Close");
          }
          if(listitem == 4)
          {
              new EDITOR_QUERY[256];
            format(EDITOR_QUERY, sizeof(EDITOR_QUERY), "DELETE FROM `OBJECTS` WHERE `ID`=%d",EDITOR_OBJECT[EDIT_OBJECT_ID[playerid]][OBJ_DB_ID]);
            db_free_result(db_query(EDITOR_DATABASE, EDITOR_QUERY));
            DestroyDynamicObject(EDIT_OBJECT_ID[playerid]);
            return SendClientMessage(playerid,DEF_COL_WHITE,"You succesful deleted this object.");
          }
      }
   }
   else if(dialogid == 10000)
   {
      if(response)
      {
          if(!Numbers(inputtext)) return SendClientMessage(playerid,DEF_COL_RED,"You only can use numbers!"),ShowPlayerDialog(playerid,10000,DIALOG_STYLE_INPUT,"{A80000}Insert Object ID","Insert the object ID that you wan`t to create.","Create","Close");
          new Float:editor[3],id;
          GetPlayerPos(playerid,editor[0],editor[1],editor[2]);
          id = CreateDynamicObject(strval(inputtext), editor[0]+1, editor[1]+1, editor[2], 0.0,0.0,0.0, -1, -1, -1, 100.0);

         if(id > DEF_MAX_OBJECTS) return SendClientMessageToAll(DEF_COL_WHITE,"Error while creating object, it seems you are trying to create more objects then the max amount of objects.");
         
           EDITOR_OBJECT[id][OBJ_MODEL] = strval(inputtext);
           EDITOR_OBJECT[id][OBJ_X] = editor[0]+1;
           EDITOR_OBJECT[id][OBJ_Y] = editor[1]+1;
           EDITOR_OBJECT[id][OBJ_Z] = editor[2];
           EDITOR_OBJECT[id][OBJ_RX] = 0.0;
           EDITOR_OBJECT[id][OBJ_RY] = 0.0;
           EDITOR_OBJECT[id][OBJ_RZ] = 0.0;
           EDITOR_OBJECT[id][OBJ_VW] = -1;
           EDITOR_OBJECT[id][OBJ_INTERIOR] = -1;
           EDITOR_OBJECT[id][OBJ_STREAM_DISTANCE] = 100.0;
           EDIT_OBJECT_ID[playerid] = id;
           EditDynamicObject(playerid, id);
          
           new EDITOR_QUERY[256];
           format(EDITOR_QUERY, sizeof(EDITOR_QUERY), "INSERT INTO `OBJECTS` (`MODEL`, `X`, `Y`, `Z`, `INT`) VALUES (%d,`%f`,`%f`,`%f`,%d)",
         EDITOR_OBJECT[id][OBJ_MODEL],
         EDITOR_OBJECT[id][OBJ_X],
         EDITOR_OBJECT[id][OBJ_Y],
         EDITOR_OBJECT[id][OBJ_Z],
         id+1000);
         db_free_result(db_query(EDITOR_DATABASE, EDITOR_QUERY));
          new DBResult:EDITOR_RESULT;
           format(EDITOR_QUERY,sizeof(EDITOR_QUERY),"SELECT `ID` FROM `OBJECTS` WHERE `INT`=%d",id+1000);
           EDITOR_RESULT = db_query(EDITOR_DATABASE,EDITOR_QUERY);
           if(db_num_rows(EDITOR_RESULT) == 1)
           {
               new temp[16];
               db_get_field(EDITOR_RESULT,0,temp,16);
             EDITOR_OBJECT[id][OBJ_DB_ID] = strval(temp);
             SendClientMessage(playerid,DEF_COL_WHITE,"Object ID received.");
           }
           db_free_result(EDITOR_RESULT);
         format(EDITOR_QUERY, sizeof(EDITOR_QUERY), "UPDATE `OBJECTS` SET `INT`=-1 WHERE `ID`=%d",EDITOR_OBJECT[id][OBJ_DB_ID]);
         db_free_result(db_query(EDITOR_DATABASE, EDITOR_QUERY));
           SendClientMessage(playerid,DEF_COL_WHITE,"Object saved to database, Usage /editobject or /selectobject to edit this object.");
       }
   }
   return 1;
}[/pawn]

Probaj ovako mozda

Citat: V01D poslato April 27, 2020, 16:36:57 POSLE PODNE
[pawn]public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 10002)
    {
         if(response)
      {
          if(!Numbers(inputtext) && strval(inputtext) != -1) return SendClientMessage(playerid,DEF_COL_RED,"You only can use numbers!"),ShowPlayerDialog(playerid,10001,DIALOG_STYLE_LIST,"{A80000}Edit Object","Position\nVirtual World\nInterior ID\nStream Distance\nDelete Object","Next","Close");
         new id = EDIT_OBJECT_ID[playerid];
         new EDITOR_QUERY[256];
         format(EDITOR_QUERY, sizeof(EDITOR_QUERY), "UPDATE `OBJECTS` SET `VW`=%d WHERE `ID`=%d",
         strval(inputtext),
         EDITOR_OBJECT[id][OBJ_DB_ID]);
         db_free_result(db_query(EDITOR_DATABASE, EDITOR_QUERY));
         SendClientMessage(playerid,DEF_COL_WHITE,"You successful changed to virtualworld of this object.");
         return ShowPlayerDialog(playerid,10001,DIALOG_STYLE_LIST,"{A80000}Edit Object","Position\nVirtual World\nInterior ID\nStream Distance\nDelete Object","Next","Close");
      }
   }   
    else if(dialogid == 10003)
   {
      if(response)
      {
          if(!Numbers(inputtext) && strval(inputtext) != -1) return SendClientMessage(playerid,DEF_COL_RED,"You only can use numbers!"),ShowPlayerDialog(playerid,10001,DIALOG_STYLE_LIST,"{A80000}Edit Object","Position\nVirtual World\nInterior ID\nStream Distance\nDelete Object","Next","Close");
         new id = EDIT_OBJECT_ID[playerid];
         new EDITOR_QUERY[256];
         format(EDITOR_QUERY, sizeof(EDITOR_QUERY), "UPDATE `OBJECTS` SET `INT`=%d WHERE `ID`=%d",
         strval(inputtext),
         EDITOR_OBJECT[id][OBJ_DB_ID]);
         db_free_result(db_query(EDITOR_DATABASE, EDITOR_QUERY));
          SendClientMessage(playerid,DEF_COL_WHITE,"You successful changed to interior of this object.");
          return ShowPlayerDialog(playerid,10001,DIALOG_STYLE_LIST,"{A80000}Edit Object","Position\nVirtual World\nInterior ID\nStream Distance\nDelete Object","Next","Close");
      }
   }
    else if(dialogid == 10004)
   {
      if(response)
      {
          if(!Numbers(inputtext) && strval(inputtext) != -1) return SendClientMessage(playerid,DEF_COL_RED,"You only can use numbers!"),ShowPlayerDialog(playerid,10001,DIALOG_STYLE_LIST,"{A80000}Edit Object","Position\nVirtual World\nInterior ID\nStream Distance\nDelete Object","Next","Close");
         new id = EDIT_OBJECT_ID[playerid];
         new EDITOR_QUERY[256];
         format(EDITOR_QUERY, sizeof(EDITOR_QUERY), "UPDATE `OBJECTS` SET `DISTANCE`=%d WHERE `ID`=%d",
         strval(inputtext),
         EDITOR_OBJECT[id][OBJ_DB_ID]);
         db_free_result(db_query(EDITOR_DATABASE, EDITOR_QUERY));
         SendClientMessage(playerid,DEF_COL_WHITE,"You successful changed to distance of this object.");
         return ShowPlayerDialog(playerid,10001,DIALOG_STYLE_LIST,"{A80000}Edit Object","Position\nVirtual World\nInterior ID\nStream Distance\nDelete Object","Next","Close");
      }
   }
    else if(dialogid == 10001)
   {
      if(response)
      {
          if(listitem == 0)
          {
             EditDynamicObject(playerid, EDIT_OBJECT_ID[playerid]);
             return SendClientMessage(playerid,DEF_COL_WHITE,"Usage ESC or the save icon to save the position.");
          }
          if(listitem == 1)
          {
             ShowPlayerDialog(playerid,10002,DIALOG_STYLE_INPUT,"{A80000}Virtual World","Insert the virtualworld you wan`t to only stream this object in.\nUsage -1 to show it in all virtualworlds.","Save","Close");
          }
          if(listitem == 2)
          {
             ShowPlayerDialog(playerid,10003,DIALOG_STYLE_INPUT,"{A80000}Virtual World","Insert the interior you wan`t to only stream this object in.\nUsage -1 to show it in all interior\nUsage /interior to see your currently interior.","Save","Close");
          }
          if(listitem == 3)
          {
             ShowPlayerDialog(playerid,10004,DIALOG_STYLE_INPUT,"{A80000}Virtual World","Insert the stream distance of this object. Default is 100.","Save","Close");
          }
          if(listitem == 4)
          {
              new EDITOR_QUERY[256];
            format(EDITOR_QUERY, sizeof(EDITOR_QUERY), "DELETE FROM `OBJECTS` WHERE `ID`=%d",EDITOR_OBJECT[EDIT_OBJECT_ID[playerid]][OBJ_DB_ID]);
            db_free_result(db_query(EDITOR_DATABASE, EDITOR_QUERY));
            DestroyDynamicObject(EDIT_OBJECT_ID[playerid]);
            return SendClientMessage(playerid,DEF_COL_WHITE,"You succesful deleted this object.");
          }
      }
   }
   else if(dialogid == 10000)
   {
      if(response)
      {
          if(!Numbers(inputtext)) return SendClientMessage(playerid,DEF_COL_RED,"You only can use numbers!"),ShowPlayerDialog(playerid,10000,DIALOG_STYLE_INPUT,"{A80000}Insert Object ID","Insert the object ID that you wan`t to create.","Create","Close");
          new Float:editor[3],id;
          GetPlayerPos(playerid,editor[0],editor[1],editor[2]);
          id = CreateDynamicObject(strval(inputtext), editor[0]+1, editor[1]+1, editor[2], 0.0,0.0,0.0, -1, -1, -1, 100.0);

         if(id > DEF_MAX_OBJECTS) return SendClientMessageToAll(DEF_COL_WHITE,"Error while creating object, it seems you are trying to create more objects then the max amount of objects.");
         
           EDITOR_OBJECT[id][OBJ_MODEL] = strval(inputtext);
           EDITOR_OBJECT[id][OBJ_X] = editor[0]+1;
           EDITOR_OBJECT[id][OBJ_Y] = editor[1]+1;
           EDITOR_OBJECT[id][OBJ_Z] = editor[2];
           EDITOR_OBJECT[id][OBJ_RX] = 0.0;
           EDITOR_OBJECT[id][OBJ_RY] = 0.0;
           EDITOR_OBJECT[id][OBJ_RZ] = 0.0;
           EDITOR_OBJECT[id][OBJ_VW] = -1;
           EDITOR_OBJECT[id][OBJ_INTERIOR] = -1;
           EDITOR_OBJECT[id][OBJ_STREAM_DISTANCE] = 100.0;
           EDIT_OBJECT_ID[playerid] = id;
           EditDynamicObject(playerid, id);
          
           new EDITOR_QUERY[256];
           format(EDITOR_QUERY, sizeof(EDITOR_QUERY), "INSERT INTO `OBJECTS` (`MODEL`, `X`, `Y`, `Z`, `INT`) VALUES (%d,`%f`,`%f`,`%f`,%d)",
         EDITOR_OBJECT[id][OBJ_MODEL],
         EDITOR_OBJECT[id][OBJ_X],
         EDITOR_OBJECT[id][OBJ_Y],
         EDITOR_OBJECT[id][OBJ_Z],
         id+1000);
         db_free_result(db_query(EDITOR_DATABASE, EDITOR_QUERY));
          new DBResult:EDITOR_RESULT;
           format(EDITOR_QUERY,sizeof(EDITOR_QUERY),"SELECT `ID` FROM `OBJECTS` WHERE `INT`=%d",id+1000);
           EDITOR_RESULT = db_query(EDITOR_DATABASE,EDITOR_QUERY);
           if(db_num_rows(EDITOR_RESULT) == 1)
           {
               new temp[16];
               db_get_field(EDITOR_RESULT,0,temp,16);
             EDITOR_OBJECT[id][OBJ_DB_ID] = strval(temp);
             SendClientMessage(playerid,DEF_COL_WHITE,"Object ID received.");
           }
           db_free_result(EDITOR_RESULT);
         format(EDITOR_QUERY, sizeof(EDITOR_QUERY), "UPDATE `OBJECTS` SET `INT`=-1 WHERE `ID`=%d",EDITOR_OBJECT[id][OBJ_DB_ID]);
         db_free_result(db_query(EDITOR_DATABASE, EDITOR_QUERY));
           SendClientMessage(playerid,DEF_COL_WHITE,"Object saved to database, Usage /editobject or /selectobject to edit this object.");
       }
   }
   return 1;
}[/pawn]

Probaj ovako mozda
Nope :(
[pawn]
C:\Users\teodo\Desktop\Moj Server\gamemodes\DMTest.pwn(1199) : error 002: only a single statement (or expression) can follow each "case"
C:\Users\teodo\Desktop\Moj Server\gamemodes\DMTest.pwn(1199 -- 1200) : error 029: invalid expression, assumed zero
C:\Users\teodo\Desktop\Moj Server\gamemodes\DMTest.pwn(1214) : error 029: invalid expression, assumed zero
C:\Users\teodo\Desktop\Moj Server\gamemodes\DMTest.pwn(1214) : warning 215: expression has no effect
C:\Users\teodo\Desktop\Moj Server\gamemodes\DMTest.pwn(1214) : error 001: expected token: ";", but found "if"
Pawn compiler 3.10.4           Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
[/pawn]
[pawn]
if(dialogid == 10002) // 1199
else if(dialogid == 10003) // 1214
[/pawn]

[pawn]public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
   switch(dialogid)
   {
      case 10002:
      {
         if(response)
         {
             if(!Numbers(inputtext) && strval(inputtext) != -1) return SendClientMessage(playerid,DEF_COL_RED,"You only can use numbers!"),ShowPlayerDialog(playerid,10001,DIALOG_STYLE_LIST,"{A80000}Edit Object","Position\nVirtual World\nInterior ID\nStream Distance\nDelete Object","Next","Close");
            new id = EDIT_OBJECT_ID[playerid];
            new EDITOR_QUERY[256];
            format(EDITOR_QUERY, sizeof(EDITOR_QUERY), "UPDATE `OBJECTS` SET `VW`=%d WHERE `ID`=%d",
            strval(inputtext),
            EDITOR_OBJECT[id][OBJ_DB_ID]);
            db_free_result(db_query(EDITOR_DATABASE, EDITOR_QUERY));
            SendClientMessage(playerid,DEF_COL_WHITE,"You successful changed to virtualworld of this object.");
            return ShowPlayerDialog(playerid,10001,DIALOG_STYLE_LIST,"{A80000}Edit Object","Position\nVirtual World\nInterior ID\nStream Distance\nDelete Object","Next","Close");
         }
      }
      case 10003:
      {
         if(response)
         {
             if(!Numbers(inputtext) && strval(inputtext) != -1) return SendClientMessage(playerid,DEF_COL_RED,"You only can use numbers!"),ShowPlayerDialog(playerid,10001,DIALOG_STYLE_LIST,"{A80000}Edit Object","Position\nVirtual World\nInterior ID\nStream Distance\nDelete Object","Next","Close");
            new id = EDIT_OBJECT_ID[playerid];
            new EDITOR_QUERY[256];
            format(EDITOR_QUERY, sizeof(EDITOR_QUERY), "UPDATE `OBJECTS` SET `INT`=%d WHERE `ID`=%d",
            strval(inputtext),
            EDITOR_OBJECT[id][OBJ_DB_ID]);
            db_free_result(db_query(EDITOR_DATABASE, EDITOR_QUERY));
             SendClientMessage(playerid,DEF_COL_WHITE,"You successful changed to interior of this object.");
             return ShowPlayerDialog(playerid,10001,DIALOG_STYLE_LIST,"{A80000}Edit Object","Position\nVirtual World\nInterior ID\nStream Distance\nDelete Object","Next","Close");
         }
      }
      case 10004:
      {
         if(response)
         {
            if(!Numbers(inputtext) && strval(inputtext) != -1) return SendClientMessage(playerid,DEF_COL_RED,"You only can use numbers!"),ShowPlayerDialog(playerid,10001,DIALOG_STYLE_LIST,"{A80000}Edit Object","Position\nVirtual World\nInterior ID\nStream Distance\nDelete Object","Next","Close");
         new id = EDIT_OBJECT_ID[playerid];
         new EDITOR_QUERY[256];
         format(EDITOR_QUERY, sizeof(EDITOR_QUERY), "UPDATE `OBJECTS` SET `DISTANCE`=%d WHERE `ID`=%d",
         strval(inputtext),
         EDITOR_OBJECT[id][OBJ_DB_ID]);
         db_free_result(db_query(EDITOR_DATABASE, EDITOR_QUERY));
         SendClientMessage(playerid,DEF_COL_WHITE,"You successful changed to distance of this object.");
         return ShowPlayerDialog(playerid,10001,DIALOG_STYLE_LIST,"{A80000}Edit Object","Position\nVirtual World\nInterior ID\nStream Distance\nDelete Object","Next","Close");
         }
      }
      case 10001:
      {
         if(response)
         {
            if(response)
            {
             if(listitem == 0)
             {
                EditDynamicObject(playerid, EDIT_OBJECT_ID[playerid]);
                return SendClientMessage(playerid,DEF_COL_WHITE,"Usage ESC or the save icon to save the position.");
             }
             if(listitem == 1)
             {
                ShowPlayerDialog(playerid,10002,DIALOG_STYLE_INPUT,"{A80000}Virtual World","Insert the virtualworld you wan`t to only stream this object in.\nUsage -1 to show it in all virtualworlds.","Save","Close");
             }
             if(listitem == 2)
             {
                ShowPlayerDialog(playerid,10003,DIALOG_STYLE_INPUT,"{A80000}Virtual World","Insert the interior you wan`t to only stream this object in.\nUsage -1 to show it in all interior\nUsage /interior to see your currently interior.","Save","Close");
             }
             if(listitem == 3)
             {
                ShowPlayerDialog(playerid,10004,DIALOG_STYLE_INPUT,"{A80000}Virtual World","Insert the stream distance of this object. Default is 100.","Save","Close");
             }
             if(listitem == 4)
             {
                 new EDITOR_QUERY[256];
               format(EDITOR_QUERY, sizeof(EDITOR_QUERY), "DELETE FROM `OBJECTS` WHERE `ID`=%d",EDITOR_OBJECT[EDIT_OBJECT_ID[playerid]][OBJ_DB_ID]);
               db_free_result(db_query(EDITOR_DATABASE, EDITOR_QUERY));
               DestroyDynamicObject(EDIT_OBJECT_ID[playerid]);
               return SendClientMessage(playerid,DEF_COL_WHITE,"You succesful deleted this object.");
             }
         }
      }
      case 10000:
      {
         if(response)
         {
            if(!Numbers(inputtext)) return SendClientMessage(playerid,DEF_COL_RED,"You only can use numbers!"),ShowPlayerDialog(playerid,10000,DIALOG_STYLE_INPUT,"{A80000}Insert Object ID","Insert the object ID that you wan`t to create.","Create","Close");
             new Float:editor[3],id;
             GetPlayerPos(playerid,editor[0],editor[1],editor[2]);
             id = CreateDynamicObject(strval(inputtext), editor[0]+1, editor[1]+1, editor[2], 0.0,0.0,0.0, -1, -1, -1, 100.0);

            if(id > DEF_MAX_OBJECTS) return SendClientMessageToAll(DEF_COL_WHITE,"Error while creating object, it seems you are trying to create more objects then the max amount of objects.");
            
              EDITOR_OBJECT[id][OBJ_MODEL] = strval(inputtext);
              EDITOR_OBJECT[id][OBJ_X] = editor[0]+1;
              EDITOR_OBJECT[id][OBJ_Y] = editor[1]+1;
              EDITOR_OBJECT[id][OBJ_Z] = editor[2];
              EDITOR_OBJECT[id][OBJ_RX] = 0.0;
              EDITOR_OBJECT[id][OBJ_RY] = 0.0;
              EDITOR_OBJECT[id][OBJ_RZ] = 0.0;
              EDITOR_OBJECT[id][OBJ_VW] = -1;
              EDITOR_OBJECT[id][OBJ_INTERIOR] = -1;
              EDITOR_OBJECT[id][OBJ_STREAM_DISTANCE] = 100.0;
              EDIT_OBJECT_ID[playerid] = id;
              EditDynamicObject(playerid, id);
             
              new EDITOR_QUERY[256];
              format(EDITOR_QUERY, sizeof(EDITOR_QUERY), "INSERT INTO `OBJECTS` (`MODEL`, `X`, `Y`, `Z`, `INT`) VALUES (%d,`%f`,`%f`,`%f`,%d)",
            EDITOR_OBJECT[id][OBJ_MODEL],
            EDITOR_OBJECT[id][OBJ_X],
            EDITOR_OBJECT[id][OBJ_Y],
            EDITOR_OBJECT[id][OBJ_Z],
            id+1000);
            db_free_result(db_query(EDITOR_DATABASE, EDITOR_QUERY));
             new DBResult:EDITOR_RESULT;
              format(EDITOR_QUERY,sizeof(EDITOR_QUERY),"SELECT `ID` FROM `OBJECTS` WHERE `INT`=%d",id+1000);
              EDITOR_RESULT = db_query(EDITOR_DATABASE,EDITOR_QUERY);
              if(db_num_rows(EDITOR_RESULT) == 1)
              {
                  new temp[16];
                  db_get_field(EDITOR_RESULT,0,temp,16);
                EDITOR_OBJECT[id][OBJ_DB_ID] = strval(temp);
                SendClientMessage(playerid,DEF_COL_WHITE,"Object ID received.");
              }
              db_free_result(EDITOR_RESULT);
            format(EDITOR_QUERY, sizeof(EDITOR_QUERY), "UPDATE `OBJECTS` SET `INT`=-1 WHERE `ID`=%d",EDITOR_OBJECT[id][OBJ_DB_ID]);
            db_free_result(db_query(EDITOR_DATABASE, EDITOR_QUERY));
              SendClientMessage(playerid,DEF_COL_WHITE,"Object saved to database, Usage /editobject or /selectobject to edit this object.");
         }
      }
   }
   return 1;
}[/pawn]

Aj sad..

Citat: V01D poslato April 27, 2020, 16:53:50 POSLE PODNE
[pawn]public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
   switch(dialogid)
   {
      case 10002:
      {
         if(response)
         {
             if(!Numbers(inputtext) && strval(inputtext) != -1) return SendClientMessage(playerid,DEF_COL_RED,"You only can use numbers!"),ShowPlayerDialog(playerid,10001,DIALOG_STYLE_LIST,"{A80000}Edit Object","Position\nVirtual World\nInterior ID\nStream Distance\nDelete Object","Next","Close");
            new id = EDIT_OBJECT_ID[playerid];
            new EDITOR_QUERY[256];
            format(EDITOR_QUERY, sizeof(EDITOR_QUERY), "UPDATE `OBJECTS` SET `VW`=%d WHERE `ID`=%d",
            strval(inputtext),
            EDITOR_OBJECT[id][OBJ_DB_ID]);
            db_free_result(db_query(EDITOR_DATABASE, EDITOR_QUERY));
            SendClientMessage(playerid,DEF_COL_WHITE,"You successful changed to virtualworld of this object.");
            return ShowPlayerDialog(playerid,10001,DIALOG_STYLE_LIST,"{A80000}Edit Object","Position\nVirtual World\nInterior ID\nStream Distance\nDelete Object","Next","Close");
         }
      }
      case 10003:
      {
         if(response)
         {
             if(!Numbers(inputtext) && strval(inputtext) != -1) return SendClientMessage(playerid,DEF_COL_RED,"You only can use numbers!"),ShowPlayerDialog(playerid,10001,DIALOG_STYLE_LIST,"{A80000}Edit Object","Position\nVirtual World\nInterior ID\nStream Distance\nDelete Object","Next","Close");
            new id = EDIT_OBJECT_ID[playerid];
            new EDITOR_QUERY[256];
            format(EDITOR_QUERY, sizeof(EDITOR_QUERY), "UPDATE `OBJECTS` SET `INT`=%d WHERE `ID`=%d",
            strval(inputtext),
            EDITOR_OBJECT[id][OBJ_DB_ID]);
            db_free_result(db_query(EDITOR_DATABASE, EDITOR_QUERY));
             SendClientMessage(playerid,DEF_COL_WHITE,"You successful changed to interior of this object.");
             return ShowPlayerDialog(playerid,10001,DIALOG_STYLE_LIST,"{A80000}Edit Object","Position\nVirtual World\nInterior ID\nStream Distance\nDelete Object","Next","Close");
         }
      }
      case 10004:
      {
         if(response)
         {
            if(!Numbers(inputtext) && strval(inputtext) != -1) return SendClientMessage(playerid,DEF_COL_RED,"You only can use numbers!"),ShowPlayerDialog(playerid,10001,DIALOG_STYLE_LIST,"{A80000}Edit Object","Position\nVirtual World\nInterior ID\nStream Distance\nDelete Object","Next","Close");
         new id = EDIT_OBJECT_ID[playerid];
         new EDITOR_QUERY[256];
         format(EDITOR_QUERY, sizeof(EDITOR_QUERY), "UPDATE `OBJECTS` SET `DISTANCE`=%d WHERE `ID`=%d",
         strval(inputtext),
         EDITOR_OBJECT[id][OBJ_DB_ID]);
         db_free_result(db_query(EDITOR_DATABASE, EDITOR_QUERY));
         SendClientMessage(playerid,DEF_COL_WHITE,"You successful changed to distance of this object.");
         return ShowPlayerDialog(playerid,10001,DIALOG_STYLE_LIST,"{A80000}Edit Object","Position\nVirtual World\nInterior ID\nStream Distance\nDelete Object","Next","Close");
         }
      }
      case 10001:
      {
         if(response)
         {
            if(response)
            {
             if(listitem == 0)
             {
                EditDynamicObject(playerid, EDIT_OBJECT_ID[playerid]);
                return SendClientMessage(playerid,DEF_COL_WHITE,"Usage ESC or the save icon to save the position.");
             }
             if(listitem == 1)
             {
                ShowPlayerDialog(playerid,10002,DIALOG_STYLE_INPUT,"{A80000}Virtual World","Insert the virtualworld you wan`t to only stream this object in.\nUsage -1 to show it in all virtualworlds.","Save","Close");
             }
             if(listitem == 2)
             {
                ShowPlayerDialog(playerid,10003,DIALOG_STYLE_INPUT,"{A80000}Virtual World","Insert the interior you wan`t to only stream this object in.\nUsage -1 to show it in all interior\nUsage /interior to see your currently interior.","Save","Close");
             }
             if(listitem == 3)
             {
                ShowPlayerDialog(playerid,10004,DIALOG_STYLE_INPUT,"{A80000}Virtual World","Insert the stream distance of this object. Default is 100.","Save","Close");
             }
             if(listitem == 4)
             {
                 new EDITOR_QUERY[256];
               format(EDITOR_QUERY, sizeof(EDITOR_QUERY), "DELETE FROM `OBJECTS` WHERE `ID`=%d",EDITOR_OBJECT[EDIT_OBJECT_ID[playerid]][OBJ_DB_ID]);
               db_free_result(db_query(EDITOR_DATABASE, EDITOR_QUERY));
               DestroyDynamicObject(EDIT_OBJECT_ID[playerid]);
               return SendClientMessage(playerid,DEF_COL_WHITE,"You succesful deleted this object.");
             }
         }
      }
      case 10000:
      {
         if(response)
         {
            if(!Numbers(inputtext)) return SendClientMessage(playerid,DEF_COL_RED,"You only can use numbers!"),ShowPlayerDialog(playerid,10000,DIALOG_STYLE_INPUT,"{A80000}Insert Object ID","Insert the object ID that you wan`t to create.","Create","Close");
             new Float:editor[3],id;
             GetPlayerPos(playerid,editor[0],editor[1],editor[2]);
             id = CreateDynamicObject(strval(inputtext), editor[0]+1, editor[1]+1, editor[2], 0.0,0.0,0.0, -1, -1, -1, 100.0);

            if(id > DEF_MAX_OBJECTS) return SendClientMessageToAll(DEF_COL_WHITE,"Error while creating object, it seems you are trying to create more objects then the max amount of objects.");
            
              EDITOR_OBJECT[id][OBJ_MODEL] = strval(inputtext);
              EDITOR_OBJECT[id][OBJ_X] = editor[0]+1;
              EDITOR_OBJECT[id][OBJ_Y] = editor[1]+1;
              EDITOR_OBJECT[id][OBJ_Z] = editor[2];
              EDITOR_OBJECT[id][OBJ_RX] = 0.0;
              EDITOR_OBJECT[id][OBJ_RY] = 0.0;
              EDITOR_OBJECT[id][OBJ_RZ] = 0.0;
              EDITOR_OBJECT[id][OBJ_VW] = -1;
              EDITOR_OBJECT[id][OBJ_INTERIOR] = -1;
              EDITOR_OBJECT[id][OBJ_STREAM_DISTANCE] = 100.0;
              EDIT_OBJECT_ID[playerid] = id;
              EditDynamicObject(playerid, id);
             
              new EDITOR_QUERY[256];
              format(EDITOR_QUERY, sizeof(EDITOR_QUERY), "INSERT INTO `OBJECTS` (`MODEL`, `X`, `Y`, `Z`, `INT`) VALUES (%d,`%f`,`%f`,`%f`,%d)",
            EDITOR_OBJECT[id][OBJ_MODEL],
            EDITOR_OBJECT[id][OBJ_X],
            EDITOR_OBJECT[id][OBJ_Y],
            EDITOR_OBJECT[id][OBJ_Z],
            id+1000);
            db_free_result(db_query(EDITOR_DATABASE, EDITOR_QUERY));
             new DBResult:EDITOR_RESULT;
              format(EDITOR_QUERY,sizeof(EDITOR_QUERY),"SELECT `ID` FROM `OBJECTS` WHERE `INT`=%d",id+1000);
              EDITOR_RESULT = db_query(EDITOR_DATABASE,EDITOR_QUERY);
              if(db_num_rows(EDITOR_RESULT) == 1)
              {
                  new temp[16];
                  db_get_field(EDITOR_RESULT,0,temp,16);
                EDITOR_OBJECT[id][OBJ_DB_ID] = strval(temp);
                SendClientMessage(playerid,DEF_COL_WHITE,"Object ID received.");
              }
              db_free_result(EDITOR_RESULT);
            format(EDITOR_QUERY, sizeof(EDITOR_QUERY), "UPDATE `OBJECTS` SET `INT`=-1 WHERE `ID`=%d",EDITOR_OBJECT[id][OBJ_DB_ID]);
            db_free_result(db_query(EDITOR_DATABASE, EDITOR_QUERY));
              SendClientMessage(playerid,DEF_COL_WHITE,"Object saved to database, Usage /editobject or /selectobject to edit this object.");
         }
      }
   }
   return 1;
}[/pawn]

Aj sad..

Nece opet :(

[pawn]
case 10000://1277
   {
      if(response)
      {
         if(!Numbers(inputtext)) return SendClientMessage(playerid,DEF_COL_RED,"You only can use numbers!"),ShowPlayerDialog(playerid,10000,DIALOG_STYLE_INPUT,"{A80000}Insert Object ID","Insert the object ID that you wan`t to create.","Create","Close");
         new Float:editor[3],id;
         GetPlayerPos(playerid,editor[0],editor[1],editor[2]);
         id = CreateDynamicObject(strval(inputtext), editor[0]+1, editor[1]+1, editor[2], 0.0,0.0,0.0, -1, -1, -1, 100.0);

         if(id > DEF_MAX_OBJECTS) return SendClientMessageToAll(DEF_COL_WHITE,"Error while creating object, it seems you are trying to create more objects then the max amount of objects.");
                  
            EDITOR_OBJECT[id][OBJ_MODEL] = strval(inputtext);
          EDITOR_OBJECT[id][OBJ_X] = editor[0]+1;
           EDITOR_OBJECT[id][OBJ_Y] = editor[1]+1;
           EDITOR_OBJECT[id][OBJ_Z] = editor[2];
           EDITOR_OBJECT[id][OBJ_RX] = 0.0;
           EDITOR_OBJECT[id][OBJ_RY] = 0.0;
          EDITOR_OBJECT[id][OBJ_RZ] = 0.0;
           EDITOR_OBJECT[id][OBJ_VW] = -1;
           EDITOR_OBJECT[id][OBJ_INTERIOR] = -1;
           EDITOR_OBJECT[id][OBJ_STREAM_DISTANCE] = 100.0;
           EDIT_OBJECT_ID[playerid] = id;
           EditDynamicObject(playerid, id);
                
          new EDITOR_QUERY[256];
           format(EDITOR_QUERY, sizeof(EDITOR_QUERY), "INSERT INTO `OBJECTS` (`MODEL`, `X`, `Y`, `Z`, `INT`) VALUES (%d,`%f`,`%f`,`%f`,%d)",
         EDITOR_OBJECT[id][OBJ_MODEL],
         EDITOR_OBJECT[id][OBJ_X],
         EDITOR_OBJECT[id][OBJ_Y],
         EDITOR_OBJECT[id][OBJ_Z],
         id+1000);
         db_free_result(db_query(EDITOR_DATABASE, EDITOR_QUERY));
         new DBResult:EDITOR_RESULT;
          format(EDITOR_QUERY,sizeof(EDITOR_QUERY),"SELECT `ID` FROM `OBJECTS` WHERE `INT`=%d",id+1000);
           EDITOR_RESULT = db_query(EDITOR_DATABASE,EDITOR_QUERY);

           if(db_num_rows(EDITOR_RESULT) == 1)
          {
              new temp[16];
               db_get_field(EDITOR_RESULT,0,temp,16);
             EDITOR_OBJECT[id][OBJ_DB_ID] = strval(temp);
             SendClientMessage(playerid,DEF_COL_WHITE,"Object ID received.");
           }
           db_free_result(EDITOR_RESULT);
         format(EDITOR_QUERY, sizeof(EDITOR_QUERY), "UPDATE `OBJECTS` SET `INT`=-1 WHERE `ID`=%d",EDITOR_OBJECT[id][OBJ_DB_ID]);
         db_free_result(db_query(EDITOR_DATABASE, EDITOR_QUERY));
           SendClientMessage(playerid,DEF_COL_WHITE,"Object saved to database, Usage /editobject or /selectobject to edit this object.");
      }
   }
[/pawn]

[pawn]
C:\Users\teodo\Desktop\Moj Server\gamemodes\DMTest.pwn(1277) : warning 217: loose indentation
C:\Users\teodo\Desktop\Moj Server\gamemodes\DMTest.pwn(1277) : error 014: invalid statement; not in switch
C:\Users\teodo\Desktop\Moj Server\gamemodes\DMTest.pwn(1277) : warning 215: expression has no effect
C:\Users\teodo\Desktop\Moj Server\gamemodes\DMTest.pwn(1277) : error 001: expected token: ";", but found ":"
C:\Users\teodo\Desktop\Moj Server\gamemodes\DMTest.pwn(1277) : error 029: invalid expression, assumed zero
C:\Users\teodo\Desktop\Moj Server\gamemodes\DMTest.pwn(1277) : fatal error 107: too many error messages on one line
[/pawn]


Izgleda da ga nisi stavio lepo unutar switch-a, ide ovako sve:

[pawn]switch(dialogid)
{
   case Broj1:
   {
      Code;
   }
   case Broj2:
   {
      Code;
   }
   case Broj3:
   {
      Code;
   }
}

//Takodje moras imati i za OnDialogResponse otvoren i zatvoren bracket { }[/pawn]

Citat: V01D poslato April 28, 2020, 11:25:10 PRE PODNE
Izgleda da ga nisi stavio lepo unutar switch-a, ide ovako sve:

[pawn]switch(dialogid)
{
   case Broj1:
   {
      Code;
   }
   case Broj2:
   {
      Code;
   }
   case Broj3:
   {
      Code;
   }
}

//Takodje moras imati i za OnDialogResponse otvoren i zatvoren bracket { }[/pawn]
Fix sam sad to, create mi se objecat, mogu da ga editujem i sve, ali mi se ne cuva posle restarta, znas mozda kako to da resim da mi se posle restarta servera sacuvaju ti objecti @V01D