SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Русский/Russian

Reply
 
Thread Tools Display Modes
Old 03/10/2010, 11:55 AM   #31
EROS_174RUS
Banned
 
Join Date: Sep 2010
Posts: 20
Reputation: 0
Default Re: Anti God Mode

Quote:
Originally Posted by false View Post
Можно сделать примерно так...

Code:
#include <a_samp>

public OnPlayerCommandText(playerid, cmdtext[])
{
	new cmd[256], tmp[256], idx;
	cmd = strtok(cmdtext, idx);
	tmp = strtok(cmdtext,idx);
	
	if(strcmp(cmd, "/testgm", true) == 0)
	{
		
		if(!IsPlayerAdmin( playerid ))return SendClientMessage(playerid, 0xffffffff, "Вы не админ");
		if(!strlen(tmp))return SendClientMessage(playerid, 0xffffffff, "Укажите id игрока");
		if(!IsNumeric(tmp))return SendClientMessage(playerid, 0xffffffff, "Неверно указан id игрока");
		new player = strval(tmp);
		if(IsPlayerConnected(player) && player != INVALID_PLAYER_ID)
		{
	    	       if(IsPlayerInAnyVehicle(player))
	    	       {
	        	        new vehicleid = GetPlayerVehicleID(playerid);
	        	        new Float:health, Float:X, Float:Y, Float:Z;
    			        GetVehicleHealth(vehicleid, health);
				SetPVarFloat(player, "VehicleHealth", health);
				SetVehicleHealth(vehicleid, 1000);
				GetPlayerPos(player,X,Y,Z);
				CreateExplosion(X,Y,Z-6,8,0);
				SetTimerEx("TestGmModeInVehicle",200,0, "i", player);
	    	        }
	    	        else
			{
				new Float:health, Float:X, Float:Y, Float:Z;
    			        GetPlayerHealth(player, health);
    			        SetPlayerHealth(player, 100);
				SetPVarFloat(playerid, "PlayerHealth", health);
				GetPlayerPos(player,X,Y,Z);
				CreateExplosion(X,Y,Z-6,8,0);
				SetTimerEx("TestGmModeOnFoot",200,0, "i", player);
			}
    	        }
		return 1;
	}
	return 0;
}

forward TestGmModeOnFoot(playerid);
public TestGmModeOnFoot(playerid)
{
	new Float:health;
   	GetPlayerHealth(playerid, health);
	if(health < 100)
	{
		SendClientMessageToAll(0xffffffff,"Проверка пройдена ;)");
		SetPlayerHealth(playerid, GetPVarFloat(playerid, "PlayerHealth"));
	}
	else
	{
		SendClientMessageToAll(0xffffffff,"чиииииитеееееер!!!!!!!!!!!!!");
		SetPlayerHealth(playerid, GetPVarFloat(playerid, "PlayerHealth"));
	}
    return 1;
}

forward TestGmModeInVehicle(playerid);
public TestGmModeInVehicle(playerid)
{
    new vehicleid = GetPlayerVehicleID(playerid);
	new Float:health;
   	GetVehicleHealth(vehicleid, health);
	if(health < 1000)
	{
		SendClientMessageToAll(0xffffffff,"Проверка пройдена ;)");
		RepairVehicle(vehicleid);
	}
	else SendClientMessageToAll(0xffffffff,"чиииииитеееееер!!!!!!!!!!!!!");
    return 1;
}

stock IsNumeric(string[]) 
{
        for (new i = 0, j = strlen(string); i < j; i++) 
        if (string[i] > '9' || string[i] < '0') return 0; 
        return 1; 
}

strtok(const string[], &index)
{
	new length = strlen(string);
	while ((index < length) && (string[index] <= ' '))
	{
		index++;
	}

	new offset = index;
	new result[20];
	while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
	{
		result[index - offset] = string[index];
		index++;
	}
	result[index - offset] = EOS;
	return result;
}
Cамый оптимальный вариант
EROS_174RUS is offline   Reply With Quote
Old 03/10/2010, 12:00 PM   #32
ZaR
Big Clucker
 
Join Date: Sep 2009
Posts: 157
Reputation: 1
Default Re: Anti God Mode

Который обходится отключением createExplosion в собейте.
__________________
ZaR is offline   Reply With Quote
Old 03/10/2010, 12:48 PM   #33
lost13
Gangsta
 
Join Date: Aug 2009
Posts: 760
Reputation: 5
Default Re: Anti God Mode

так что подбрасывание самое норм?
lost13 is offline   Reply With Quote
Old 03/10/2010, 03:36 PM   #34
DapkMapk
Little Clucker
 
DapkMapk's Avatar
 
Join Date: Sep 2010
Posts: 34
Reputation: 0
Default Re: Anti God Mode

Quote:
Originally Posted by lost13 View Post
так что подбрасывание самое норм?
ну получается да..
DapkMapk is offline   Reply With Quote
Old 03/10/2010, 06:15 PM   #35
Andreq
Little Clucker
 
