SA-MP To Viet Nam

Chào Mừng bạn đến với diễn Đàn Hưỡng Dẫn Open Server SA-MP


Share

[Blugin] Anti Cheat By Dragon Tyder

Xem chủ đề cũ hơn Xem chủ đề mới hơn Go down
#
Dragon_Tyder
Dragon_Tyder
Tổng số bài gửi : 9
Join date : 21/02/2014
[Blugin] Anti Cheat By Dragon Tyder

[Hoạt động trên các phiên bản sa-mp trên 0.3]

Chào mừng tất cả mọi người,

Hôm nay tôi muốn trình bày cho bạn một AntiCheat cho SA-MP viết bằng một plugin!


Trong ngắn hạn:
Hiệu suất cao, ngay lập tức phát hiện Hacker!
-Tùy biến cao!
-Nhiều hệ thống tiên tiến phát hiện Hacker

Cheats có thể được phát hiện bằng cách sử dụng plugin này:
Code Pawn

////////////////////////////////////////////////////////////////////////////

#define CHEAT_JETPACK (1) // player got jetpack
#define CHEAT_WEAPON (2) // player got not allowed/spawned weapon, extraint = weaponid, extraint = type cheat, 1 - weapon not allowed, 0 - spawned weapon
#define CHEAT_SPEED (4) // player used speedhack, extraint = vehicleid
#define CHEAT_HEALTHARMOUR (Cool // needs to be implemented, detected health/armour hack, extraint 0 = health, extraint 1 = armour, extrafloat = amount of current health/armour
#define CHEAT_IPFLOOD (16) // too many connections from one ip, extraint = ip in binary format (exploded by '.' 127.0.0.1 <=^=> (1 + (0 << Cool + (0 << 16) + (127 << 24)))
#define CHEAT_PING (32) // player has too high ping, default = 65537
#define CHEAT_SPOOFKILL (64) // playerid - the one who cheated and died, extraint = the victim, extrafloat - the probability of detection, ranges from 0.0 to 100.0, it's in percentage of success detection, 100.0 = cheater for sure! 0.0 ... 30.0 ~ can be sa-mp bug.
#define CHEAT_SPAWNKILL (128) // playerid = killerid, extraint = reason, extraint2 = killedplayerid
#define CHEAT_INACTIVITY (256) // player is inactive for too long (default = 3 minutes = 180000 ms), none
#define CHEAT_TELEPORT (512) // extraint = percentage as integer (this time ye.. it can only be 50 or 100) of how accurate the detection is, extrafloat - is the calculated speed from XYZ positioning
#define CHEAT_AIRBREAK (1024) // extraint = percentage as integer (this time ye.. it can only be 50 or 100) of how accurate the detection is, extrafloat - is the calculated speed from XYZ positioning
#define CHEAT_BACK_FROM_INACTIVITY (2048) // if CHEAT_INACTIVITY is called and then the player is back then this is called.
#define CHEAT_SPECTATE (4096) //anti spectate-hack
#define CHEAT_FASTCONNECT (8192) //if some playerids connect from one ip very fast twice, or three times (checks if one ip connects in very short delays)
#define CHEAT_REMOTECONTROL (16384) //extraint = victims playerid, playerid - cheater, detects if playerid manipulated victimids vehicle (eg set super fast speed)
#define CHEAT_MASSCARTELEPORT (32768) //checks if playerid changed vehicles VERY fast (for teleporting them?)
#define CHEAT_CARJACKHACK (65536) //check if player uses cheats to steal a car

///////////////////////////////////////////////////////////////////////////////////

Ngoài ra, plugin này bảo vệ GivePlayerMoney và GetPlayerMoney chức năng bị làm giả bởi Player như vậy các giá trị là luôn luôn đúng. *


Gọi lại chính khi một cheat được phát hiện:

Code Pawn
////////////////////////////////////////////

public AC_OnCheatDetected(playerid, type, extraint, Float:extrafloat, extraint2)

////////////////////////////////////////////

