Jump to content
  • 0

pomoc Admins cez DIALOG_STYLE_MSGBOX


ShowMe

Dotaz

ahojte.

možno to tu je ale chcem sa vas opitat či by ste mi nepomohli.

v pawnu som lama a chcel som si vytvoriť príkaz /admins cez DIALOG_STYLE_MSGBOX.

keď to skompilujem tak mi to nehodí žádný error ,ale ked to dám na server a na serveru dám príkaz /admins tak mi to nezobrazí v dialogu ale normalně v chatu.

#define DIALOG_ADMINS
dcmd_admins(playerid, params[])
ShowPlayerDialog(playerid,1,DIALOG_ADMINS,DIALOG_STYLE_MSGBOX,"Online Administrátoři","
{
   #pragma unused params
SendClientMessage(playerid, B_SVITIVA, "");

   new string[60];

for(new i=0;i<=MAX_PLAYERS_EX;i++)
{
	if(IsPlayerConnected(i))
		{
		if(IsPlayerAdmin(i) && Informace[i][AdminLevel] == 0)
		{
			format(string, 60, " %s - > RCON",Jmeno(i));
			SystemMessage(playerid,string);
		}
		else if(Informace[i][AdminLevel] > 0 && !IsPlayerAdmin(i))
		{
			format(string, 60, " %s - > Administrátor ",Jmeno(i),Informace[i][AdminLevel]);
			SystemMessage(playerid,string);
		}
		else if(IsPlayerAdmin(i) && Informace[i][AdminLevel] > 10)
		{
			format(string, 60, " %s - > Hlavní Administrátor + RCON","OK","OK",Jmeno(i),Informace[i][AdminLevel]);
			SystemMessage(playerid,string);
		}
		}
	}
return true;
}

prosím nesmejte se mi.

som lama nič neviem ale chcel som to mať na servery.

ďakujem

Link to comment
Share on other sites

Recommended Posts

  • 0
Tohle je riadok 475 ted haze errory

ShowPlayerDialog(playerid,1,DIALOG_ADMINS,DIALOG_STYLE_MSGBOX,"Online Administrátoři",string,"","");

 

skus tam spravit aspon jedno tlacitko:

 

ShowPlayerDialog(playerid,1,DIALOG_ADMINS,DIALOG_STYLE_MSGBOX,"Online Administrátoři",string,Ok,"");

C:\Users\Lukáš\Desktop\Pixus\Pawno 0.3c\exis.pwn(475) : error 029: invalid expression, assumed zero
C:\Users\Lukáš\Desktop\Pixus\Pawno 0.3c\exis.pwn(475) : warning 215: expression has no effect
C:\Users\Lukáš\Desktop\Pixus\Pawno 0.3c\exis.pwn(475) : warning 215: expression has no effect
C:\Users\Lukáš\Desktop\Pixus\Pawno 0.3c\exis.pwn(475) : warning 215: expression has no effect
C:\Users\Lukáš\Desktop\Pixus\Pawno 0.3c\exis.pwn(475) : error 017: undefined symbol "Ok"
C:\Users\Lukáš\Desktop\Pixus\Pawno 0.3c\exis.pwn(475) : error 029: invalid expression, assumed zero
C:\Users\Lukáš\Desktop\Pixus\Pawno 0.3c\exis.pwn(475) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase

 

 

4 Errors.

stejny riadok ako som ti posielal

Link to comment
Share on other sites

  • 0
Tohle je riadok 475 ted haze errory

ShowPlayerDialog(playerid,1,DIALOG_ADMINS,DIALOG_STYLE_MSGBOX,"Online Administrátoři",string,"","");

 

skus tam spravit aspon jedno tlacitko:

 

ShowPlayerDialog(playerid,1,DIALOG_ADMINS,DIALOG_STYLE_MSGBOX,"Online Administrátoři",string,Ok,"");

C:\Users\Lukáš\Desktop\Pixus\Pawno 0.3c\exis.pwn(475) : error 029: invalid expression, assumed zero
C:\Users\Lukáš\Desktop\Pixus\Pawno 0.3c\exis.pwn(475) : warning 215: expression has no effect
C:\Users\Lukáš\Desktop\Pixus\Pawno 0.3c\exis.pwn(475) : warning 215: expression has no effect
C:\Users\Lukáš\Desktop\Pixus\Pawno 0.3c\exis.pwn(475) : warning 215: expression has no effect
C:\Users\Lukáš\Desktop\Pixus\Pawno 0.3c\exis.pwn(475) : error 017: undefined symbol "Ok"
C:\Users\Lukáš\Desktop\Pixus\Pawno 0.3c\exis.pwn(475) : error 029: invalid expression, assumed zero
C:\Users\Lukáš\Desktop\Pixus\Pawno 0.3c\exis.pwn(475) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase

 

 

4 Errors.

stejny riadok ako som ti posielal

Link to comment
Share on other sites

  • 0
ShowPlayerDialog(playerid,1,DIALOG_ADMINS,DIALOG_STYLE_MSGBOX,"Online Administrátoři",string,Ok,"");

 

 

fail :d

hele som lama ale dialog mam nedefinovany jestli myslis to:D

#define DIALOG_ADMINS

boze uz neviem co stim

Link to comment
Share on other sites

  • 0
ShowPlayerDialog(playerid,1,DIALOG_ADMINS,DIALOG_STYLE_MSGBOX,"Online Administrátoři",string,Ok,"");

 

 

fail :d

hele som lama ale dialog mam nedefinovany jestli myslis to:D

#define DIALOG_ADMINS

boze uz neviem co stim

Link to comment
Share on other sites

  • 0
bože ....

díky ale:D

C:\Users\Lukáš\Desktop\Pixus\Pawno 0.3c\exis.pwn(475) : error 017: undefined symbol "Ok"
C:\Users\Lukáš\Desktop\Pixus\Pawno 0.3c\exis.pwn(2287) : warning 235: public function lacks forward declaration (symbol "OnPlayerPrivmsg")
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


1 Error.

 

 

 

 

ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"Online Administrátoři",string,Ok,"");

