[DCMD]Help please DIalog Thinging - 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: [DCMD]Help please DIalog Thinging (
/showthread.php?tid=476611)
[DCMD]Help please DIalog Thinging -
donhu789 - 19.11.2013
pawn Код:
dcmd_admins(playerid,params[])
{
#pragma unused params
new count = 0;
new string[128];
new ChangeColor;
SendClientMessage(playerid, green, " ");
SendClientMessage(playerid, green, "___________ |- Online Admins -| ___________");
SendClientMessage(playerid, green, " ");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
if(AccInfo[i][Level] >= 1 && AccInfo[i][Hide] == 0)
{
if(AccInfo[i][Level] > 5)
{
AdmRank = "Professional Admin";
ChangeColor = Color_Professional_Admin;
}
if(IsPlayerAdmin(i))
{
AdmRank = "RCON Administrator";
ChangeColor = Color_RCON_Administrator;
}
else
{
switch(AccInfo[i][Level])
{
case 1: {
AdmRank = "Basic Moderator";
ChangeColor = Color_Basic_Moderator;
}
case 2: {
AdmRank = "Moderator";
ChangeColor = Color_Moderator;
}
case 3: {
AdmRank = "Master Moderator";
ChangeColor = Color_Master_Moderator;
}
case 4: {
AdmRank = "Administrator";
ChangeColor = Color_Administrator;
}
case 5: {
AdmRank = "Master Administrator";
ChangeColor = Color_Master_Administrator;
}
}
}
switch(AccInfo[i][OnDuty])
{
case 0: AdmDuty = "Playing!";
case 1: AdmDuty = "On Duty!";
}
format(string, 128, "Level: %d - %s (Id:%i) | %s | %s",AccInfo[i][Level], PlayerName2(i),i,AdmRank,AdmDuty);
SendClientMessage(playerid, ChangeColor, string);
count++;
}
}
}
if (count == 0)
SendClientMessage(playerid,red,"No admin online in the list");
SendClientMessage(playerid, green, " _______________________________________");
return 1;
}
Guys please make this As CMD: And can you guys help my use it into DIALOG ?
Please Help +REP +REP +REP
Re: [DCMD]Help please DIalog Thinging -
]Rafaellos[ - 19.11.2013
pawn Код:
CMD:admins(playerid,params[])
{
new count = 0;
new string[128];
new ChangeColor;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
if(AccInfo[i][Level] >= 1 && AccInfo[i][Hide] == 0)
{
if(AccInfo[i][Level] > 5)
{
AdmRank = "Professional Admin";
ChangeColor = Color_Professional_Admin;
}
if(IsPlayerAdmin(i))
{
AdmRank = "RCON Administrator";
ChangeColor = Color_RCON_Administrator;
}
else
{
switch(AccInfo[i][Level])
{
case 1:
{
AdmRank = "Basic Moderator";
ChangeColor = Color_Basic_Moderator;
}
case 2:
{
AdmRank = "Moderator";
ChangeColor = Color_Moderator;
}
case 3:
{
AdmRank = "Master Moderator";
ChangeColor = Color_Master_Moderator;
}
case 4:
{
AdmRank = "Administrator";
ChangeColor = Color_Administrator;
}
case 5:
{
AdmRank = "Master Administrator";
ChangeColor = Color_Master_Administrator;
}
}
}
switch(AccInfo[i][OnDuty])
{
case 0: AdmDuty = "Playing!";
case 1: AdmDuty = "On Duty!";
}
format(string, 128, "%sLevel: %d - %s (Id:%i) | %s | %s\n", string, AccInfo[i][Level], PlayerName2(i),i,AdmRank,AdmDuty);
count++;
}
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Admins", string, "OK", "");
}
}
if (count == 0)
{
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Admins", "No admins online. Cheat as much as you want!", "OK", "");
}
return 1;
}
Not Tested.
Re: [DCMD]Help please DIalog Thinging -
donhu789 - 19.11.2013
ty
Re: [DCMD]Help please DIalog Thinging -
donhu789 - 19.11.2013
Hahahahahah nevermind i wont need your code anymore
I'm A scripter then i just create a better Commads /admins ty for trying helping