Анти-езда без прав (Advance-RP)

Moderator: SJplayer

Romchik
Topic author, Ефрейтор
Ефрейтор
Avatar
Romchik
Topic author, Ефрейтор
Ефрейтор
Posts: 20
Joined: 12 May 2013
With us: 11 years 6 months

#1by Romchik » 12 May 2013, 15:28

Ко всем new:

Code: Select all

new VehAC[MAX_PLAYERS];


В

Code: Select all

OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)


Вставляем:

Code: Select all

    if(ispassenger == 0)
    {
        if(PlayerInfo[playerid][pCarlic] == 0) // здесь ваш массив, у меня [pCarlic]
        {
           SendClientMessage(playerid, COLOR_GREY, "У вас нет прав на управелие трансортом");
           ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,0,0,0,0,0);
           ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,0,0,0,0,0);
        }
        else{VehAC[playerid] = 1;} // переменная для античита "ТП в авто (даж с правами)"
    }


В любой секундный таймер:

Code: Select all

  if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
        {
            if(PlayerInfo[playerid][pCarlic] == 0)
            {
                KickWithMessage(playerid, "Вы кикнуты за использование чит-программ"); // без прав за рулем - кик
            }
            else
            
{
                if(VehAC[playerid] == 0)
                {
                    KickWithMessage(playerid, "Вы кикнуты за использование чит-программ"); // ТП в авто кик
                }
            }
        }



Автор урока Max_Hank.


Return to “Античиты”

Who is online (over the past 5 minutes)

Users browsing this forum: 1 guest