Hello There, Guest! Login or Register


[Idea/Script] Anti Fake Car Entry (No! it doesn't ban you!)
#11
(06-13-2017, 11:20 AM)AmmaRz™ Wrote:
(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.

1: I didn't read the code of the script, I'm at work right now, so only have limited time. Other posts show you appear to have a check for that.

2: It's not that hard to not abuse whatever the fuck you want. If you use a command just to evade a player instead of the command's intended use it should already ring a bell..

3. Well the main thing we'll be focusing on is people using hack tools. But if a regular can't stop doing all the lame shit we'll have to take action. Just simply play fair.. Also, it's so often we get person a reporting person b and then person a doing whatever he reported person b for himself.. Just play against others like you'd want them to play against you.

4. Did you test your command before making the pull request? You've added it to AdministratorCommands, so should only be available for Admins.
Also Russell went MIA for a few months, and I don't think we have any active developers left at this moment.
But hey when one returns he'll look at the PRs :)
Reply
#12
(06-13-2017, 12:35 PM)Holsje Wrote:
(06-13-2017, 11:20 AM)AmmaRz™ Wrote:
(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.

1: I didn't read the code of the script, I'm at work right now, so only have limited time. Other posts show you appear to have a check for that.

2: It's not that hard to not abuse whatever the fuck you want. If you use a command just to evade a player instead of the command's intended use it should already ring a bell..

3. Well the main thing we'll be focusing on is people using hack tools. But if a regular can't stop doing all the lame shit we'll have to take action. Just simply play fair.. Also, it's so often we get person a reporting person b and then person a doing whatever he reported person b for himself.. Just play against others like you'd want them to play against you.

4. Did you test your command before making the pull request? You've added it to AdministratorCommands, so should only be available for Admins.
Also Russell went MIA for a few months, and I don't think we have any active developers left at this moment.
But hey when one returns he'll look at the PRs :)
1: Alright. 

2: I don't usually abuse. Well each command that is supposed to be an abusive during fight has a cool down time. It will only be available to use after the specific time frame. Where i use them. And i will use them however the fuck i want. 

3: oh your actions on regulars are nothing more than just  a cliché (when u admins start to fight against the certain player which we are fighting from a long time pisses you off, by then tends you to take your administrative actions, while before them our reportings had no action, but now when you are pissed,  a certain rule has emerged out of nowhere and taken as a divine rule by then, and followed as it was meant forever to follow) , See, i always play fair, and none is giving me that back in return.(that is why i admitted, which i never will) .

4: I wrote the code with my eyes opened. In administratorCommands there was this /HS command (which is available for everybody) , i just followed that command's location. The flaw was already in there that in admin cmds there are player cmds. 

Well, i can argue as much as you want. But the point is, this shit can't be added since you got no Scripter :)
Reply
#13
AmmaRz its not work like that on LVP, every callback got forwared have playerId defined on it even if you didnt use it or add it on callback and LVP got their own timer system so SetTimer wont work here, nice try tho, apprecited!

about /pl command it was useless, because of there already /my playerinfo,

i will add anti fake car by myself! once my long pull request got accepted, dont worrie :d

Note: code you created or something like that, will make players unable to get in any vehicle to run away if they afraid or want to refil, you should take a look on that

OT: cool to know that you start learning pawno recently tho

Thank you,

Yassine
Reply
#14
Yassine , teach me how to be a nerd! :P
Reply
#15
(06-14-2017, 10:35 PM)Haunter Wrote: Yassine , teach me how to be a nerd! :P

isn't you are ?  8)7
Reply
#16
(06-14-2017, 04:14 AM)Yassine Wrote: 1: about /pl command it was useless, because of there already /my playerinfo,

2: Note: code you created or something like that, will make players unable to get in any vehicle to run away if they afraid or want to refil, you should take a look on that

3: OT: cool to know that you start learning pawno recently tho
1: Well /PL cmd is designed to check your own self's packet loss(additionally others too) rather than that /my playerinfo cmd which shows other players PL.

2: i want player to be unable to enter vehicle(not to run,  not to refill) when he shoots or gets shot within 10 seconds.  /looks like u haven't get my code/.

3: thank you!  just started last week.
Reply
#17
(06-15-2017, 12:44 AM)AmmaRz™ Wrote: 1: Well /PL cmd is designed to check your own self's packet loss(additionally others too) rather than that /my playerinfo cmd which shows other players PL.

2: i want player to be unable to enter vehicle(not to run,  not to refill) when he shoots or gets shot within 10 seconds.  /looks like u haven't get my code/.

3: thank you!  just started last week.

1: its still useless, rarely when someone want to check PL, players always check FPS not on PL, i do recommand /my playerinfo

2: you want doesn't mean everyone do, well LVP is a freeroam server means you can run if you get low health or something like that or want to run, you can't make noobs more noobless, also this is a bad idea for me, and i did get your code already i didnt want to speak advanced on it :d 

3: ;d
Reply
#18
(06-15-2017, 12:58 AM)Yassine Wrote: 1: its still useless, rarely when someone want to check PL, players always check FPS not on PL, i do recommand /my playerinfo

and i did get your code already i didnt want to speak advanced on it :d 

Go to LVP and ask players or admins if they want to talk to you, do they want a command to check their own PL or not. 95% percent will say yes even admins wants it. nobody wants to go to his/her frnd to tell him whats his PL. have some brain.... "people always check FPS not on PL'  _O- Welcome To SAMP... are you new or something? who told you that :D /my playerinfo tells you other players info by giving you a bubble text on each player body. we are talking about our PL via single command.

Please try to elaborate, we are here for opinions and suggestions after all... and be "advanced" so we can understand.
Reply
#19
(06-15-2017, 09:45 AM)Winnie Wrote:
(06-15-2017, 12:58 AM)Yassine Wrote: 1: its still useless, rarely when someone want to check PL, players always check FPS not on PL, i do recommand /my playerinfo

and i did get your code already i didnt want to speak advanced on it :d 

Go to LVP and ask players or admins if they want to talk to you, do they want a command to check their own PL or not. 95% percent will say yes even admins wants it. nobody wants to go to his/her frnd to tell him whats his PL. have some brain.... "people always check FPS not on PL'  _O- Welcome To SAMP... are you new or something? who told you that :D /my playerinfo tells you other players info by giving you a bubble text on each player body. we are talking about our PL via single command.

Please try to elaborate, we are here for opinions and suggestions after all... and be "advanced" so we can understand.

1- PL command:

first of all there some bugs and mistakes that i didn't talked about it and code is need of optimizations

AmmaRz Code:

Code:
lvp_pl(playerId, params[]) {
   if (Command->parameterCount(params) == 0) {
       // Show the packet loss to player who just wrote the command either wrongfully, or willingly.
       format(g_message, sizeof(g_message), "{E6B800}Your Packet Loss is: {FF9900}%.2f{FFFFFF}. To check other's, Use: /PL [player]",
           NetStats_PacketLossPercent(playerId));
       SendClientMessage(playerId, Color::Information, g_message);
       return 1;
   }

   new subjectId = Command->playerParameter(params, 0, playerId);
   if (subjectId == Player::InvalidId)
       return 1;

   // Show the Packet loss per percent of specified player.
   format(g_message, sizeof(g_message), "{E6B800}Packet Loss of %s (Id:%d) is: {FF9900}%.2f.",
       Player(subjectId)->nicknameString(), subjectId, NetStats_PacketLossPercent(subjectId));
   SendClientMessage(playerId, Color::Success, g_message);

   return 1;
}


instand of using this params check and adding more lines (cpu usage even if its small) isnt needed, you can directly check if he inserted an id else you can replace subjectId by his Id :)

like this 

Quote:if (Command->parameterCount(params) == 0) subjectId = playerId
else subjectId = Command->playerParameter(params, 0, playerId);

and like that its more optimized and better about some mistakes you did 

Code:
SendClientMessage(playerId, Color::Success, g_message);
SendClientMessage(playerId, Color::Information, g_message);

Seems like you used colors while format so using Color::Success/Information isn't needed anymore, you can replace it by -1

and a little thing

Quote:   if (subjectId == Player::InvalidId)
       return 1;

Player will never insert an invalid id, because of It's just checking if a variable is equal to INVALID_PLAYER_ID (a number), which is never connected because a player can never have that ID.

You can simply use IsPlayerConnected instand.

and i see that you did put it on AdministratorCommands.pwn, you should move it to General.pwn

@Winnie: You should check codes and things before trying to give an opinion ;>

2- Anit fake car entry

About your second code its uncomptabilite with LVP, but lets make it do

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;
}

i f you did a look that means the variables of Fighting isnt needed, you can use directly the lvp variable or function DamageManager(playerid)->isPlayerFighting() that's return two values true or false, so 95 % of code will be removed, because of there a callback OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) so we don't need timer anymore, and simply remove player from vehicle instand of setting pos again :)

