Hello There, Guest! Login or Register


[Idea/Script] Anti Fake Car Entry (No! it doesn't ban you!)
#1
Hello LVP,

Today when i was fighting against random players, with low health i tried to run away. In order to do that i did a fake car entry and during it i typed /house goto(well i succeed in it). I got reported for such abuse. Then an admin questioned me if i did this, i told that i feel ashamed for what have i done. 
Well, he banned me for 3 days.

Isn't it kinda obnoxious that you ban a regular player on a fake car entry thing? For me, Yes! it is.

Than i came across whith this idea that its better to suggest the dev's about anti fake car entry. Than i scripted it and tested it.

Explanation of the idea/script: When you shoot/or get shot than try to enter car it clears your animation and moves you back to your position. This check only stands for 10 seconds.
 
The script:
Code:
#include <a_samp>

#define     HIT_TIME     10      //Seconds: Can be increased as dev's wish.

new
    MadeWeaponShot[MAX_PLAYERS],
    TookDamage[MAX_PLAYERS];

main(){}
public OnGameModeInit()
{
    SetTimer("OnScriptUpdate",1000,true);
}

forward OnScriptUpdate();
public OnScriptUpdate()
{
    for(new i = 0, j = GetPlayerPoolSize(); i <= j; i++)
   {
        if(IsInFight(i))
        {
            if(GetPlayerSpecialAction(i) == SPECIAL_ACTION_ENTER_VEHICLE)
            {
                ClearAnimations(i); // clear the animations

                new Float:pos[3];
                GetPlayerPos(i, pos[0], pos[1], pos[2]);
                SetPlayerPos(i, pos[0], pos[1], pos[2] + 3); // Just making sure that player is stunned.

                SendClientMessage(i, 0xff9900FF, "** You can't enter in a car while you are in a fight or fired a weapon!");
            }
        }
   }
    return 1;
}

public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
    MadeWeaponShot[playerid] = gettime(); // Saving it in a variable
    return 1;
}

public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
    if(issuerid != INVALID_PLAYER_ID)
    {
        TookDamage[playerid] = gettime(); // Saving it in a variable
    }
    return 1;
}

stock IsInFight(playerid) // to check as if player is in fight or not
{
    if(gettime() - MadeWeaponShot[playerid] < HIT_TIME) return 1;
    if(gettime() - TookDamage[playerid] < HIT_TIME) return 1;

    return 0;
}

Preview of how the script works:

Credits: [BB]weeknd | For making the video
Reply
#2
Supportive of this idea! Also less reports for admins to handle ingame. Perhaps time could be spent doing other admin duties.
Reply
#3
Sleep wouldnt like this.. ?
Reply
#4
(06-12-2017, 10:01 PM)Haunter Wrote: Sleep wouldnt like this.. ?

Lmao +1 he wont sleep sleep anymore
Reply
#5
+10000000 Nice idea ammarz!
Reply
#6
But you can enter a legit vehicle to drive away if you wish..
If regulars simply wouldnt be abusing they wouldnt get banned..
Also were probably moving to become harder on abusers and cheaters, regular or non regular ;)

Also github.com/lvplayground
Youre more than welcome to improve anti abuse :)
Reply
#7
(06-13-2017, 09:30 AM)Holsje Wrote: 1: But you can enter a legit vehicle to drive away if you wish..
2: If regulars simply wouldnt be abusing they wouldnt get banned..
3: Also were probably moving to become harder on abusers and cheaters, regular or non regular ;)

4:Also github.com/lvplayground  
    Youre more than welcome to improve anti abuse :)

1: What kind of legit vehicle are you talking about? The script is going to check the animation of a player entering the vehicle within ten seconds(When he shoots or gets shot).

2: Simple is more complicated in LVP (may not be for admins/but surely for players). Who knows if player has got shot and been running for a while from being chased, then he enters the vehicle and during it an admin catches him. He is obviously a victim, and will get a ban hammer's stroke.

3: Cliché! I am well aware about it because a simple fake car entry abuser has been banned for 14 days. Well do me a favor, Please send players a message on connect saying 'Welcome to LVP Summer Vacations Edition! We are more strict than you can even imagine! Spawn on your own Behalf'.

4: In GitHub i already had forked a /PL command from over a month, there is no response(Positive or negative, None!). I don't know how is this working in LVP under the sheets, but its kinda creeping me out.
Reply
#8
but if we just wanna run by using vehicle..
then what ? it wont let us get in for 10 secs..
Reply
#9
(06-13-2017, 11:26 AM)Ezio Wrote: but if we just wanna run by using vehicle..
then what ? it wont let us get in for 10 secs..

Exactly my question..
Reply
#10
(06-13-2017, 11:26 AM)Ezio Wrote: but if we just wanna run by using vehicle..
then what ? it wont let us get in for 10 secs..

(06-13-2017, 11:51 AM)NightFury Wrote: Exactly my question..

(06-12-2017, 09:46 PM)AmmaRz™ Wrote: if(GetPlayerSpecialAction(i) == SPECIAL_ACTION_ENTER_VEHICLE)

3 - SPECIAL_ACTION_ENTER_VEHICLE *    - Detect if the player is entering a vehicle via an animation.

Special Actions
Reply