Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - shaheersa

Pages: [1]
1
Snippet Showroom / Anti-Insult and Anti-ClanCheat systems by me
« on: February 02, 2013, 10:36:05 pm »
hi all
i think even some advanced scripters wont know that, but, i will show you some of the 2 systems ive made
the anti insult works like that: if like anyone types a abusing word example "monfuck" it detects the "fuck" and kicks them 100% tested even if they type "you fucker" it detects "fuck" and kicks them. Here is the code

This is the anti insult system

Put this under onplayertext

[pawn]public OnPlayerText(playerid, cmdtext[])//you may have OnPlayerText(playerid) change it to OnPlayerText(playerid, cmdtext)
CheckInsult(playerid, cmdtext);[/pawn]

Make a public CheckInsult(playerid, c[])
[pawn]   new cde[256]; cde = "CountRegisters";
   if (strfind(c, "fuck", true) != -1 || strfind(c, "*****", true) != -1 ) Kicks(playerid, "Insulting Admins/Players");
   if (strfind(c, "******", true) != -1 || strfind(c, "bullshit", true) != -1 ) Kicks(playerid, "Insulting Admins/Players");
   if (strfind(c, "ass", true) != -1 || strfind(c, "stupid", true) != -1 ) Kicks(playerid, "Insulting Admins/Players");
   if (strfind(c, "gay", true) != -1 || strfind(c, "sexy", true) != -1 ) Kicks(playerid, "Insulting Admins/Players");
    return 0;[/pawn]

this is the anti-clancheat system

Put this under public OnPlayerCommandText(playerid, cmdtext)
[pawn]
public OnPlayerCommandText(playerid, cmdtext)
      if (strcmp(cmd, "clan", true) == 0) {
      tmp = strtok(cmdtext, idx), plr = FindPlayerIDFromString(tmp);
      if (IsLevel(playerid,6)) return 0;//Change IsLevel(playerid,6) to what you use to check if player is a admin
      else if (!strlen(tmp)) SendClientMessage(playerid, GREEN,"ERROR: Invalid Syntax - Use  /c %s <playerid/name>.",cmdtext);
      else {
           if (plr == INACTIVE_PLAYER_ID) SendClientMessage(playerid, GREEN,"ERROR: Unknown player."); else {
                pInfo[plr][ClanUSA] = 1;//Change it to what you use as PlayerInfo
               }
      }
      return 1;
   }[/pawn]

Put this under OnPlayerSpawn(playerid,classid,teamid)
[pawn]public OnPlayerSpawn(playerid,classid,teamid)
    if (pInfo[playerid][ClanUSA] = 0) {
   NickPlayerChar(playerid);
    }[/pawn]

Make a public NickPlayerChar(playerid)
[pawn]public NickPlayerChar(playerid)
{

    if(IsInClan(gPlayers[playerid]))
   {
   SendClientMessage(playerid, COLOR_RED, "CONNECTION REJECTED");
   SendClientMessage(playerid, COLOR_RED, "YOU HAVE BEEN KICKED");
   SendClientMessage(playerid, COLOR_RED, "ADMIN: SYSTEM REASON: NOT IN CLAN USA");
   Kick(playerid);
   SendClientMessageToAll(playerid, COLOR_RED, "Admin System kicked %s. Reason: Not in clan USA",gPlayers[playerid]);
   }
}[/pawn]

Now make a public IsInClan(c)
[pawn]public IsInClan(c[])
{
   new cde[256]; cde = "CountRegisters";
   if (strfind(c, "USA", true) != -1) return 1;//Replace USA with your clan
        else return 0;
    return 1;
}[/pawn]


Now here you have them. Now you have a insult-free and clancheat-free server!
You might have some warnings, but ignore them its tested 100% works

2
hi guys im having this error:
Code: [Select]
C:\Users\Hameed\Downloads\Okey_use_this\gamemodes\SOF.pwn(23) : fatal error 100: cannot read from file: "Madara"

Compilation aborted.Pawn compiler 3.0.3367 Copyright (c) 1997-2005, ITB CompuPhase


1 Error.

anyone has the file Madara.inc? i know how to fix it  but i cant find the file madara.inc anywhere


I found the file madara.inc, if anyone needs it write it so i will upload it

3
mIRC/pawn Scripting / I need help with command /c bringall
« on: December 26, 2012, 12:58:53 am »
Hi scripters,
i need some help
/c mute [player] = player cant write anything in chat ---------------------I dont need this command
/c reloadscript = reload the script without needing to restart the server --------------------------- I fixed it myself
/c bringall

Thanks

Pages: [1]