and seems like lvp moved it to java script, but try it on pawno on your local server before open a PR, so code will looks like this
Code:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
   if (DamageManager(playerid)->isPlayerFighting())
    {
       ClearAnimations(playerid);
       RemovePlayerFromVehicle(playerid);
        SendClientMessage(playerid, Color::Error, "** You can't enter in a car while you are in a fight or fired a weapon!");
    }
    return 1;
}


Have a nice day! :)

Yassine
Reply
#20
(06-15-2017, 02:33 PM)Yassine Wrote:
(06-15-2017, 09:45 AM)Winnie Wrote:
(06-15-2017, 12:58 AM)Yassine Wrote: 1: its still useless, rarely when someone want to check PL, players always check FPS not on PL, i do recommand /my playerinfo

and i did get your code already i didnt want to speak advanced on it :d 

Go to LVP and ask players or admins if they want to talk to you, do they want a command to check their own PL or not. 95% percent will say yes even admins wants it. nobody wants to go to his/her frnd to tell him whats his PL. have some brain.... "people always check FPS not on PL'  _O- Welcome To SAMP... are you new or something? who told you that :D /my playerinfo tells you other players info by giving you a bubble text on each player body. we are talking about our PL via single command.

Please try to elaborate, we are here for opinions and suggestions after all... and be "advanced" so we can understand.


