GTA Közösség - A magyar GTA fórum

San Andreas Multiplayer (SA-MP) => SA-MP: Szerverfejlesztés => Segítségkérés => A témát indította: The - 2012. március 11. - 19:02:41

Cím: Nem reagál, dialog
Írta: The - 2012. március 11. - 19:02:41
Csáó.
Miért nem csinál semmit se?
 
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(\"/dteszt\",cmdtext,true))
{
    new PlayerName[24];
       GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
   if(strcmp(PlayerName,\"Deew\",true))//ide írod a nevet
{
SendClientMessage(playerid,0xff0000AA,\"Ezt a parancsot csak Deew használhatja!\"); //ide hogy mit tegyen ha nem az a neve
}
else
{
        ShowPlayerDialog(playerid, 5111, DIALOG_STYLE_LIST, \"Teszt\",\"Teszt1\\nTeszt2\",\"Kiválaszt\",\"Mégse\");
}
}
return 0;
}
public OnDialogResponse (playerid, dialogid, response, listitem, inputtext [])
{
  if(dialogid == 5111)
{
if(response)
{
   if(listitem == 0)
   {
     SetPlayerPos(playerid, 1535.5732,-1675.6609,13.3828);
      }
   if(listitem == 1)
   {
        SetPlayerPos(playerid, 1729.6116,-1855.1116,13.4141);
        return 1;
           }
}
}
  return 0;
}

 
Edit: bejön a menü de ha rákattintok nem csinál semmit.
Cím: Nem reagál, dialog
Írta: CANNONN - 2012. március 11. - 19:07:09

public OnDialogResponse (playerid, dialogid, response, listitem, inputtext [])
{
  if(dialogid == 5111)
{
if(response == 1)
{
switch(listitem)
{
   case 0:
   {
     SetPlayerPos(playerid, 1535.5732,-1675.6609,13.3828);
      }
        case 1:
   {
                SetPlayerPos(playerid, 1729.6116,-1855.1116,13.4141);
           }
}
}
}
  return 0;
}
Cím: Nem reagál, dialog
Írta: The - 2012. március 11. - 19:09:36
Mostmár be se jön.
Edit: bejön de nem reagál.
Cím: Nem reagál, dialog
Írta: CANNONN - 2012. március 11. - 19:16:21

public OnDialogResponse (playerid, dialogid, response, listitem, inputtext [])
{
  if(dialogid == 5111)
{
if(response == 1)
{
switch(listitem)
{
   case 0:
   {
     SetPlayerPos(playerid, 1535.5732,-1675.6609,13.3828);
      }
        case 1:
   {
                SetPlayerPos(playerid, 1729.6116,-1855.1116,13.4141);
           }
}
}
}
  return 0;
}
Cím: Nem reagál, dialog
Írta: The - 2012. március 11. - 19:19:44
ÉS MÉG MINDIG nem jó  :tantrum:
 
#include <a_samp>
public OnFilterScriptInit()
{
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(\"/dteszt\",cmdtext,true))
{
    new PlayerName[24];
       GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
   if(strcmp(PlayerName,\"Deew\",true))//ide írod a nevet
{
SendClientMessage(playerid,0xff0000AA,\"Ezt a parancsot csak Deew használhatja!\"); //ide hogy mit tegyen ha nem az a neve
}
else
{
        ShowPlayerDialog(playerid, 5111, DIALOG_STYLE_LIST, \"Teszt\",\"Teszt1\\nTeszt2\",\"Kiválaszt\",\"Mégse\");
}
}
return 0;
}
public OnDialogResponse (playerid, dialogid, response, listitem, inputtext [])
{
  if(dialogid == 5111)
{
switch(listitem)
{
   case 0:
   {
     SetPlayerPos(playerid, 1535.5732,-1675.6609,13.3828);
      }
    case 1:
   {
            SetPlayerPos(playerid, 1729.6116,-1855.1116,13.4141);
           }
}
}
  return 0;
}
Cím: Nem reagál, dialog
Írta: CANNONN - 2012. március 11. - 19:22:19
Jónak kell lennie.
 

public OnDialogResponse (playerid, dialogid, response, listitem, inputtext [])
{
  if(dialogid == 5111)
{
if(response == 1)
{
switch(listitem)
{
   case 0:
   {
     SetPlayerPos(playerid, 1535.5732,-1675.6609,13.3828);
      }
        case 1:
   {
                SetPlayerPos(playerid, 1729.6116,-1855.1116,13.4141);
           }
}
}
}
  return 0;
}
Cím: Nem reagál, dialog
Írta: The - 2012. március 11. - 19:23:55
Idézetet írta: Cannonn date=1331490139\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"18326\" data-ipsquote-contentclass=\"forums_Topic
Jónak kell lennie.
 

public OnDialogResponse (playerid, dialogid, response, listitem, inputtext [])
{
  if(dialogid == 5111)
{
if(response == 1)
{
switch(listitem)
{
   case 0:
   {
     SetPlayerPos(playerid, 1535.5732,-1675.6609,13.3828);
      }
        case 1:
   {
                SetPlayerPos(playerid, 1729.6116,-1855.1116,13.4141);
           }
}
}
}
  return 0;
}

 

Megõrülök még mindig nem jó!
Agyfaszt kapok
Cím: Nem reagál, dialog
Írta: leito222 - 2012. március 11. - 19:26:12
Az nem lehet, hogy az 5111-es Dialogod id-d már van? Próbáld átírni azt, mondjuk 5222-re, és úgy az összes többit.
Cím: Nem reagál, dialog
Írta: The - 2012. március 11. - 19:27:02
Idézetet írta: leito222 date=1331490372\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"18326\" data-ipsquote-contentclass=\"forums_Topic
Az nem lehet, hogy az 5111-es Dialogod id-d már van? Próbáld átírni azt, mondjuk 5222-re, és úgy az összes többit.
 
Nem
Cím: Nem reagál, dialog
Írta: leito222 - 2012. március 11. - 19:32:53
Próbáld így, hátha jó:
[pawn]if(dialogid == 8898)
{
   if(response)
   {
      if(listitem == 0)
      {
SetPlayerPos(playerid, 1535.5732,-1675.6609,13.3828);
}
if(listitem == 1)
{
SetPlayerPos(playerid, 1729.6116,-1855.1116,13.4141);
}
}
[/pawn]
Ha nemjó, akkor bocs + ha sor hiba van akkor is bocs + ha egy }-el kevesebb akkor is bocs :D
Cím: Nem reagál, dialog
Írta: nyE - 2012. március 11. - 19:34:27
public OnDialogResponse (playerid, dialogid, response, listitem, inputtext [])
{
    if(dialogid == 5111)
    {
        if(response)
        {
    switch(listitem)
    {
        case 0:
{
     SetPlayerPos(playerid, 1535.5732,-1675.6609,13.3828);
   }
case 1:
{
            SetPlayerPos(playerid, 1729.6116,-1855.1116,13.4141);
        }
            }
        }
        return 1;
    }
    return 0;
}
Cím: Nem reagál, dialog
Írta: The - 2012. március 11. - 19:34:52
Idézetet írta: leito222 date=1331490773\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"18326\" data-ipsquote-contentclass=\"forums_Topic
Próbáld így, hátha jó:
 
if(dialogid == 8898)
{
if(response)
{
   if(listitem == 0)
   {
SetPlayerPos(playerid, 1535.5732,-1675.6609,13.3828);
}
if(listitem == 1)
{
SetPlayerPos(playerid, 1729.6116,-1855.1116,13.4141);
}
}
 

 
Ha nemjó, akkor bocs + ha sor hiba van akkor is bocs + ha egy }-el kevesebb akkor is bocs :D
 
Mondom, hogy nem dialogid hiba. Nem is használ a szerver 1 dialogot se!!
Cím: Nem reagál, dialog
Írta: leito222 - 2012. március 11. - 19:36:31
Daviid, tudom, csak a /dm-zones dialogomat másoltam be, csak elfelejtettem átírni a dialogid-t a tiédre, de próbáld meg átírni a sajátodra, hátha jó úgy.
Cím: Nem reagál, dialog
Írta: The - 2012. március 11. - 19:38:17
Idézetet írta: Antonyo date=1331490867\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"18326\" data-ipsquote-contentclass=\"forums_Topic

public OnDialogResponse (playerid, dialogid, response, listitem, inputtext [])
{
    if(dialogid == 5111)
    {
        if(response)
        {
    switch(listitem)
    {
        case 0:
{
     SetPlayerPos(playerid, 1535.5732,-1675.6609,13.3828);
   }
case 1:
{
            SetPlayerPos(playerid, 1729.6116,-1855.1116,13.4141);
        }
            }
        }
        return 1;
    }
    return 0;
}

 

Nem jó és amúgy is ezt írja valamiért:
SERVER: Unknown command.
De behozza a dialogot. Mostmár feladom, mert elbasztam vele másfél órát és már kikészített.