Making a weapon ban script. FS?
#1

Okay, hello everyone, I was experimenting with a script that I made though I am a new coder, and havent done anything yet, this is what I came up with.

Код:
#include <a_samp>
>>public missing - what should I forward?<<
	new weap, ammo;
	for(new i - 0; i < MAX_PLAYERS; i++)
	{
	  if(IsPlayerConnected(i))
		{
			GetPlayerWeaponData(i, 7, weap, ammo);
  			if(ammo > 1 && weap == 9
      SendPlayerMessageToPlayer(playerid, senderid, "You have been banned for using a weapon hack.");
			Ban([i]);
		return 1;
		}
		else if(ammo > 1 && weap == 35 || 36 || 37 || 38 || 39 || 40 || 43 || 44 || 45
		SendPlayerMessageToPlayer(playerid, senderid, "You have been banned for using a weapon hack.");
		Ban([i]);
What im trying to do here is make a system where it bans these weapons if a player gets a hold of them, and also I cant seem to get a public assigned, or make the [i] work, can I get some help here?

Also, if my code is wrong, please show me how to correct this!

p.s. this is what I get when i try to compile with the pawno compiler.

Код:
C:\Documents and Settings\Administrator\Desktop\samp02Xserver.win32\filterscripts\bantest.pwn(4) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\samp02Xserver.win32\filterscripts\bantest.pwn(6) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\samp02Xserver.win32\filterscripts\bantest.pwn(9) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\samp02Xserver.win32\filterscripts\bantest.pwn(12) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\samp02Xserver.win32\filterscripts\bantest.pwn(14) : error 010: invalid function or declaration
C:\Documents and Settings\Administrator\Desktop\samp02Xserver.win32\filterscripts\bantest.pwn(18) : warning 203: symbol is never used: "ammo"
C:\Documents and Settings\Administrator\Desktop\samp02Xserver.win32\filterscripts\bantest.pwn(18) : warning 203: symbol is never used: "weap"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.
Reply


Messages In This Thread
Making a weapon ban script. FS? - by Hiitch - 23.07.2009, 00:14
Re: Making a weapon ban script. FS? - by gkstjd031 - 23.07.2009, 12:31
Re: Making a weapon ban script. FS? - by Hiitch - 24.07.2009, 13:51
Re: Making a weapon ban script. FS? - by coole210 - 24.07.2009, 13:54

Forum Jump:


Users browsing this thread: 1 Guest(s)