IRCCMD:admins problem - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: IRCCMD:admins problem (
/showthread.php?tid=201300)
IRCCMD:admins problem -
Face9000 - 20.12.2010
Hi all,i make this code:
pawn Код:
IRCCMD:admins(botid, channel[], user[], host[])
{
new str[100],name[24];
for(new i=0;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i) && if(PlayerInfo[i][AdminLevel] > 1)
{
GetPlayerName(i,name,sizeof name);
format(str,sizeof str,"0,3Admin %s (ID:%d) (Level %d)",name,i,AdminLevel[i]);
IRC_GroupSay(gGroupID, channel,str);
}
}
return 1;
}
For show the !admins online.
Variable: if(PlayerInfo[playerid][AdminLevel] > 1)
I've this errors:
Код:
C:\Documents and Settings\l\Desktop\SFWAR.pwn(2994) : error 029: invalid expression, assumed zero
C:\Documents and Settings\l\Desktop\SFWAR.pwn(2994) : error 017: undefined symbol "playerid"
C:\Documents and Settings\l\Desktop\SFWAR.pwn(2994 -- 2996) : error 001: expected token: "}", but found ";"
C:\Documents and Settings\l\Desktop\SFWAR.pwn(2994 -- 2996) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
What's wrong?
Re: IRCCMD:admins problem -
Mean - 20.12.2010
You can't get this working, because, you havent defined playerid, or anything
Never worked with IRCCMD so I dunno, try to change botid to playerid.
new playerid[MAX_PLAYERS];
EDIT: change this line:
pawn Код:
format(str,sizeof str,"0,3Admin %s (ID:%d) (Level %d)",name,i,AdminLevel[i]);
to:
pawn Код:
format(str,sizeof(str),"0,3Admin %s (ID:%d) (Level %d)",name,i,AdminLevel[i]);
Re: IRCCMD:admins problem -
Face9000 - 21.12.2010
Still many errors.
Re: IRCCMD:admins problem -
Rachael - 21.12.2010
this line
pawn Код:
if(IsPlayerConnected(i) && if(PlayerInfo[i][AdminLevel] > 1)
should be
pawn Код:
if(IsPlayerConnected(i) && PlayerInfo[i][AdminLevel] > 1)
I don't know if this line is correct
pawn Код:
format(str,sizeof str,"0,3Admin %s (ID:%d) (Level %d)",name,i,AdminLevel[i]);
maybe it should be
pawn Код:
format(str,sizeof str,"0,3Admin %s (ID:%d) (Level %d)",name,i,PlayerInfo[i][AdminLevel]);
Re: IRCCMD:admins problem -
Face9000 - 21.12.2010
Lol it's working,thanks.