LITTE HELP [LuxAdmin] - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: LITTE HELP [LuxAdmin] (
/showthread.php?tid=301657)
LITTE HELP [LuxAdmin] -
-BadGirl- - 05.12.2011
I Need Some Help With
LuxAdmin System
With /Admins I Need It in Dialog Msg Box
SomeOne Make It On Dialog Msg Box But When some one type /admins and 2 or 3 admin Onlince
But On Msg Box Showing Only One 1 Admin
Only 1 Admin Name Showing ? ? Not More's Why
Re: LITTE HELP [LuxAdmin] -
[MG]Dimi - 05.12.2011
Can we see code for it?
Re: LITTE HELP [LuxAdmin] -
-BadGirl- - 05.12.2011
Here Is THe Code
Код:
dcmd_admins(playerid,params[])
{
#pragma unused params
new
count = 0,
string[128];
for(new i = 0; i < MAX_PLAYERS; i++) {
if (IsPlayerConnected(i)) {
if(AccInfo[i][Level] >= 1 && AccInfo[i][Hide] == 0) {
if(AccInfo[i][Level] > 6) {
AdmRank = "[FOUNDER]";
}
if(IsPlayerAdmin(i)) AdmRank ="[RCON ADMIN]";
else
switch(AccInfo[i][Level]) {
case 1: AdmRank = "{EBE710}[CO-MODERATOR]";
case 2: AdmRank = "{2E10EB}[MODERATOR]";
case 3: AdmRank = "{10EB23}[ADMIN]";
case 4: AdmRank = "{EB105D}[LEADER]";
case 5: AdmRank = "{EB1F10}[MANAGEMENT]";
case 6: AdmRank = "{EB1F10}[FOUNDER]";
}
format(string, 128, "{B3C924}%s [ID:%i] | Level: %d - %s",PlayerName2(i),i,AccInfo[i][Level], AdmRank);
ShowPlayerDialog(playerid, 500, DIALOG_STYLE_MSGBOX, "{AA3333}___________|- ONLINE ADMINS -|__________", string, "Close", "");
count++;
}
}
}
if (count == 0)
ShowPlayerDialog(playerid, 500, DIALOG_STYLE_MSGBOX, "{AA3333}_________|- ONLINE ADMINS -|___________", "{AA3333}NO ADMINS ONLINE\n{33AA33} ____________", "Close", "");
return 1;
}
Re: LITTE HELP [LuxAdmin] -
leong124 - 05.12.2011
pawn Код:
dcmd_admins(playerid,params[])
{
#pragma unused params
new
count = 0,
string[128];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
if(AccInfo[i][Level] >= 1 && AccInfo[i][Hide] == 0)
{
if(IsPlayerAdmin(i)) AdmRank ="[RCON ADMIN]";
else
{
switch(AccInfo[i][Level])
{
case 1: AdmRank = "{EBE710}[CO-MODERATOR]";
case 2: AdmRank = "{2E10EB}[MODERATOR]";
case 3: AdmRank = "{10EB23}[ADMIN]";
case 4: AdmRank = "{EB105D}[LEADER]";
case 5: AdmRank = "{EB1F10}[MANAGEMENT]";
case 6: AdmRank = "{EB1F10}[FOUNDER]";
default: AdmRank = "[FOUNDER]";//Default means all the other
//unmentioned case. Since you have checked the player's level
//is larger than 1, this means he must be a founder
//(unless you have negative level).
}
}
format(string, 128, "%s{B3C924}%s [ID:%i] | Level: %d - %s\n", string, PlayerName2(i), i, AccInfo[i][Level], AdmRank);
//We are appending the string, so put %s before any new data is added,
//and that parameter actually refers to the string itself.
count++;
}
}
}
if (count == 0) ShowPlayerDialog(playerid, 500, DIALOG_STYLE_MSGBOX, "{AA3333}_________|- ONLINE ADMINS -|___________", "{AA3333}NO ADMINS ONLINE\n{33AA33} ____________", "Close", "");
else ShowPlayerDialog(playerid, 500, DIALOG_STYLE_MSGBOX, "{AA3333}___________|- ONLINE ADMINS -|__________", string, "Close", "");
//Don't show dialog in a loop, it won't show all the admins continuously.
//Show it after all the data are ready.
return 1;
}
Re: LITTE HELP [LuxAdmin] -
bestr32 - 15.01.2012
luke shut up. But I can't help you.. sorry lol im a beginner. i haven't been scripting 9 months maybe more :S