Доступ к архиву

Переход в группу "Пользователь"

300.00
Одноразовый платёж
Быстрый переход в группу "Пользователи", без надобности написания постов и ожидания.

Покупка дает возможность:
Быть полноправным участником форума
Нормальное копирование кода
Создавать темы
Скачивать файлы
Доступ к архиву Pawno-Info
Статус
В этой теме нельзя размещать новые ответы.

Vlad_Kupr

Нуль
Регистрация
21 Мар 2013
Сообщения
8
Лучшие ответы
0
Репутация
0
Всем привет :) Сегодня зарегался на этом сайте) Решил поделиться античитом на оружие, автор я, никаких переменных, Все на PVar'aх) Античит не будет кикать невиновных, за парашют и за детонатор (парашют дается при выходе из самолета, а детонатор когда дают радиобомбы! Это чтобы не было ошибочных киков). Функцию GivePlayerWeapon заменять НЕ НУЖНО! И так начнем.

В начало мода (главное вперед всех stock и public!):
PHP:
forward KickPlayer(playerid);
public KickPlayer(playerid)
{
	Kick(playerid);
	return 1;
}
forward GPW(playerid,weaponid,ammo);
public GPW(playerid,weaponid,ammo)
{
	switch(weaponid)
	{
		case 0, 1: SetPVarInt(playerid,"pGun0",weaponid);
		case 2..9: SetPVarInt(playerid,"pGun1",weaponid);
		case 10..15: SetPVarInt(playerid,"pGun10",weaponid);
		case 16..18,39: SetPVarInt(playerid,"pGun8",weaponid);
		case 22..24: SetPVarInt(playerid,"pGun2",weaponid);
		case 25..27: SetPVarInt(playerid,"pGun3",weaponid);
		case 28,29,32: SetPVarInt(playerid,"pGun4",weaponid);
		case 30,31: SetPVarInt(playerid,"pGun5",weaponid);
		case 33,34: SetPVarInt(playerid,"pGun6",weaponid);
		case 35..38: SetPVarInt(playerid,"pGun7",weaponid);
		case 41..43: SetPVarInt(playerid,"pGun9",weaponid);
		case 44..46: SetPVarInt(playerid,"pGun11",weaponid);
		default: return 1;
	}
	GivePlayerWeapon(playerid,weaponid,ammo);
	return 1;
}
#define GivePlayerWeapon GPW
forward ProverkaNaChitGun();
public ProverkaNaChitGun()
{
	for(new i; i<=GetMaxPlayers(); i++)
	{
		if(GetPVarInt(i,"pSpawnilsa") == 0) continue;
		if(GetPlayerWeapon(i) != GetPVarInt(i,"pGun0") && GetPlayerWeapon(i) != GetPVarInt(i,"pGun1") && GetPlayerWeapon(i) != GetPVarInt(i,"pGun2") && GetPlayerWeapon(i) != GetPVarInt(i,"pGun3") &&
		GetPlayerWeapon(i) != GetPVarInt(i,"pGun4") && GetPlayerWeapon(i) != GetPVarInt(i,"pGun5") && GetPlayerWeapon(i) != GetPVarInt(i,"pGun6") && GetPlayerWeapon(i) != GetPVarInt(i,"pGun7") &&
		GetPlayerWeapon(i) != GetPVarInt(i,"pGun8") && GetPlayerWeapon(i) != GetPVarInt(i,"pGun9") && GetPlayerWeapon(i) != GetPVarInt(i,"pGun10") && GetPlayerWeapon(i) != GetPVarInt(i,"pGun11") &&
		GetPlayerWeapon(i) != 40 && GetPlayerWeapon(i) != 46)
		{
			new nick[25];
			GetPlayerName(i,name,25);
			new string[100];
			format(string, sizeof(string) ," [АНТИЧИТ] %s был кикнут. Причина: чит на оружие!",name);
			SendClientMessageToAll(COLOR_RED,string);
			SetTimerEx("KickPlayer",250,0,"d",i);
		}
	}
	return 1;
}
В САМОЕ НАЧАЛО OnPlayerDeath(playerid, killerid, reason):​
PHP:
	ResetPlayerWeapons(playerid);
В САМОЕ НАЧАЛО OnPlayerSpawn(playerid):
PHP:
	SetPVarInt(playerid,"pGun0",0);
	SetPVarInt(playerid,"pGun1",-1);
	SetPVarInt(playerid,"pGun2",-1);
	SetPVarInt(playerid,"pGun3",-1);
	SetPVarInt(playerid,"pGun4",-1);
	SetPVarInt(playerid,"pGun5",-1);
	SetPVarInt(playerid,"pGun6",-1);
	SetPVarInt(playerid,"pGun7",-1);
	SetPVarInt(playerid,"pGun8",-1);
	SetPVarInt(playerid,"pGun9",-1);
	SetPVarInt(playerid,"pGun10",-1);
	SetPVarInt(playerid,"pGun11",-1);
	SetPVarInt(playerid,"pSpawnilsa",1);
В OnGameModeInit():
PHP:
	SetTimer("ProverkaNaChitGun",1000*60,1);
Ну вот вроде всё) Удачи в скриптинге!
 
Последнее редактирование:
Статус
В этой теме нельзя размещать новые ответы.
Сверху Снизу