Jump to content
  • 0

pomoc Pád serveru po listitem v dialogu


LukasB

Dotaz

Čaute, sorry že otravujem a sorry že som sa k vám zle správal ale toto mi fakt vytahuje nervy :d.

Spravil som si cez príkaz /info dialog v ktorom mám hlavne ... Chyba je že vždy keď sa mi zbrazí "TEST" ,tak mi spadne server .

CMD:info(playerid,params[])
{
    new str[100];
	strcat(str,"Hlavné");
	ShowPlayerDialog(playerid,DIALOG_INFO,DIALOG_STYLE_LIST,"Info",str,"OK","Nic");
	return 1;
}

A v OnDialogRespose som si spravil na to switch(listitem), kvôli tomu, že tam budem mať viac riadkov ...

	    case DIALOG_INFO:
	    {
                if(response == 1)
		{
			switch(listitem)
			{
				case 0:{ SendClientMessage(playerid,COLOR_BRIGHTRED,"TEST"); }
			}
		}
	    }

Dialog DIALOG_INFO je definovani ako 1006.

Ďakujem za každú odpoveď, a každej sa budem snažiť pochopiť :d

Edited by LukasB
Link to comment
Share on other sites

12 odpovědí na tuto otázku

Recommended Posts

  • 0

Ty seš kundibád  :facepalm: nechci vidět ten tvůj admin systém o kterým jsi psal, a jinde na fóru si dokonce žebral o pomoc s tím admin systémem :d
Neser se do pawna, když děláš takový stupidní chyby..... - jinak v tomhle chybu nemáš, kvůli který by ti to padalo

Dialog udělej takhle:
 

CMD:info(playerid,params[])
{
 ShowPlayerDialog(playerid,DIALOG_INFO,DIALOG_STYLE_LIST,"Info","Hlavné","OK","Nic");
 return 1;
}
Link to comment
Share on other sites

  • 0

To je jedno ... chcem mať v tom poriadok a z strcatom mi ide všetko ... v tom chyba neni, keď sa to zobrazuje a vykoná príkaz ... nenadavaj mi, keď sám nevieš kde je chyba ...

Link to comment
Share on other sites

  • 0

ukaz ondialogresponse. v nejlepsim pripade celej, nebo aspon od "case DIALOG_INFO:" az po konec ondialogresponse (tedy az po return 1;)

Link to comment
Share on other sites

  • 0

