[help Please Fast]
#1

Код:
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;
	}
Reply
#2

What is your line 969?
Reply
#3

Quote:
Originally Posted by Snipa
Посмотреть сообщение
What is your line 969?
I went to a different Code so i updated the post with my problem
Reply
#4

You need to replace PlayerInfo with your enum/var name. You copied this from LuxAdmin/LAdmin right?
Reply
#5

Don't C/P codes from other scripts.

Change this:
pawn Код:
if(PlayerInfo[i][pAdmin] >= 1)
To this:
pawn Код:
if(IsPlayerAdmin(i))
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),
Reply
#6

Код:
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.
Reply
#7

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,_}:...);
Reply
#8

Quote:
Originally Posted by Snipa
Посмотреть сообщение
Erm, buddy.. I'll be blunt: "Your" indention sucks bawls. Monkey bawls.
D yea i know lol
Reply
#9

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;
}
Reply
#10

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
Код:
)
Reply
#11

It still isnt right now its saying now admins are online
Reply
#12

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
Reply
#13

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
Reply
#14

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
Reply
#15

http://pastebin.com/DjL6d9qj
Reply
#16

what line has the problem
Reply
#17

Quote:
Originally Posted by [LCK]Chris
Посмотреть сообщение
what line has the problem
The Problem is that it only shows Rcon Admins
Reply
#18

replace line 971 with this
if(PlayerInfo[playerid][AdminLevel] >= 1)
Reply
#19

Код:
: error 010: invalid function or declaration
This is the line.

Код:
	return 1;
Reply
#20

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;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)