Help About My Commands is something wrong ? - 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: Help About My Commands is something wrong ? (
/showthread.php?tid=482825)
Help About My Commands is something wrong ? -
donhu789 - 23.12.2013
pawn Code:
CMD:admins(playerid, params[])
{
if(pInfo[playerid][pHour] >= 1)
{
new adminstring[128];
new AdminDuty[128];
if(IsPlayerConnected(playerid))
{
for (new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
switch(pInfo[i][pAdminDuty])
{
case 0: AdminDuty = "Playing!";
case 1: AdminDuty = "OnDuty!";
}
if(pInfo[i][pAdminLevel] > 0)
{
format(adminstring, sizeof(adminstring),"%s%s %s\n", adminstring, GetAdminName(i), PlayerName(i));
}
}
}
ShowPlayerDialog(playerid,DIALOG_ADMINS,DIALOG_STYLE_MSGBOX,"Online admins",adminstring,"Close","");
}
else return SendClientMessage(playerid,-1,""chat" No admins online");
}
else return SendClientMessage(playerid,-1,""chat" You cannot view admins online (You need 1 hours IG time)");
return 1;
}
Is called Lost Idefintifi
can anyone help and see what wrong s?
Re: Help About My Commands is something wrong ? -
[DK]Dark_Knight - 23.12.2013
Quickly whipped this up
give it a go
pawn Code:
CMD:admins(playerid, params[])
{
new adminstring[128];
new AdminDuty[128];
new totadmins = 0;
if(pInfo[playerid][pHour] >= 1)
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(pInfo[i][pAdminLevel] > 0)
{
switch(pInfo[i][pAdminDuty])
{
case 0: AdminDuty = "Playing!";
case 1: AdminDuty = "OnDuty!";
}
format(adminstring, sizeof(adminstring),"%s%s %s\n", adminstring, GetAdminName(i), PlayerName(i));
totadmins++;
}
}
}
}
else return SendClientMessage(playerid,-1,""chat" You cannot view admins online (You need 1 hours IG time)");
if(totadmins == 0) return SendClientMessage(playerid,-1,""chat" No Admins Online");
ShowPlayerDialog(playerid,DIALOG_ADMINS,DIALOG_STYLE_MSGBOX,"Online admins",adminstring,"Close","");
return 1;
}
Re: Help About My Commands is something wrong ? -
donhu789 - 23.12.2013
hey check my last post at The SaveStats thing i have a problem that you said