Posts: 3,351
Threads: 780
Joined: Jan 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..)
Posts: 3,351
Threads: 780
Joined: Jan 2010
Thanks.
warning 202: number of arguments does not match definition
Line is:
if(GetPlayerArmour(playerid) >= 1)
Posts: 3,351
Threads: 780
Joined: Jan 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.
Posts: 3,351
Threads: 780
Joined: Jan 2010
Sorry for bothering u but im little busy with other things.
And,it's working,thanks.