SA-MP Forums Archive
Spawn armor = BAN - 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: Spawn armor = BAN (/showthread.php?tid=199752)



Spawn armor = BAN - Face9000 - 16.12.2010

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..)


Re: Spawn armor = BAN - blackwave - 16.12.2010

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



Re: Spawn armor = BAN - Face9000 - 16.12.2010

Thanks.

warning 202: number of arguments does not match definition

Line is:

if(GetPlayerArmour(playerid) >= 1)


Re: Spawn armor = BAN - veyron - 16.12.2010

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



Re: Spawn armor = BAN - Flyfishes - 16.12.2010

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


Re: Spawn armor = BAN - Face9000 - 16.12.2010

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.



Re: Spawn armor = BAN - blackwave - 16.12.2010

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



Re: Spawn armor = BAN - Face9000 - 16.12.2010

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

And,it's working,thanks.