#1

I made /scan for my server

Код:
dcmd_scan(playerid, params[])
{
	#pragma unused params
	if(PlayerInfo[playerid][AdminLevel] => 1)
	{
	  new string[256]; new adminname[MAX_PLAYERS_NAME]; new hackername[MAX_PLAYER_NAME];
	  GetPlayerName(playerid, adminname, sizeof(adminname));
	  format(string, sizeof(string), "Administrator %s has runned server scan, scanning in progress...", adminname);
	  SendClientMessageToAll(YELLOW, string);
	  for(new i=0; i<GetMaxPlayers(); i++)
		{
			if(GetPlayerWeapon(i) = 38)
			{
			  new string2; new hackername[MAX_PLAYER_NAME];
			  GetPlayerName(i,hackername,sizeof(hackername));
			  SendMessageToAdmins(ORANGE, "Server has finished scanning and found following hackers:");
			  format(string2, 128, "Weapon Hacker: %s (id:%d)", hackername,i);
			  SendMessageToAdmins(ORANGE,string);
			}
		}
	}
	return 1;
}
but getting following errors

Код:
C:\Documents and Settings\SANJA\Desktop\Extreme-Games\filterscripts\hadmin.pwn(509) : error 028: invalid subscript (not an array or too many subscripts): "PlayerInfo"
C:\Documents and Settings\SANJA\Desktop\Extreme-Games\filterscripts\hadmin.pwn(509) : warning 215: expression has no effect
C:\Documents and Settings\SANJA\Desktop\Extreme-Games\filterscripts\hadmin.pwn(509) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\SANJA\Desktop\Extreme-Games\filterscripts\hadmin.pwn(509) : error 029: invalid expression, assumed zero
C:\Documents and Settings\SANJA\Desktop\Extreme-Games\filterscripts\hadmin.pwn(509) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Maybe errors are stupid, I am noob, but I need help!
Reply
#2

instead of
Код:
	if(PlayerInfo[playerid][AdminLevel] => 1)
use
Код:
	if(PlayerInfo[playerid][AdminLevel] >= 1)
or
Код:
	if(PlayerInfo[playerid][AdminLevel] > 0)
Reply
#3

thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)