Join Date: Aug 2010
Posts: 17
Reputation: 0
Default Re: Anti God Mode

не легче ли засунуть код в OnPlayerUndate как известо паблик отключаетсья при нажатии на esc и там например сделать чтобы каждую секунду отнималось минимальное кол-во хп
Andreq is offline   Reply With Quote
Old 03/10/2010, 06:46 PM   #36
false
Little Clucker
 
Join Date: Sep 2010
Location: World of Samp
Posts: 39
Reputation: 0
Default Re: Anti God Mode

Quote:
Originally Posted by Andreq View Post
не легче ли засунуть код в OnPlayerUndate как известо паблик отключаетсья при нажатии на esc и там например сделать чтобы каждую секунду отнималось минимальное кол-во хп
И что это даст?
false is offline   Reply With Quote
Old 03/10/2010, 07:49 PM   #37
DapkMapk
Little Clucker
 
DapkMapk's Avatar
 
Join Date: Sep 2010
Posts: 34
Reputation: 0
Default Re: Anti God Mode

Что то не получается у меня с подбрасыванием в машине...всё время читом считает..
Quote:
new Float:health, Float:tvhealth, Float, Float:y, Float:z, Float:vx, Float:vy, Float:vz;
if(IsPlayerInAnyVehicle(i))
{
if(IsPlayerDriver(i))
{
GetVehicleVelocity(GetPlayerVehicleID(i), vx, vy, vz);
GetVehicleHealth(GetPlayerVehicleID(i), health);
SetVehicleHealth(GetPlayerVehicleID(i), 1000);
GetVehiclePos(GetPlayerVehicleID(i), x, y, z);
SetVehiclePos(GetPlayerVehicleID(i), 0, 0, 50);
SetVehicleVelocity(GetPlayerVehicleID(i), 0.0, 0.0, -2);
GetVehicleHealth(GetPlayerVehicleID(i), tvhealth);
if(tvhealth<1000)
{
SetVehiclePos(GetPlayerVehicleID(i), x, y, z);
SetVehicleHealth(GetPlayerVehicleID(i), health);
SetVehicleVelocity(GetPlayerVehicleID(i), vx, vy, vz);
}
else
{
SetVehiclePos(GetPlayerVehicleID(i), x, y, z);
SetVehicleHealth(GetPlayerVehicleID(i), health);
SetVehicleVelocity(GetPlayerVehicleID(i), vx, vy, vz);
CheatWarring(i, "God-Mode");
}
}
}
DapkMapk is offline   Reply With Quote
Old 03/10/2010, 08:18 PM   #38
Andreq
Little Clucker
 
Join Date: Aug 2010
Posts: 17
Reputation: 0
Default Re: Anti God Mode

Quote:
Originally Posted by false View Post
И что это даст?
это нормальный античит даст займусь этим
Andreq is offline   Reply With Quote
Old 03/10/2010, 08:30 PM   #39
false
Little Clucker
 
Join Date: Sep 2010
Location: World of Samp
Posts: 39
Reputation: 0
Default Re: Anti God Mode

Quote:
Originally Posted by DapkMapk View Post
[if(IsPlayerDriver(i))
А если IsPlayerPassenger(id)
Quote:
Originally Posted by DapkMapk View Post
Что то не получается у меня с подбрасыванием в машине...всё время читом считает..
Code:
if(IsPlayerInAnyVehicle(cheaterid))
{
vehicleid = GetPlayerVehicleID(cheaterid);
cheaterseat = GetPlayerVehicleSeat(cheaterid);
SetPlayerPos(cheaterid,x,y,z+5);

//затем проверка на хп (через таймер)...

PutPlayerInVehicle(playerid, vehicleid, cheaterseat);
}
Попробуй так сделать
false is offline   Reply With Quote
Old 03/10/2010, 08:34 PM   #40
false
Little Clucker
 
Join Date: Sep 2010
Location: World of Samp
Posts: 39
Reputation: 0
Default Re: Anti God Mode

Quote:
Originally Posted by Andreq View Post
это нормальный античит даст займусь этим
Вряд ли он существует))
false is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Include] [INC] Anti Money Cheat, Anti Ban Weapon FreshKilla Includes 28 11/08/2014 04:05 PM
[DUV] Como criar um Anti-MoneyHack, e Anti-Airbreak [NWD]Tweener_ Portuguкs/Portuguese 21 26/11/2010 04:45 PM
help on my mode please nati558866 Help Archive 8 28/02/2010 02:02 PM
[HELP]IRC Mode trindade02 Help Archive 6 02/01/2010 07:26 PM
new mode = random(1); lets pawno crash + mode = random number FOR all public's hipy Help Archive 3 23/07/2009 09:50 PM


All times are GMT. The time now is 01:59 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.