error 017: undefined symbol "pAdmin" -
HayZatic - 06.07.2011
Код:
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;
}
Re: [help Please Fast] -
Snipa - 06.07.2011
What is your line 969?
Re: [help Please Fast] -
HayZatic - 06.07.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
Re: [help Please Fast] -
Snipa - 06.07.2011
You need to replace PlayerInfo with your enum/var name. You copied this from LuxAdmin/LAdmin right?
Re: [help Please Fast] - [L3th4l] - 06.07.2011
Don't C/P codes from other scripts.
Change this:
pawn Код:
if(PlayerInfo[i][pAdmin] >= 1)
To this:
I don't know what variable you use to store player's admin level, so yeah.
--
Also, I don't think this will work:
pawn Код:
new string[128];
new sendername[ MAX_PLAYER_NAME ];
GetPlayerName(i, sendername, sizeof(sendername));
format(string, 256,
You can't exceed that array's size:
pawn Код:
new string[128];
new sendername[ MAX_PLAYER_NAME ];
GetPlayerName(i, sendername, sizeof(sendername));
format(string, sizeof(string),
Re: [help Please Fast] -
HayZatic - 06.07.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.
Re: [help Please Fast] -
Snipa - 06.07.2011
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,_}:...);
Re: [help Please Fast] -
HayZatic - 06.07.2011
Quote:
Originally Posted by Snipa
Erm, buddy.. I'll be blunt: "Your" indention sucks bawls. Monkey bawls.
|

D yea i know lol
Re: [help Please Fast] -
Laronic - 06.07.2011
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;
}
Re: [help Please Fast] -
HayZatic - 06.07.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
Re: [help Please Fast] -
HayZatic - 06.07.2011
It still isnt right now its saying now admins are online
Re: [help Please Fast] -
Laronic - 06.07.2011
Quote:
Originally Posted by HayZatic
Thanks But you did mess up a little.
Код:
format(string, sizeof(string), "RCON Admin: %s", adminname));
You Added An Extra
|
Yeah? a little typo
Re: [help Please Fast] -
HayZatic - 06.07.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
Re: [help Please Fast] -
[LCK]Chris - 06.07.2011
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
Re: [help Please Fast] -
HayZatic - 06.07.2011
http://pastebin.com/DjL6d9qj
Re: [help Please Fast] -
[LCK]Chris - 06.07.2011
what line has the problem
Re: [help Please Fast] -
HayZatic - 06.07.2011
Quote:
Originally Posted by [LCK]Chris
what line has the problem
|
The Problem is that it only shows Rcon Admins
Re: [help Please Fast] -
[LCK]Chris - 06.07.2011
replace line 971 with this
if(PlayerInfo[playerid][AdminLevel] >= 1)
Re: [help Please Fast] -
HayZatic - 06.07.2011
Код:
: error 010: invalid function or declaration
This is the line.
Re: [help Please Fast] -
[LCK]Chris - 06.07.2011
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;
}