case DIALOG_INFO:
{
if(response == 1)
{
switch(listitem)
{
case 0:{ SendClientMessage(playerid,COLOR_BRIGHTRED,"TEST"); }
}
}
}
case DIALOG_NASTAVENIE:
{
switch(listitem)
{
case 0:
{
if(!strcmp(DOF2_GetString(Account(playerid),"Spawn","Nastavenie"),"Zamestnania",true)){ DOF2_SetString(Account(playerid),"Spawn","Firmy","Nastavenie"); DOF2_SaveFile(); }
else if(!strcmp(DOF2_GetString(Account(playerid),"Spawn","Nastavenie"),"Firmy",true)){ DOF2_SetString(Account(playerid),"Spawn","Domu","Nastavenie"); DOF2_SaveFile(); }
else if(!strcmp(DOF2_GetString(Account(playerid),"Spawn","Nastavenie"),"Domu",true)){ DOF2_SetString(Account(playerid),"Spawn","Gangu","Nastavenie"); DOF2_SaveFile(); }
else if(!strcmp(DOF2_GetString(Account(playerid),"Spawn","Nastavenie"),"Gangu",true)){ DOF2_SetString(Account(playerid),"Spawn","Zamestnania","Nastavenie"); DOF2_SaveFile(); }
}
case 1:
{
if(!strcmp(DOF2_GetString(Account(playerid),"CisliceZivota","Nastavenie"),"Zapnute",true)){ DOF2_SetString(Account(playerid),"CisliceZivota","Vypnute","Nastavenie"); DOF2_SaveFile(); }
else if(!strcmp(DOF2_GetString(Account(playerid),"CisliceZivota","Nastavenie"),"Vypnute",true)){ DOF2_SetString(Account(playerid),"CisliceZivota","Zapnute","Nastavenie"); DOF2_SaveFile(); }
}
case 2:
{
if(!strcmp(DOF2_GetString(Account(playerid),"NickyHracov","Nastavenie"),"Zapnute",true)){ DOF2_SetString(Account(playerid),"NickyHracov","Vypnute","Nastavenie"); DOF2_SaveFile(); }
else if(!strcmp(DOF2_GetString(Account(playerid),"NickyHracov","Nastavenie"),"Vypnute",true)){ DOF2_SetString(Account(playerid),"NickyHracov","Zapnute","Nastavenie"); DOF2_SaveFile(); }
}
case 3:
{
if(!strcmp(DOF2_GetString(Account(playerid),"GangUzemie","Nastavenie"),"Zapnute",true)){ DOF2_SetString(Account(playerid),"GangUzemie","Vypnute","Nastavenie"); DOF2_SaveFile(); }
else if(!strcmp(DOF2_GetString(Account(playerid),"GangUzemie","Nastavenie"),"Vypnute",true)){ DOF2_SetString(Account(playerid),"GangUzemie","Zapnute","Nastavenie"); DOF2_SaveFile(); }
}
case 4:
{
if(!strcmp(DOF2_GetString(Account(playerid),"PoziciaPoOdpojeni","Nastavenie"),"Zapnute",true)){ DOF2_SetString(Account(playerid),"PoziciaPoOdpojeni","Vypnute","Nastavenie"); DOF2_SaveFile(); }
else if(!strcmp(DOF2_GetString(Account(playerid),"PoziciaPoOdpojeni","Nastavenie"),"Vypnute",true)){ DOF2_SetString(Account(playerid),"PoziciaPoOdpojeni","Zapnute","Nastavenie"); DOF2_SaveFile(); }
}
case 5:
{
if(!strcmp(DOF2_GetString(Account(playerid),"KillList","Nastavenie"),"Globálny",true)){ DOF2_SetString(Account(playerid),"KillList","V strem. zone","Nastavenie"); DOF2_SaveFile(); }
else if(!strcmp(DOF2_GetString(Account(playerid),"KillList","Nastavenie"),"V strem. zone",true)){ DOF2_SetString(Account(playerid),"KillList","Globálny","Nastavenie"); DOF2_SaveFile(); }
}
case 6:
{
if(!strcmp(DOF2_GetString(Account(playerid),"VedlajsiChat","Nastavenie"),"Zapnute",true)){ DOF2_SetString(Account(playerid),"VedlajsiChat","Vypnute","Nastavenie"); DOF2_SaveFile(); }
else if(!strcmp(DOF2_GetString(Account(playerid),"VedlajsiChat","Nastavenie"),"Vypnute",true)){ DOF2_SetString(Account(playerid),"VedlajsiChat","Zapnute","Nastavenie"); DOF2_SaveFile(); }
}
case 7:
{
if(!strcmp(DOF2_GetString(Account(playerid),"Ankety","Nastavenie"),"Zapnute",true)){ DOF2_SetString(Account(playerid),"Ankety","Vypnute","Nastavenie"); DOF2_SaveFile(); }
else if(!strcmp(DOF2_GetString(Account(playerid),"Ankety","Nastavenie"),"Vypnute",true)){ DOF2_SetString(Account(playerid),"Ankety","Zapnute","Nastavenie"); DOF2_SaveFile(); }
}
case 8:
{
if(!strcmp(DOF2_GetString(Account(playerid),"Hodiny","Nastavenie"),"Zapnute",true)){ DOF2_SetString(Account(playerid),"Hodiny","Vypnute","Nastavenie"); DOF2_SaveFile(); }
else if(!strcmp(DOF2_GetString(Account(playerid),"Hodiny","Nastavenie"),"Vypnute",true)){ DOF2_SetString(Account(playerid),"Hodiny","Zapnute","Nastavenie"); DOF2_SaveFile(); }
}
case 9:
{
if(!strcmp(DOF2_GetString(Account(playerid),"PM","Nastavenie"),"Zapnute",true)){ DOF2_SetString(Account(playerid),"PM","Vypnute","Nastavenie"); DOF2_SaveFile(); }
else if(!strcmp(DOF2_GetString(Account(playerid),"PM","Nastavenie"),"Vypnute",true)){ DOF2_SetString(Account(playerid),"PM","Zapnute","Nastavenie"); DOF2_SaveFile(); }
}
case 10:
{
if(!strcmp(DOF2_GetString(Account(playerid),"PMVzkaz","Nastavenie"),"Zapnute",true)){ DOF2_SetString(Account(playerid),"PMVzkaz","Vypnute","Nastavenie"); DOF2_SaveFile(); }
else if(!strcmp(DOF2_GetString(Account(playerid),"PMVzkaz","Nastavenie"),"Vypnute",true)){ DOF2_SetString(Account(playerid),"PMVzkaz","Zapnute","Nastavenie"); DOF2_SaveFile(); }
}
case 11:
{
if(!strcmp(DOF2_GetString(Account(playerid),"BarvaNicku","Nastavenie"),"Zapnute",true)){ DOF2_SetString(Account(playerid),"CisliceZivota","Vypnute","Nastavenie"); DOF2_SaveFile(); }
else if(!strcmp(DOF2_GetString(Account(playerid),"BarvaNicku","Nastavenie"),"Vypnute",true)){ DOF2_SetString(Account(playerid),"CisliceZivota","Zapnute","Nastavenie"); DOF2_SaveFile(); }
}
case 12:
{

}
}
}
}
return 1;
}
Edited by LukasB
Link to comment
Share on other sites

  • 0

Tak seš dement ? nauč se základy pawna.. seš hnusný prase který zatěžuje server tím čtením ze souboru při každým dialogu.

Odeber si jednu závorku nad Returnem - pod case 12: druhá závorka smazat.
 

Link to comment
Share on other sites

  • 0

NAD TÝM JE EŠTE 5 DIALOGOV... KEBY SI NEBOL KKT TAK LOGICKY ... switch(dialogid){} nič ti nehovorí ?????? KEBY SOM TAM MAL O 1 ZATVORKU VIAC, PÍŠE TO CHYBU ...

JE TAM KVOLI TOMU DIALOGID !

Link to comment
Share on other sites

  • 0

OMG :d Robil som log a preto to padalo :d ale dik za snahu, LOCK

 

Pro Lukes_CZ

code měl naprosto v pořádku. tím že používá switch se vyvaruje spoušténí jinejch částí scriptu. a k těm urážkám typu "seš dement" a "seš hnusný prase", tak těm se příště prosím vyvaruj. děkuji (Om3n)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...