16.03.2015, 20:20
Add this some where at the top,
Add this onplayerconnect
This is your keying.
Something like that. I obviously didn't test it.
pawn Код:
new CBugWarnings[MAX_PLAYERS];
pawn Код:
CBugWarnings[playerid] = 0;
pawn Код:
if ((oldkeys & KEY_FIRE) && (newkeys & KEY_CROUCH)&& GetPlayerWeapon(playerid)==24)
{
if(CBugWarnings[playerid] >= 5)
{
SendClientMessage(playerid, -1, "You've been killed for Cbugging.");
CBugWarnings[playerid] = 0;
SetPlayerHealth(playerid,0);
GameTextForPlayer(playerid, "~r~ C Bug not allowed.", 3000, 1);
return 1;
}
new string[129];
CBugWarnings[playerid] += 1;
format(string, sizeof(string), "[WARNING] C-Bugging is not allowed! (%d/5)",CBugWarnings[playerid]);
SendClientMessage(playerid, -1, string);
}