18.11.2010, 09:35
Ok due to the failure of tested anti cheat's i decided to make my own,I used this tutorial here:
http://forum.sa-mp.com/showthread.ph...ght=Anti+Cheat
Now i want it to be a include ive saved it to a .inc and include it to my GM,I get errors with the callbacks,Im sure a include is laid out diffrently can someone show me how to change it into a include so i can use it in my GM and FS's
Code Here:
Errors on my GM when i include it:
Thanks in advanced!
http://forum.sa-mp.com/showthread.ph...ght=Anti+Cheat
Now i want it to be a include ive saved it to a .inc and include it to my GM,I get errors with the callbacks,Im sure a include is laid out diffrently can someone show me how to change it into a include so i can use it in my GM and FS's
Code Here:
pawn Код:
//By Weponz For Vegas CNR Server
//Full Credits To: Kwarde //Complete Tutorial
#include <a_samp>
#define WHITE 0xFFFFFFAA
new pMoney[MAX_PLAYERS];
new ForbiddenWeapons[][] = {
16, //Grenades
34, //Sniper Rifle
37, //Flamethrower
38, //Minigun
39, //Satchel
35, //RPG
36, //Heatseeking RPG
44, //Nightvision Goggles
45 //Thermal Goggles
};
public OnPlayerConnect(playerid)
{
pMoney[playerid] = 0;
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
pMoney[playerid] = 0;
return 1;
}
public OnPlayerUpdate(playerid)
{
new pName[MAX_PLAYER_NAME], w = 0, string[128];
if(GetPlayerMoney(playerid) > pMoney[playerid]){
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
format(string, sizeof(string), "[VEGAS-BOT]: %s Has Been Banned From The Server! [Cheats Detected]", pName);
SendClientMessageToAll(WHITE, string);
BanEx(playerid, "[Cheats Detected]: Money Hax");
}
while(w < (sizeof(ForbiddenWeapons))){
if(GetPlayerWeapon(playerid) == w){
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
format(string, sizeof(string), "[VEGAS-BOT]: %s Has Been Banned From The Server! [Cheats Detected]", pName);
SendClientMessageToAll(WHITE, string);
BanEx(playerid, "[Cheats Detected]: Weapon Hax");
}
}
return 1;
}
stock a_GivePlayerMoney(playerid, money)
{
pMoney[playerid] += money;
GivePlayerMoney(playerid, money);
}
stock a_SetPlayerMoney(playerid, money)
{
pMoney[playerid] = money;
ResetPlayerMoney(playerid);
GivePlayerMoney(playerid);
}
Код:
C:\Users\Weponz\Desktop\Server Files\gamemodes\vegascnr.pwn(1195) : error 021: symbol already defined: "OnPlayerUpdate" C:\Users\Weponz\Desktop\Server Files\gamemodes\vegascnr.pwn(1941) : error 021: symbol already defined: "OnPlayerDisconnect" C:\Users\Weponz\Desktop\Server Files\gamemodes\vegascnr.pwn(1970) : error 021: symbol already defined: "OnPlayerConnect" C:\Users\Weponz\Desktop\Server Files\gamemodes\vegascnr.pwn(4184) : warning 203: symbol is never used: "ForbiddenWeapons" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 3 Errors.