Link to comment
Share on other sites

  • 0
bože ....

díky ale:D

C:\Users\Lukáš\Desktop\Pixus\Pawno 0.3c\exis.pwn(475) : error 017: undefined symbol "Ok"
C:\Users\Lukáš\Desktop\Pixus\Pawno 0.3c\exis.pwn(2287) : warning 235: public function lacks forward declaration (symbol "OnPlayerPrivmsg")
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


1 Error.

 

 

 

 

ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"Online Administrátoři",string,Ok,"");

Link to comment
Share on other sites

  • 0

moje chyba ..

 

ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"Online Administrátoři",string,"Ok","");

 

 

A najdi ten public OnPrivMsg a celej ho smaž (u není v 0.3c)

Link to comment
Share on other sites

  • 0

moje chyba ..

 

ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"Online Administrátoři",string,"Ok","");

 

 

A najdi ten public OnPrivMsg a celej ho smaž (u není v 0.3c)

Link to comment
Share on other sites

  • 0
aha ta 1 tam je zbytocna

 

ShowPlayerDialog(playerid,DIALOG_ADMINS,DIALOG_STYLE_MSGBOX,"Online Administrátoři",string,Ok,"");

 

hadam ti to uz pojde

nein:D

C:\Users\Lukáš\Desktop\Pixus\Pawno 0.3c\exis.pwn(475) : error 035: argument type mismatch (argument 3)
C:\Users\Lukáš\Desktop\Pixus\Pawno 0.3c\exis.pwn(2287) : warning 235: public function lacks forward declaration (symbol "OnPlayerPrivmsg")
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


1 Error.

 

-- stř 03. srp 2011 21:01:30 --

 

moje chyba ..

 

ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"Online Administrátoři",string,"Ok","");

 

 

A najdi ten public OnPrivMsg a celej ho smaž (u není v 0.3c)

ten tam neni je tam OnPlayerPrivMsg:D

 

-- stř 03. srp 2011 21:02:25 --

 

už asi viem

 

-- stř 03. srp 2011 21:05:14 --

 

uz len 1 error:D

C:\Users\Lukáš\Desktop\Pixus\Pawno 0.3c\exis.pwn(475) : error 035: argument type mismatch (argument 3)
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


1 Error.

help pls

 

-- stř 03. srp 2011 21:13:06 --

 

aha ta 1 tam je zbytocna

 

ShowPlayerDialog(playerid,DIALOG_ADMINS,DIALOG_STYLE_MSGBOX,"Online Administrátoři",string,"Ok","");

 

