Jump to content

Anti C-Bug


ARTIST

Recommended Posts

Multi dintre playerii SA-MP posibil inca nustiu ce inseamna de a abuza de C-Bug. Mai jos voi descrie mai pe larg semnificatia acestui abuz nociv.

Sunt multe metode de a abuza de acesta,dar una din cele mai simple o voi prezenta prin afisarea unui video-tutorial gasit pe YouTube:

Din cate observam in video de mai sus, playerul abuzeaza,facand un spam continuu pe tasta "C",pentru a dezbate astfel toate animatiile legate de folosirea armei (lasarea armei jos,incarcarea armei,ridicarea armei spre tinta,etc.) pe care o detine,astfel castigand in timp si avand un avantaj mai mare decat adversarul sau posibil.

Stand si reflectand asupra acestei probleme,totusi am gasit solutia impotriva acestui abuz ce ofera un avantaj considerabil unor playeri mai "destepti".

Astfel,in cazul codului meu,de fiecare data cand playerul va abuza de C-Bug,acestuia i se va scoate 25% HP (viata) si va fi avertizat cu un mesaj. Deja dumneavoastra puteti modifica usor sanctiunea intr-un simplu slap,kick,jail,etc.

Codul sub forma unui FilterScript:

[pawn]#include <a_samp>

#define C_BUG_TIME 5

#define COLOR_RED 0xAA3333AA

#define COLOR_LIGHTRED 0xFF6347AA

#undef MAX_PLAYERS

#define MAX_PLAYERS 200

new P_CBUG_TICKS[MAX_PLAYERS];

     

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)

{

  new playername[MAX_PLAYER_NAME];

  GetPlayerName(playerid, playername, sizeof(playername));

  if(newkeys & KEY_FIRE && oldkeys & KEY_CROUCH && IsCbugWeapon(playerid))

  {

P_CBUG_TICKS[playerid] ++;

if(P_CBUG_TICKS[playerid] > C_BUG_TIME)

{

            new str2[128];

            format(str2, sizeof(str2), "Jucatorul %s abuzeaza de C-Bug!", playername);

            SendClientMessageToAll(COLOR_RED, str2);

            SendClientMessage(playerid,COLOR_LIGHTRED,"Atentie! Va rugam sa nu abuzati de C-Bug pentru a nu fi sanctionat!");

P_CBUG_TICKS[playerid] = 0;

new Float:Health; GetPlayerHealth(playerid,Health); SetPlayerHealth(playerid,Health-25);

  }

  }

  return 1;

}

stock IsCbugWeapon(playerid)

{

    new weaponID = GetPlayerWeapon(playerid);

    if(weaponID == 22 || weaponID == 24 || weaponID == 25 || weaponID == 27)

{

    return 1;

}

    return 0;

}[/pawn]

•  In caz ca apar nelamuriri sau alte intrebari,nu ezitati sa lasati mesaj in aceasta tema,pentru ca impreuna sa putem solutiona toate problemele aparute.

  • Upvote 1

ep41yhufqpagka5wfoornw1wjfjie.png

HTjr_G.png
12975.png
 
Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...
  • 3 weeks later...
  • 4 weeks later...
  • 4 weeks later...
  • 1 month later...
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.