- 0
Ajutor script c-bug
-
Similar Content
-
- 2 replies
- 161 views
-
- 9 replies
- 590 views
-
- 2 answers
- 110 views
-
- 8 replies
- 1,145 views
-
- 3 replies
- 312 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
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.
Question
mR.KerigaN
Nick: mR.KerigaN
Problema: am incercat sa bag un sistem anti c-bug am bagat tot si cand bag ce am scris ingrosat si subliniat imi da stopped working... dc?
#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;
}
Erori / warnings: imi da stopped working
Lini/script: -
Ai incercat sa rezolvi singur ?:
Link to comment
Share on other sites
3 answers to this question
Recommended Posts