Posts: 25
Threads: 8
Joined: Jan 2018
Reputation:
0
CMD:admins()
{
new string[300], fstring[64], adminname[25];
for(new i=0; i<MAX_PLAYERS; i++)
{
if(Admin i=0; && IsPlayerConnected(i))
{
GetPlayerName(i,adminname, sizeof(adminname));
format(fstring, sizeof(fstring),"%s (%i) - {FF0000}Level: %i{FFFFFF}\n", adminname, i,Admin[i]);
strcat(string, fstring, sizeof(string));
}
}
ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"O nline Admins",string,"OK","");
return 1;
}
Please Help me Change declaration or Function
Posts: 233
Threads: 31
Joined: Feb 2018
Reputation:
0
Copy paste the errors line
Posts: 25
Threads: 8
Joined: Jan 2018
Reputation:
0
the one I give the red mark is ERROR
Posts: 259
Threads: 2
Joined: Nov 2015
Reputation:
0
Try this:
CMD:admins()
{
new string[300], fstring[64], adminname[25];
for(new i=0; i<MAX_PLAYERS; i++)
{
if(Admin[i] == 0 && IsPlayerConnected(i))
{
GetPlayerName(i,adminname, sizeof(adminname));
format(fstring, sizeof(fstring),"%s (%i) - {FF0000}Level: %i{FFFFFF}\n", adminname, i,Admin[i]);
strcat(string, fstring);
}
}
ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"O nline Admins",string,"OK","");
return 1;
}
Posts: 115
Threads: 0
Joined: Mar 2018
Quote:
Originally Posted by Tihoy232
CMD:admins()
{
new string[300], fstring[64], adminname[25];
for(new i=0; i<MAX_PLAYERS; i++)
{
if(Admin i=0; && IsPlayerConnected(i))
{
GetPlayerName(i,adminname, sizeof(adminname));
format(fstring, sizeof(fstring),"%s (%i) - {FF0000}Level: %i{FFFFFF}\n", adminname, i,Admin[i]);
strcat(string, fstring, sizeof(string));
}
}
ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"O nline Admins",string,"OK","");
return 1;
}
Please Help me Change declaration or Function
|
Код:
CMD:admins()
{
new string[1000],adminname[MAX_PLAYER_NAME], AdminsOnLine;
for(new i=0; i<MAX_PLAYERS; i++){
if(!IsPlayerConnected(i) && Admin[i] == 0) continue;
AdminsOnLine++;
}
if(AdminsOnLine > 0){
format(string, sizeof(string),"Admins is online (%d)", AdminsOnLine);
}else format(string, sizeof(string),"Admins are not online!", AdminsOnLine);
for(new i=0; i<MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i) && Admin[i] == 0) continue;
GetPlayerName(i,adminname, sizeof(adminname));
format(string, sizeof(string),"%s\n %s(ID:%i) - {FF0000}Level: %i{FFFFFF}\n",string, adminname, i,Admin[i]);
}
return ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"O nline Admins",string,"OK","");
}
Posts: 150
Threads: 6
Joined: Oct 2013
Reputation:
0
You guys are making such a simple command to look like the most complex one when it doesn't have to be so difficult.
Posts: 357
Threads: 6
Joined: Feb 2018
Quote:
Originally Posted by ForCop
Код:
CMD:admins()
{
new string[1000],adminname[MAX_PLAYER_NAME], AdminsOnLine;
for(new i=0; i<MAX_PLAYERS; i++){
if(!IsPlayerConnected(i) && Admin[i] == 0) continue;
AdminsOnLine++;
}
if(AdminsOnLine > 0){
format(string, sizeof(string),"Admins is online (%d)", AdminsOnLine);
}else format(string, sizeof(string),"Admins are not online!", AdminsOnLine);
for(new i=0; i<MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i) && Admin[i] == 0) continue;
GetPlayerName(i,adminname, sizeof(adminname));
format(string, sizeof(string),"%s\n %s(ID:%i) - {FF0000}Level: %i{FFFFFF}\n",string, adminname, i,Admin[i]);
}
return ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"O nline Admins",string,"OK","");
}
|
CMD:admins(playerid) - player command
Posts: 115
Threads: 0
Joined: Mar 2018
Quote:
Originally Posted by UFF
CMD:admins(playerid) - player command
|
he's already big, he knows how to put it "playerid"
Posts: 357
Threads: 6
Joined: Feb 2018
Quote:
Originally Posted by Tihoy232
CMD:admins()
{
new string[300], fstring[64], adminname[25];
for(new i=0; i<MAX_PLAYERS; i++)
{
if(Admin i=0; && IsPlayerConnected(i))
{
GetPlayerName(i,adminname, sizeof(adminname));
format(fstring, sizeof(fstring),"%s (%i) - {FF0000}Level: %i{FFFFFF}\n", adminname, i,Admin[i]);
strcat(string, fstring, sizeof(string));
}
}
ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"O nline Admins",string,"OK","");
return 1;
}
Please Help me Change declaration or Function
|
Quote:
Originally Posted by ForCop
he's already big, he knows how to put it "playerid"
|
i see, then he could have did that instead of posting here.
Anyhow, his problem got fixed!
Posts: 115
Threads: 0
Joined: Mar 2018
Quote:
Originally Posted by UFF
i see, then he could have did that instead of posting here.
Anyhow, his problem got fixed!
|
yes