1- PL command:

first of all there some bugs and mistakes that i didn't talked about it and code is need of optimizations

AmmaRz Code:

Code:
lvp_pl(playerId, params[]) {
   if (Command->parameterCount(params) == 0) {
       // Show the packet loss to player who just wrote the command either wrongfully, or willingly.
       format(g_message, sizeof(g_message), "{E6B800}Your Packet Loss is: {FF9900}%.2f{FFFFFF}. To check other's, Use: /PL [player]",
           NetStats_PacketLossPercent(playerId));
       SendClientMessage(playerId, Color::Information, g_message);
       return 1;
   }

   new subjectId = Command->playerParameter(params, 0, playerId);
   if (subjectId == Player::InvalidId)
       return 1;

   // Show the Packet loss per percent of specified player.
   format(g_message, sizeof(g_message), "{E6B800}Packet Loss of %s (Id:%d) is: {FF9900}%.2f.",
       Player(subjectId)->nicknameString(), subjectId, NetStats_PacketLossPercent(subjectId));
   SendClientMessage(playerId, Color::Success, g_message);

   return 1;
}


instand of using this params check and adding more lines (cpu usage even if its small) isnt needed, you can directly check if he inserted an id else you can replace subjectId by his Id :)

like this 

Quote:if (Command->parameterCount(params) == 0) subjectId = playerId
else subjectId = Command->playerParameter(params, 0, playerId);

and like that its more optimized and better about some mistakes you did 

Code:
SendClientMessage(playerId, Color::Success, g_message);
SendClientMessage(playerId, Color::Information, g_message);

Seems like you used colors while format so using Color::Success/Information isn't needed anymore, you can replace it by -1

and i see that you did put it on AdministratorCommands.pwn, you should move it to General.pwn
[Image: 117tdnn.jpg]
(06-15-2017, 02:33 PM)Yassine Wrote: and a little thing

Quote:   if (subjectId == Player::InvalidId)
       return 1;


(06-15-2017, 02:33 PM)Yassine Wrote: Player will never insert an invalid id, because of It's just checking if a variable is equal to INVALID_PLAYER_ID (a number), which is never connected because a player can never have that ID.

You can simply use IsPlayerConnected instand.
IsPlayerConnected : Why would i use it?
Can you explain this?

[Image: 29mx8g1.jpg]

(06-15-2017, 02:33 PM)Yassine Wrote: @Winnie: You should check codes and things before trying to give an opinion ;>

2- Anit fake car entry

About your second code its uncomptabilite with LVP, but lets make it do

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;
}


(06-15-2017, 02:33 PM)Yassine Wrote: i f you did a look that means the variables of Fighting isnt needed, you can use directly the lvp variable or function DamageManager(playerid)->isPlayerFighting() that's return two values true or false, so 95 % of code will be removed, because of there a callback OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) so we don't need timer anymore, and simply remove player from vehicle instand of setting pos again :)

and seems like lvp moved it to java script, but try it on pawno on your local server before open a PR, so code will looks like this
Code:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
   if (DamageManager(playerid)->isPlayerFighting())
   {
       ClearAnimations(playerid);
       RemovePlayerFromVehicle(playerid);
       SendClientMessage(playerid, Color::Error, "** You can't enter in a car while you are in a fight or fired a weapon!");
   }
   return 1;
}

If ever you had read the title of my thread you would have never said 'Incompatible'. because it was an idea based script and compatible with all other 99.99% of samp servers. I am not obsessed with lvp script.
The same thing can also be done in OnPlayerKeyStateChange aswell..

What i did, is i get the vehicle entering animation, i already told that..


Btw by obsessed i meant.
Yaa, AKA LVP YAssine Releasing the LVP script under his name.
Reply