17.09.2011, 11:20
/admins dialog Total online admins do help:(
17.09.2011, 11:36
This is from my script...
pawn Код:
CMD:admins(playerid,params[])
{
#pragma unused params
new string[150],count = 0,AdminPos[30];
for(new i = 0;i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PInfo[i][Level] >= 1)
{
if(PInfo[i][Level] == 1) AdminPos=""cwhite"VIP";
else if(PInfo[i][Level] == 2) AdminPos=""cyellow"Moderator";
else if(PInfo[i][Level] == 3) AdminPos=""cyellow"Administrator";
else if(PInfo[i][Level] == 4) AdminPos=""cgreen"Head Administrator";
else if(PInfo[i][Level] == 5) AdminPos=""cred"Owner";
format(string,sizeof(string),"%s"cgreen2"%s(ID:%d) "cyellow2"- "cblue"%s \n",string,GetPName(i),i,AdminPos);
ShowPlayerDialog(playerid,Adminsdialog,0,""cwhite"Admins Online",string,"OK","");
count++;
}
}
else if(count == 0)
{
ShowPlayerDialog(playerid,Adminsdialog,0,"Admins Online",""cred"No Admins Online!","OK","");
}
}
return 1;
}
17.09.2011, 12:03
(
Последний раз редактировалось JaTochNietDan; 17.09.2011 в 16:23.
Причина: Stop double posting, use the edit button.
)
Quote:
This is from my script...
pawn Код:
|
Error
______________
C:\Users\Yasin\Desktop\mode\filterscripts\dLadmin. pwn(1837) : error 017: undefined symbol "PInfo"
C:\Users\Yasin\Desktopmode\filterscripts\dLadmin.p wn(1837) : warning 215: expression has no effect
C:\Users\Yasin\Desktop\mode\filterscripts\dLadmin. pwn(1837) : error 001: expected token: ";", but found "]"
C:\Users\Yasin\Desktop\mode\filterscripts\dLadmin. pwn(1837) : error 029: invalid expression, assumed zero
C:\Users\Yasin\Desktop\mode\filterscripts\dLadmin. pwn(1837) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
_________________
17.09.2011, 12:14
Quote:
This is from my script...
pawn Код:
|
17.09.2011, 12:21
Quote:
This is from my script...
pawn Код:
|
17.09.2011, 12:25
Quote:
Error
______________ C:\Users\Yasin\Desktop\mode\filterscripts\dLadmin. pwn(1837) : error 017: undefined symbol "PInfo" C:\Users\Yasin\Desktopmode\filterscripts\dLadmin.p wn(1837) : warning 215: expression has no effect C:\Users\Yasin\Desktop\mode\filterscripts\dLadmin. pwn(1837) : error 001: expected token: ";", but found "]" C:\Users\Yasin\Desktop\mode\filterscripts\dLadmin. pwn(1837) : error 029: invalid expression, assumed zero C:\Users\Yasin\Desktop\mode\filterscripts\dLadmin. pwn(1837) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors. _________________ |
Quote:
You can better use foreach and delete IsPlayerConnected (you don't need that anymore since 0.3 and foreach is much faster, and loops only through connected players instead of the 500 slots that may not be filled). Also use a switch statement, it's much more clearer (I don't think it would affect the speed though, but its good practice).
|
17.09.2011, 12:48
Quote:
Error
______________ C:\Users\Yasin\Desktop\mode\filterscripts\dLadmin. pwn(1837) : error 017: undefined symbol "PInfo" C:\Users\Yasin\Desktopmode\filterscripts\dLadmin.p wn(1837) : warning 215: expression has no effect C:\Users\Yasin\Desktop\mode\filterscripts\dLadmin. pwn(1837) : error 001: expected token: ";", but found "]" C:\Users\Yasin\Desktop\mode\filterscripts\dLadmin. pwn(1837) : error 029: invalid expression, assumed zero C:\Users\Yasin\Desktop\mode\filterscripts\dLadmin. pwn(1837) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors. _________________ |
17.09.2011, 12:55
Quote:
Dude, you need to replace it with your own variables. Do you even have a register and login aka saving system? If you don't know how to fix this I doubt you don't have one.
|
Код HTML:
dcmd_admins(playerid, params[])
{
#pragma unused params
new string[2048];
new sendername[MAX_PLAYER_NAME];
if(IsPlayerConnected(playerid))
{
for (new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][Level] >= 1 && AccInfo[i][Hide] == 0)
{
GetPlayerName(i , sendername, sizeof(sendername));
format(string, sizeof(string),"%s[Level %d]: %s [ID:%i]\n", string,PlayerInfo[i][Level], sendername,i);
}
}
}
ShowPlayerDialog(playerid,5,DIALOG_STYLE_MSGBOX,".::Online Admins::.",string,"Okey","Cancel");
}
return 1;
}
17.09.2011, 14:41
Quote:
original
pawn Код:
|
17.09.2011, 15:11
Bugger me i nearly had an heart attack.
« Next Oldest | Next Newest »
Users browsing this thread: 1 Guest(s)