16.10.2011, 16:46
Hey, i have a JunkBuster AntiCheat on my RP Server and i have to make that the any Admin can spam and command spam!!! But i dont know how!! Can anyone make me a script for JunKBuster like this! :
Quote:
public OnPlayerText(playerid, text[]) { if(JB_PlayerInfo[playerid][JB_pMuted] && JB_Variables[SPAM]) { JB_SendFormattedMessage(playerid,RED,"BE AntiCheat: You are not allowed to chat for %d second(s) because you have been muted!",JB_PlayerInfo[playerid][JB_pMuted]); return 0; } if(JB_PlayerInfo[playerid][JB_pLastMessage][0]) { if(!strcmp(text,JB_PlayerInfo[playerid][JB_pLastMessage],false)) JB_PlayerInfo[playerid][JB_pMessageRepeated]++; else JB_PlayerInfo[playerid][JB_pMessageRepeated]=0; } else JB_PlayerInfo[playerid][JB_pMessageRepeated]=0; format(JB_PlayerInfo[playerid][JB_pLastMessage],128,text); JB_PlayerInfo[playerid][JB_pMessages]++; if(!JB_PlayerInfo[playerid][JB_pMuted] && JB_Variables[SPAM] && (!JB_IsPlayerAdmin(playerid) || !JB_Variables[ADMIN_IMMUNITY])) { if(JB_PlayerInfo[playerid][JB_pMessages]>15) { JB_Ban(playerid,"Extreme spam"); return 0; } else if(JB_PlayerInfo[playerid][JB_pMessages]>10) { JB_Kick(playerid,"Massive spam"); return 0; } else if(JB_PlayerInfo[playerid][JB_pMessages]>4 || JB_PlayerInfo[playerid][JB_pMessageRepeated]>=MAX_CHECKS) { JB_PlayerInfo[playerid][JB_pMessageRepeated]=0; MutePlayer(playerid,2*60,"Spam"); return 0; } } if(CapsLockCheck(text) && JB_Variables[CAPS_LOCK]) { SendClientMessage(playerid,RED,"BE AntiCheat: You are not allowed to use Caps Lock! Press [Caps Lock] to disable it."); return 0; } if(AdvertisementCheck(text) && !JB_IsPlayerAdmin(playerid)) { JB_Kick(playerid,"Advertisement"); return 0; } if(JB_Variables[BAD_WORDS] && BadWordsCheck(text)) { SendClientMessage(playerid,RED,"BE AntiCheat: NEPSUJ! Bices kaznjen!"); return 0; } return CallLocalFunction("JB_OnPlayerText","is",playerid, text); } public OnPlayerCommandText(playerid, cmdtext[]) { JB_PlayerInfo[playerid][JB_pCommands]++; if(JB_Variables[COMMAND_SPAM] && (!JB_IsPlayerAdmin(playerid) || !JB_Variables[ADMIN_IMMUNITY])) { if(JB_PlayerInfo[playerid][JB_pCommands]>15) { JB_Ban(playerid,"Extreme command spam"); return 1; } else if(JB_PlayerInfo[playerid][JB_pCommands]>5) { JB_Kick(playerid,"Command spam"); return 1; } } |