25.03.2010, 20:49
Hola, bueno estoy armando un server y quiero sacarte el Anticheat a un GM que es muy bueno y ponerlo en mi GM.
Al copiar el anticheat a mi GM me salen errores:
Este es el codigo que yo copio:
Aqui les dejo las lineas que me dan errores:
PD: Mi GM no usa MySQL.
PD2: El GM que le quiero copiar el antichit es Moderntopia.
Al copiar el anticheat a mi GM me salen errores:
Код:
C:\Documents and Settings\Administrador\Escritorio\server\gamemodes\lslrp-0.2b.pwn(1238) : error 017: undefined symbol "PlayerInfo" C:\Documents and Settings\Administrador\Escritorio\server\gamemodes\lslrp-0.2b.pwn(1241) : error 017: undefined symbol "ScriptMoneyUpdated" C:\Documents and Settings\Administrador\Escritorio\server\gamemodes\lslrp-0.2b.pwn(1241) : warning 215: expression has no effect C:\Documents and Settings\Administrador\Escritorio\server\gamemodes\lslrp-0.2b.pwn(1241) : error 001: expected token: ";", but found "]" C:\Documents and Settings\Administrador\Escritorio\server\gamemodes\lslrp-0.2b.pwn(1241) : error 029: invalid expression, assumed zero C:\Documents and Settings\Administrador\Escritorio\server\gamemodes\lslrp-0.2b.pwn(1241) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors.
Код:
public GlobalHackCheck() { /* * mtAnticheat 1.6 * by Luk0r * * This function is called every second the check each * player's money/weapons to ensure they're not hacking * */ new curHour, curMinute, curSecond; new string[256], banip[16], plname[64]; new weaponid, ammo; //new hacking; for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i) && PlayerInfo[i][pAdmin] < 1) { gettime(curHour, curMinute, curSecond); if (ScriptMoneyUpdated[i]+2 < curSecond) { new plactualmoney = GetPlayerMoney(i); if (plactualmoney > ScriptMoney[i] && plactualmoney-499 > ScriptMoney[i]) { // Probably using a money hack, let's freeze them, lock their account and kick them. TogglePlayerControllable(i, 0); SendClientMessage(i, COLOR_LIGHTRED, "Anticheat: Su cuenta ha sido bloqueada y se registra debido a la sospecha de fraude."); SendClientMessage(i, COLOR_LIGHTRED, "Anticheat: Pуngase en contacto con un administrador de ventrilo o en el foro de inmediato si cree que esto es un error."); SendClientMessage(i, COLOR_RED, "GamerXZone Anticheat 1.5"); PlayerInfo[i][pLocked] = 1; OnPlayerUpdate(i); GetPlayerIp(i, banip, sizeof(banip)); new spawnedamount = plactualmoney-ScriptMoney[i]; BanAdd(3, PlayerInfo[i][pSQLID], banip, spawnedamount); GetPlayerName(i, plname, sizeof(plname)); format(string, sizeof(string), "Anticheat: %s: acaba de ser cerrada y patadas para cortar el dinero. Cantidad Spawned: %d.", plname, PlayerInfo[i][pSQLID], spawnedamount); Kick(i); ScriptMoney[i] = 0; ScriptMoneyUpdated[i] = 0; ABroadCast(COLOR_LIGHTRED,string,1); } else { ScriptMoney[i] = plactualmoney; ScriptMoneyUpdated[i] = 0; } } /* gettime(curHour, curMinute, curSecond); if (ScriptWeaponsUpdated[i]+3 < curSecond) { hacking = 0; for (new c=0; c<13; c++) { GetPlayerWeaponData(i, c, weaponid, ammo); if (weaponid != 0 && ammo != 0) { if (ScriptWeapons[i][c] != weaponid) { hacking = weaponid; } } } if (hacking != 0) { // Probably using a weapon hack, let's freeze them, lock their account and kick them. TogglePlayerControllable(i, 0); SendClientMessage(i, COLOR_LIGHTRED, "Anticheat: Your account has been locked and logged due to suspected weapon hacking."); SendClientMessage(i, COLOR_LIGHTRED, "Anticheat: Please contact an admin on ventrilo or on the forum immediately if you feel this is in error."); SendClientMessage(i, COLOR_RED, "GamerXZone Anticheat 1.6 by Luk0r"); PlayerInfo[i][pLocked] = 1; OnPlayerUpdate(i); GetPlayerIp(i, banip, sizeof(banip)); BanAdd(4, PlayerInfo[i][pSQLID], banip, hacking); GetPlayerName(i, plname, sizeof(plname)); format(string, sizeof(string), "Anticheat: %s [SQL: %d] has just been locked and kicked for weapon hacking. Please check the account.", plname, PlayerInfo[i][pSQLID]); Kick(i); for (new c=0; c<13; c++) ScriptWeapons[i][c] = 0; ScriptWeaponsUpdated[i] = 0; ABroadCast(COLOR_LIGHTRED,string,1); } }*/ GetPlayerWeaponData(i, 7, weaponid, ammo); new pSpecialAction = GetPlayerSpecialAction(i); if (weaponid > 1 || pSpecialAction == SPECIAL_ACTION_USEJETPACK) { // Illegal weapon TogglePlayerControllable(i, 0); SendClientMessage(i, COLOR_LIGHTRED, "Anticheat: Usted ha sido baneado debido a la sospecha de fraude."); SendClientMessage(i, COLOR_LIGHTRED, "Anticheat: Pуngase en contacto con un administrador de ventrilo o en el foro de inmediato si cree que esto es un error."); SendClientMessage(i, COLOR_RED, "GamerXZone Anticheat 1.5"); PlayerInfo[i][pLocked] = 1; OnPlayerUpdate(i); //GetPlayerIp(i, banip, sizeof(banip)); //BanAdd(4, PlayerInfo[i][pSQLID], banip, 38); GetPlayerName(i, plname, sizeof(plname)); format(string, sizeof(string), "Anticheat: %s: Acaba de ser baneado por la propiedad de arma ilegal o jetpack.", plname, PlayerInfo[i][pSQLID]); Ban(i); ABroadCast(COLOR_LIGHTRED,string,1); } } } }
Код:
Linea 1238: if(IsPlayerConnected(i) && PlayerInfo[i][pAdmin] < 1) Linea 1241: if (ScriptMoneyUpdated[i]+2 < curSecond)
PD2: El GM que le quiero copiar el antichit es Moderntopia.