Posts: 239
Threads: 69
Joined: Jun 2011
06.07.2011, 17:01
(
Последний раз редактировалось HayZatic; 06.07.2011 в 17:40.
)
Код:
error 017: undefined symbol "pAdmin"
Code:
Код:
COMMAND:admins(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
SendClientMessage(playerid, Red, " ** Admins Online: **");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdmin] >= 1)
{
new string[128];
new sendername[ MAX_PLAYER_NAME ];
GetPlayerName(i, sendername, sizeof(sendername));
format(string, 256, "|*| Admin: %s |*|", sendername);
SendClientMessage(playerid, LIGHTBLUE, string);
}
}
}
}
return 1;
}
Posts: 815
Threads: 65
Joined: May 2010
Posts: 239
Threads: 69
Joined: Jun 2011
Quote:
Originally Posted by Snipa
What is your line 969?
|
I went to a different Code so i updated the post with my problem
Posts: 815
Threads: 65
Joined: May 2010
You need to replace PlayerInfo with your enum/var name. You copied this from LuxAdmin/LAdmin right?
Posts: 239
Threads: 69
Joined: Jun 2011
Код:
COMMAND:admins(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
SendClientMessage(playerid, Red, " ** Admins Online: **");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerAdmin(i))
{
new string[128];
new sendername[ MAX_PLAYER_NAME ];
GetPlayerName(i, sendername, sizeof(sendername));
format(string, sizeof(string),
SendClientMessage(playerid, LIGHTBLUE, string);
}
}
}
}
return 1;
}
Код:
C:\Documents and Settings\Chris\My Documents\HayZaticFreeRoam\filterscripts\HZadmin.pwn(975 -- 976) : error 035: argument type mismatch (argument 3)
C:\Documents and Settings\Chris\My Documents\HayZaticFreeRoam\filterscripts\HZadmin.pwn(981) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Posts: 815
Threads: 65
Joined: May 2010
Erm, buddy.. I'll be blunt: "Your" indention sucks bawls. Monkey bawls.
Also, you didn't format right.
Correct: format(output[], len, const format[], {Float,_}:...);
Posts: 239
Threads: 69
Joined: Jun 2011
Quote:
Originally Posted by Snipa
Erm, buddy.. I'll be blunt: "Your" indention sucks bawls. Monkey bawls.
|
D yea i know lol
Posts: 239
Threads: 69
Joined: Jun 2011
Quote:
Originally Posted by CyberGhost
pawn Код:
COMMAND:admins(playerid, params[]) { SendClientMessage(playerid, Red, " ** Admins Online: **"); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i) && IsPlayerAdmin(i)) { new string[128]; new adminname[24]; GetPlayerName(i, adminname, sizeof(adminname)); format(string, sizeof(string), "RCON Admin: %s", adminname)); SendClientMessage(playerid, LIGHTBLUE, string); } } return 1; }
|
Thanks But you did mess up a little.
Код:
format(string, sizeof(string), "RCON Admin: %s", adminname));
You Added An Extra
Posts: 239
Threads: 69
Joined: Jun 2011
It still isnt right now its saying now admins are online
Posts: 239
Threads: 69
Joined: Jun 2011
Quote:
Originally Posted by CyberGhost
Yeah? a little typo
|
Ahh, I am still having a problem it is only showing Rconadmins? i want it to show regular admins
Posts: 58
Threads: 1
Joined: Jun 2011
Reputation:
0
because you are using IsPlayerAdmin() this only checks too see if someone is rcon logged in
put your code on pastebin if you need help with it otherwise theirs not much we can help you with
Posts: 239
Threads: 69
Joined: Jun 2011
Posts: 58
Threads: 1
Joined: Jun 2011
Reputation:
0
what line has the problem
Posts: 239
Threads: 69
Joined: Jun 2011
Quote:
Originally Posted by [LCK]Chris
what line has the problem
|
The Problem is that it only shows Rcon Admins
Posts: 58
Threads: 1
Joined: Jun 2011
Reputation:
0
replace line 971 with this
if(PlayerInfo[playerid][AdminLevel] >= 1)
Posts: 239
Threads: 69
Joined: Jun 2011
Код:
: error 010: invalid function or declaration
This is the line.
Posts: 58
Threads: 1
Joined: Jun 2011
Reputation:
0
you have updated the code since you put it on pastebin
here:
COMMAND:admins(playerid, params[])
{
new sendername[20];
new string[256];
if(IsPlayerConnected(playerid))
{
SendClientMessage(playerid,Green,"Admins Online:");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[playerid][AdminLevel] >= 1)
{
GetPlayerName(i, sendername, sizeof(sendername));
format(string, 256, "Admin: %s", sendername);
SendClientMessage(playerid, Green, string);
}
}
}
}
return 1;
}