Herro[CM] |
Дата: Среда, 09.09.2015, 20:59 | Сообщение # 1
|
Бывалый
Сообщений: 425
Статус: Offline
|
Weapon Limiter - при помощи данного include можно задать время между отправкой пакетами выстрела в миллисекундах, можно использовать как Анти CBug или АнтиДамагер.
Include :
Код #define COLT_DELAY_HIT 200 #define SILENCE_HIT_DELAY 400 #define DEAGLE_HIT_DELAY 400 #define SHOTGUN_HIT_DELAY 0 #define SAWNOFF_HIT_DELAY 300 #define COMBAT_HIT_DELAY 200 #define UZI_HIT_DELAY 400 #define MP5_HIT_DELAY 200 #define AK_HIT_DELAY 400 #define M4_HIT_DELAY 400 #define TEC_HIT_DELAY 300 #define RIFLE_HIT_DELAY 0 #define SNIPER_HIT_DELAY 0 #define MINIGUN_HIT_DELAY 0
static LastShotTime[MAX_PLAYERS];
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ) { if(hittype == BULLET_HIT_TYPE_PLAYER) { new LastShotDelay = GetTickCount() - LastShotTime[playerid]; switch(weaponid) { // Colt 45 case 22: if(LastShotDelay < COLT_DELAY_HIT) return 0; case 23: if(LastShotDelay < SILENCE_HIT_DELAY) return 0; case 24: if(LastShotDelay < DEAGLE_HIT_DELAY) return 0; case 25: if(LastShotDelay < SHOTGUN_HIT_DELAY) return 0; case 26: if(LastShotDelay < SAWNOFF_HIT_DELAY) return 0; case 27: if(LastShotDelay < COMBAT_HIT_DELAY) return 0; case 28: if(LastShotDelay < UZI_HIT_DELAY) return 0; case 29: if(LastShotDelay < MP5_HIT_DELAY) return 0; case 30: if(LastShotDelay < AK_HIT_DELAY) return 0; case 31: if(LastShotDelay < M4_HIT_DELAY) return 0; case 32: if(LastShotDelay < TEC_HIT_DELAY) return 0; case 33: if(LastShotDelay < RIFLE_HIT_DELAY) return 0; case 34: if(LastShotDelay < SNIPER_HIT_DELAY) return 0; case 38: if(LastShotDelay < MINIGUN_HIT_DELAY) return 0; } } LastShotTime[playerid] = GetTickCount(); return CallLocalFunction("Limiter_OnPlayerWeaponShot", "iiiifff", playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ); }
#if defined _ALS_OnPlayerWeaponShot #undef OnPlayerWeaponShot #else #define _ALS_OnPlayerWeaponShot #endif #define OnPlayerWeaponShot Limiter_OnPlayerWeaponShot
forward Limiter_OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ);
Автор: Pottus
Когда нет знания, есть мнение.
Сообщение отредактировал Herro[CM] - Среда, 09.09.2015, 20:59 |
|
|
|
Surex |
Дата: Суббота, 02.07.2016, 14:03 | Сообщение # 2
|
Боец
Сообщений: 137
Статус: Offline
|
полезно
|
|
|
|
Плисс |
Дата: Вторник, 19.07.2016, 20:43 | Сообщение # 3
|
Боец
Сообщений: 70
Статус: Offline
|
Кросс
|
|
|
|