SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 26/05/2018, 08:57 AM   #11
Stuntff
Big Clucker
 
Join Date: Feb 2016
Posts: 83
Reputation: 21
Default Re: Проверка на GM 0.3e

Quote:
Originally Posted by Fragruss View Post
Дайте пожалуйста античит на легальность выстрела для 0.2
Спасибо
Щас, только штаны подтяну
Stuntff is offline   Reply With Quote
Old 26/05/2018, 04:08 PM   #12
Perdun
Banned
 
Join Date: Mar 2014
Posts: 19
Reputation: 2
Default Re: Проверка на GM 0.3e

Quote:
Originally Posted by narwn View Post
должно ловить
PHP Code:
//должно ловить

#include <a_samp>
#include <zcmd>

main();

new 
gHealthNOP[MAX_PLAYERS char],
    
gHealthFunc[MAX_PLAYERS],
    
gHealthGTC[MAX_PLAYERS];

new 
gArmourNOP[MAX_PLAYERS char],
    
gArmourFunc[MAX_PLAYERS],
    
gArmourGTC[MAX_PLAYERS];

stock ac_SetPlayerHealth(playeridFloat:health)
{
    if(!
SetPlayerHealth(playeridhealth)) return 0;
    if(
floatcmp(health0.0) == -1health 0.0;
    
gHealthNOP{playerid} = 0;
    
gHealthFunc[playerid] = floatround(healthfloatround_tozero);
    
gHealthGTC[playerid] = GetTickCount() + 500;
    return 
1;
}

stock ac_SetPlayerArmour(playeridFloat:armour)
{
    if(!
SetPlayerArmour(playeridarmour)) return 0;
    if(
floatcmp(armour0.0) == -1armour 0.0;
    
gArmourNOP{playerid} = 0;
    
gArmourFunc[playerid] = floatround(armourfloatround_tozero);
    
gArmourGTC[playerid] = GetTickCount() + 500;
    return 
1;
}

/*#define SetPlayerHealth ac_SetPlayerHealth
#define SetPlayerArmour ac_SetPlayerArmour*/

public OnPlayerUpdate(playerid)
{
    if((
gHealthFunc[playerid] != -|| gHealthFunc[playerid] != -1) && GetPlayerState(playerid) != PLAYER_STATE_SPECTATING)
    {
        new 
ping GetPlayerPing(playerid), 
            
gtc GetTickCount(), 
            
Float_offset;
        
GetPlayerHealth(playerid_offset);
        if(
_:gHealthFunc[playerid] == _:_offset || floatcmp(gHealthFunc[playerid], _offset) >= && gtc gHealthGTC[playerid] + pinggHealthFunc[playerid] = -1;
        else if(
gtc gHealthGTC[playerid] + ping && ++gHealthNOP{playerid} > 3)
        {
            
printf("GM(HP)");
            
Kick(playerid);
            return 
0;
        }
        
GetPlayerArmour(playerid_offset);
        if(
_:gArmourFunc[playerid] == _:_offset || floatcmp(gArmourFunc[playerid], _offset) >= && gtc gArmourGTC[playerid] + pinggArmourFunc[playerid] = -1;
        else if(
gtc gArmourGTC[playerid] + ping && ++gArmourNOP{playerid} > 3)
        {
            
printf("GM(ARM)");
            
Kick(playerid);
            return 
0;
        }
    }
    return 
1;
}

CMD:gmcheck(playeridparams[])
{
    
//if(gIsAdmin{playerid} == 0) 
        
return 0;
    if(
isnull(params)) 
        return 
SendClientMessage(playerid, -1, !"/gmcheck [id]");
    new 
targetid strval(params);
    if(!
IsPlayerConnected(targetid))
        return 
SendClientMessage(playerid, -1, !"* Игрока нет на сервере.");
    if(
targetid == playerid
        return 
SendClientMessage(playerid, -1, !"* Вы ввели свой ид.");
    
/*if(gIsAFK[targetid] > 3) 
        return SendClientMessage(playerid, -1, !"* Игрок в АФК.");*/
    
if(IsPlayerInAnyVehicle(targetid)) 
        
RemovePlayerFromVehicle(targetid);
    new 
        
Float_last_health
        
Float_last_armour,
        
Float_rand;
    
GetPlayerHealth(targetid_last_health);
    
GetPlayerArmour(targetid_last_armour);
    
_rand float(random(99));
    
ac_SetPlayerHealth(targetid_rand);
    
ac_SetPlayerArmour(targetid_rand);
    
SetTimerEx("OnPlayerGodMode"30000"dff"targetid_last_health_last_armour);
    return 
1;
}

forward OnPlayerGodMode(playeridFloat_last_healthFloat_last_armour);
public 
OnPlayerGodMode(playeridFloat_last_healthFloat_last_armour)
{
    
//if(gIsAFK[playerid] == 0)
    
{
        
SetPlayerHealth(playerid_last_health);
        
SetPlayerArmour(playerid_last_armour);
    }
    return;

не работает.
Perdun is offline   Reply With Quote
Old 27/05/2018, 03:37 PM   #13
narwn
Little Clucker
 
Join Date: Oct 2017
Posts: 14
Reputation: 0
Default Re: Проверка на GM 0.3e

не может быть в этом клео пакеты пуль. так что обычное собское гм + ноп. хотя кинь клео в лс
narwn 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
Проверка на запись в БД DeViLsS Русский/Russian 4 26/01/2015 05:55 PM
Проверка на модпак Daea Русский/Russian 2 02/01/2015 04:06 PM
Проверка на АФК AlexeyTrekkkk Русский/Russian 23 27/12/2014 07:50 AM
Проверка на чекпоинт ? Mexanizm93 Русский/Russian 8 11/09/2013 10:30 PM


All times are GMT. The time now is 09:45 PM.


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