Spawn armor = BAN
#1

Hi all,i need to add a small thing to my gm.

When a player spawn armour,he get autoban.

How to add?

P.S. I've ammunation so players can buy armor,i need a system that work with spawn only (cheating..)
Reply
#2

pawn Код:
public OnPlayerSpawn(playerid)
{
   
   if(GetPlayerArmour(playerid) >= 1)
   {
         Ban(playerid);
    }
    return 1;
}
Reply
#3

Thanks.

warning 202: number of arguments does not match definition

Line is:

if(GetPlayerArmour(playerid) >= 1)
Reply
#4

pawn Код:
new Float:pArmour;
GetPlayerArmour(playerid,pArmour);
if(pArmour >= 1) Ban(playerid);
Reply
#5

pawn Код:
public OnPlayerSpawn(playerid)
{
   new Float:armour;
   GetPlayerArmour(playerid, armour);
   if(armour >= 1) Ban(playerid);
}
Too slow
Reply
#6

Ok thanks,but still im using logs,i edited the code:

Код:
  new Float:armour;
   GetPlayerArmour(playerid, armour);
   if(armour >= 1)
   new string [128];
   new pName[MAX_PLAYER_NAME];
   new plrIP[16];
   GetPlayerIp(playerid, plrIP, sizeof(plrIP));
   GetPlayerName(playerid, pName, sizeof(pName));
   format(string, sizeof(string), "%s (IP: %s) has been auto-banned. - Reason: Armour Spawn. -", pName,plrIP);
   SendClientMessageToAll(COLOR_RED, string);
   BanEx(playerid, "AntiCheat - Armour Spawn");
   BanLog(string);
And i get this errors:

Код:
C:\Documents and Settings\k\Desktop\SFWAR.pwn(1012) : error 003: declaration of a local variable must appear in a compound block
C:\Documents and Settings\k\Desktop\SFWAR.pwn(1012) : error 017: undefined symbol "string"
C:\Documents and Settings\kDesktop\SFWAR.pwn(1012) : warning 215: expression has no effect
C:\Documents and Settings\k\Desktop\SFWAR.pwn(1012) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\k\Desktop\SFWAR.pwn(1012) : fatal error 107: too many error messages on one line

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


4 Errors.
Reply
#7

.... Dont you know how to fix it yourself? yesterday I fixed 200 warnings, and alone...

pawn Код:
new Float:armour;
   GetPlayerArmour(playerid, armour);
   if(armour >= 1)
   {
      new string [128];
      new pName[MAX_PLAYER_NAME];
      new plrIP[16];
      GetPlayerIp(playerid, plrIP, sizeof(plrIP));
     GetPlayerName(playerid, pName, sizeof(pName));
     format(string, sizeof(string), "%s (IP: %s) has been auto-banned. - Reason: Armour Spawn. -", pName,plrIP);
   SendClientMessageToAll(0xFF000000, string);
   BanEx(playerid, "AntiCheat - Armour Spawn");
   BanLog(string);
   return 1;
   }
Reply
#8

Sorry for bothering u but im little busy with other things.

And,it's working,thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)