hadam ti to uz pojde

nie ,furt error-.)

Link to comment
Share on other sites

  • 0
aha ta 1 tam je zbytocna

 

ShowPlayerDialog(playerid,DIALOG_ADMINS,DIALOG_STYLE_MSGBOX,"Online Administrátoři",string,Ok,"");

 

hadam ti to uz pojde

nein:D

C:\Users\Lukáš\Desktop\Pixus\Pawno 0.3c\exis.pwn(475) : error 035: argument type mismatch (argument 3)
C:\Users\Lukáš\Desktop\Pixus\Pawno 0.3c\exis.pwn(2287) : warning 235: public function lacks forward declaration (symbol "OnPlayerPrivmsg")
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


1 Error.

 

-- stř 03. srp 2011 21:01:30 --

 

moje chyba ..

 

ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"Online Administrátoři",string,"Ok","");

 

 

A najdi ten public OnPrivMsg a celej ho smaž (u není v 0.3c)

ten tam neni je tam OnPlayerPrivMsg:D

 

-- stř 03. srp 2011 21:02:25 --

 

už asi viem

 

-- stř 03. srp 2011 21:05:14 --

 

uz len 1 error:D

C:\Users\Lukáš\Desktop\Pixus\Pawno 0.3c\exis.pwn(475) : error 035: argument type mismatch (argument 3)
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


1 Error.

help pls

 

-- stř 03. srp 2011 21:13:06 --

 

aha ta 1 tam je zbytocna

 

ShowPlayerDialog(playerid,DIALOG_ADMINS,DIALOG_STYLE_MSGBOX,"Online Administrátoři",string,"Ok","");

 

hadam ti to uz pojde

nie ,furt error-.)

Link to comment
Share on other sites

  • 0
":2m52an0h]Jste mě úplně zmátli, ukaž, jak to teda teď máš celé + hoď sem ty errory.

dcmd_admins(playerid, params[])

{
#pragma unused params


new string[60];

for(new i=0;i<=MAX_PLAYERS_EX;i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerAdmin(i) && Informace[i][AdminLevel] == 0)
{
format(string, 60, " %s - > RCON",Jmeno(i));

}
else if(IsPlayerAdmin (i) && Informace [i][AdminLevel] > 3)
{
format(string, 60," %s - > Moderátor ",Jmeno(i),Informace[i][AdminLevel]);
}
else if(IsPlayerAdmin (i) && Informace [i][AdminLevel] > 4)
{
format(string, 60, " %s - > Administrátor ",Jmeno(i),Informace[i][AdminLevel]);

}
else if(IsPlayerAdmin(i) && Informace[i][AdminLevel] > 10)
{
format(string, 60, " %s - > Hlavní Administrátor + RCON","OK","OK",Jmeno(i),Informace[i][AdminLevel]);

}
}
}

ShowPlayerDialog(playerid,DIALOG_STYLE_MSGBOX,"Online Administrátoři",string,Ok,"");
return true;
}

errory:

C:\Users\Lukáš\Desktop\Pixus\Pawno 0.3c\exis.pwn(479) : error 035: argument type mismatch (argument 3)
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


1 Error.

Link to comment
Share on other sites

  • 0

Lebo to máš zle omg snáď ti to petr_ap povedal dosť zrozumitelne!

 

skús tu určite ti to pomôže!

 

Máš tam moc veľa podmienok ! Dalo by sa to určite optimalizovať, ale ja ti tu riešenie nenapíšem!

 

EDIT://

Pokial som si dobre všimol tak ty definuješ ten dialogid takto:

#define DIALOG_ADMINS

ale chýba ti tam vlastne id toho dialógu, takže takto:

#define DIALOG_ADMINS 500 //môžeš tu mať hocijaké číslo ale nemôže sa to číslo opakovať pri inom dialógu, pretože by ti nezobrazovalo ten dialóg, ktorý chceš

Link to comment
Share on other sites

  • 0

já to podle něho udělal,ještě mi to psal do pm ale když dám /admins tak padne srvr

 

-- sob 06. srp 2011 16:23:26 --

 

C:\Users\Lukáš\Desktop\Pixus\Pawno 0.3c\exis.pwn(474) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


1 Warning.

a ked to dam na server tak mi cmd /admins nejde

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...