Ở đây bạn sẽ có được tất cả các báo cáo từ các plugin về phát hiện gian lận có thể và thông báo.
Xin vui lòng xem các định nghĩa để biết thêm thông tin về các thông số.


Bạn có 9 chức năng làm việc theo ý của bạn để tùy chỉnh plugin tại thời gian chạy:
Code Pawn
////////////////////////////////////////////////////////////////////////////////////////

native CheckSet(ToCheck,playerid = (-1), bool:check=true);//enable/disable checking for selected cheat, -1 for all players, -1 overides normal player settings so -1,true will enable normal checking again.
//example - disable speedhack checking for player 5: CheckSet(CHEAT_SPEED,5,false);
native SetMaxPing(ping=65537);//sets the max ping a player can have before being reported
native SetWeaponAllowed(playerid=(-1),weaponid=0,bool:allowed=true);//sets the weaponid to allowed/disallowed, -1 overides all players, no matter what you set to individual players after and before the function
native SetSpawnKillDelay(delay=2000);//Set the delay in miliseconds which will count as spawnkill, if killerid kills playerid within 'delay' miliseconds, a spawnkill will be reported.
native SetInactivityDelay(delay=180000);//Set the delay after how many miliseconds INACTIVITY will be detected.
native UseChatForInactivityMeasurement(bool:use=true);//if false and player sends a message he still will be counted as inactive
native AntiCheatSetUpdateDelay(ticks=200);//anti airbreak and anti teleport breaks if ticks is not 200....
native SetIPConnectDelay(delay=100);//if any ip connects twice faster than 'delay' miliseconds then the OnCheatDetected callback will be called
native SetMaxMassTPDelay(delay=150);//if player changes vehicles within 'delay' miliseconds report him to OnCheatDetected.

Nếu bạn có thể, giúp tôi phát triển plugin này (và các plugin khác của tôi)!

AntiCheat là một phần của "Dự án Bundle Gamer_Z" và có thể được lấy từ đây:

http://gpb.googlecode.com/

có Fun!

Trả lời ở đây giúp đỡ.

nếu bạn cần một kịch bản ví dụ, ở đây :
Code Pawn

/////////////////////////////////////////////////////////////////////

#include <a_samp>
#include <AnticheatPlugin>

public OnGameModeInit()
{
CheckSet(CHEAT_JETPACK);//enable jetpack cheat detection
CheckSet(CHEAT_WEAPON);//enable weapon cheat detection
return 1;
}

public AC_OnCheatDetected(playerid, type, extraint, Float:extrafloat, extraint2)
{
switch(type)
{
case AC_DETECTED_WEAPON:
{
ACreset_PlayerWeapons(playerid);
SendClientMessage(playerid,0xFFFFFFFF,"Phát hiện Hacked vũ khí - Thiết lập lại vũ khí của bạn.");
return 1;
}
case AC_DETECTED_JETPACK:
{
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_NONE);
SendClientMessage(playerid,0xFFFFFFFF,"Jetpack phát hiện - loại bỏ nó.");
return 1;
}
default:
{
SendClientMessage(playerid,0xFFFFFFFF,"???? Cheat Khong Phat Hien, Khong co Hanh Dong ??? Sad");
return 1;
}
}
return 1;
}
/////////////////////////////////////////////////////////////////////////////////



[Blugin] Anti Cheat By Dragon Tyder

Xem chủ đề cũ hơn Xem chủ đề mới hơn Về Đầu Trang
Trang 1 trong tổng số 1 trang

Similar topics

-
» [ FS ] ANTI - CHEAT
» [FilterScript] [FS] [MySQL] [DINI] Anti Cheat Ver 1.3 [0.3z]
Permissions in this forum:Bạn không có quyền trả lời bài viết
SA-MP To Viet Nam » SA-MP Scripting Và Plugins » Hỗ Trợ Blugin-

  • Create a forum on Forumotion | ©phpBB | Free forum support | Báo cáo lạm dụng | Thảo luận mới nhất