[FilterScript] [FS] SPK Admin v1 (Beta) | 21 commands | IRC Support | Whirlpool
#1

SPK Admin v1.1_01

IF YOU DOWNLOADED 1.1 PLEASE DOWNLOAD 1.1_01 AS I FORGOT TO REMOVE SOME DEBUGGING FEATURES WHICH COULD MAKE YOUR SCRIPT NOT WORK PROPERLY.

You need to download The Whirlpool plugin and sscanf 2.0 - both by ******.
Introduction:
This is a project I've been working on in my spare time. Here are some features:
-5 levels
-Custom ban system
-Whirlpool encrypted passwords
-34 commands
-Admins can't be banned or kicked
-Uses ZCMD, sscanf2, dini,

Commands:
LEVEL ZERO
/report - reports cheaters to admins
/register - does this need explaining?
/login - same
/setpass - sets your password if you're logged in

LEVEL ONE
/mute - mutes a player with a reason (automatically unmutes after 5 minutes)
/unmute - unmutes a player
/goto - teleports to player
* SloProKiller slaps - makes a player fall from 10m around a bit with a large trout.
/spec - spectates a player
/specoff - stops spectating
/explode - creates a small, non-lethal explosion at a player's position
/eject - ejects a player from the vehicle they're in

LEVEL TWO
/jail - jails a player with a reason (automatically unjails after 5 minutes)
/unjail - unjails a player
/get - teleports a player to you
/akill - kills a player with a reason
/freeze - freezes a player - with reason
/unfreeze - unfreezes a player
/kick - kicks a player with reason
/getin - get in a player's vehicle

LEVEL THREE
/ban - bans a player and all players with the same IP with a reason
/clearchat - clears chat for normal players (not for admins)
/say - displays a message saying [Admin]: message
/shunt - makes a player (or their vehicle, if they are in one) go in a random direction at speed
/xmute - same as mute, but with a time parameter
/xjail - same as jail, but with time parameter
/god - gives you (or a player, player parameter is optional) god mode and a minigun if level 4 or higher

LEVEL FOUR
/unban - unbans a player based on NAME (not IP)
/nuke - makes 6 large explosions on each side of the player (if you are spectating the player you will stop spectating as you would die)
/announce - announces with a game text
/giveweapon - gives a player a weapon
/cpass - changes a player's password to random numbers incase they forget it

LEVEL FIVE (and rcon)
/setlevel - sets a player's level
/kickall - kicks everyone on the server


Credits:
-DracoBlue for dini
-SA-MP team for SA-MP
-nemesis and especially Kyosaur for helping code some parts
-****** for sscanf2 and Whirlpool
-ZeeX for zcmd

Known Bugs:
-None, but I would love to know if you find any.

Download:
Mega


Changelog:
Код:
1.1_01 - removed debugging features that were overlooked in previous version.
2012: 1.1 - Complete rewrite, added many commands, new messages, ban system, now zcmd instead of dcmd, dini instead of dudb.
1.0 (Beta) - added /clearchat, changed some messages for admins to be hidden
0.2 - Added IRC Support, IRC commands, hopefully fixed /spec.
0.1 - initial release
Reply
#2

Nice and simple admin script.
Reply
#3

Not bad for a simple script.

~Hakam.
Reply
#4

Nice admin system. Useful
Reply
#5

Thanks guys!
Reply
#6

Excactly how I like it.Good job man,keep up the good work
Reply
#7

Updated to 0.2:
- Added IRC Support and Commands
- Hopefully Fixed /spec
- Uncomment '#define IRC' to use IRC.
Reply
#8

Hey, nice admin script you've made. I'm downloading it now.
Reply
#9

nice one dude
Reply
#10

Код:
C:\Documents and Settings\user\Desktop\SAMPS\filterscripts\SPK-admin.pwn(11) : fatal error 100: cannot read from file: "dudb"

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Help?
Reply
#11

Quote:
Originally Posted by MinZ|Spark
Code:
C:\Documents and Settings\user\Desktop\SAMPS\filterscripts\SPK-admin.pwn(11) : fatal error 100: cannot read from file: "dudb"

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Help?
You are missing dudb.inc (Include File) You can ****** it or search on samp for it.
Reply
#12

I will upload a includes folder into my website and give you the link > I guess you'll find all of the includes there > Wait for post update please.

Update: Added it => http://sa-mpuk.com/uploads/includes/

You can find it there > Well. I got to take permission from Dracoblue first => I will send him a PM shortly.
Other includes can be found there =3

~Hakam.
Reply
#13

I ******d it...And found this(dudb.inc):
Code:
/*
 *      DUDB functions
 *    © Copyright 2006-2007 by DracoBlue
 *
 * @version  : 2.3
 * @author  : DracoBlue (http://dracoblue.net)
 * @date   : 8th May 2006
 * @update  : 3rd June 2007
 * @require  : DUtils 1.8
 * @require  : DINI 1.5
 *
 * This Unit is provided as is (no warranties).
 * Feel free to use it, a little message in 
 * about box is honouring thing, isn't it?
 *
 */

#if defined _dudb_included
 #endinput
#endif

#define _dudb_included
#pragma library dutils

#include <dutils>
#include <dini>
#define dUser(%1).( udb_User(%1,
#define dUserINT(%1).( udb_UserInt(%1,
#define dUserSet(%1).( udb_UserSet(%1,
#define dUserSetINT(%1).( udb_UserSetInt(%1,
#define dUserSetFLOAT(%1).( udb_UserSetFloat(%1,
#define dUserFLOAT(%1).( udb_UserFloat(%1,

stock udb_hash(buf[]) {
	new length=strlen(buf);
  new s1 = 1;
  new s2 = 0;
  new n;
  for (n=0; n<length; n++)
  {
    s1 = (s1 + buf[n]) % 65521;
    s2 = (s2 + s1)   % 65521;
  }
  return (s2 << 16) + s1;
}

stock udb_encode(nickname[]) {
 new tmp[MAX_STRING];
 set(tmp,nickname);
 tmp=strreplace("_","_00",tmp);
 tmp=strreplace(";","_01",tmp);
 tmp=strreplace("!","_02",tmp);
 tmp=strreplace("/","_03",tmp);
 tmp=strreplace("\\","_04",tmp);
 tmp=strreplace("[","_05",tmp);
 tmp=strreplace("]","_06",tmp);
 tmp=strreplace("?","_07",tmp);
 tmp=strreplace(".","_08",tmp);
 tmp=strreplace("*","_09",tmp);
 tmp=strreplace("<","_10",tmp);
 tmp=strreplace(">","_11",tmp);
 tmp=strreplace("{","_12",tmp);
 tmp=strreplace("}","_13",tmp);
 tmp=strreplace(" ","_14",tmp);
 tmp=strreplace("\"","_15",tmp);
 tmp=strreplace(":","_16",tmp);
 tmp=strreplace("|","_17",tmp);
 tmp=strreplace("=","_18",tmp);
 return tmp;
}

stock udb_decode(nickname[]) {
 new tmp[MAX_STRING];
 set(tmp,nickname);
 tmp=strreplace("_01",";",tmp);
 tmp=strreplace("_02","!",tmp);
 tmp=strreplace("_03","/",tmp);
 tmp=strreplace("_04","\\",tmp);
 tmp=strreplace("_05","[",tmp);
 tmp=strreplace("_06","]",tmp);
 tmp=strreplace("_07","?",tmp);
 tmp=strreplace("_08",".",tmp);
 tmp=strreplace("_09","*",tmp);
 tmp=strreplace("_10","<",tmp);
 tmp=strreplace("_11",">",tmp);
 tmp=strreplace("_12","{",tmp);
 tmp=strreplace("_13","}",tmp);
 tmp=strreplace("_14"," ",tmp);
 tmp=strreplace("_15","\"",tmp);
 tmp=strreplace("_16",":",tmp);
 tmp=strreplace("_17","|",tmp);
 tmp=strreplace("_18","=",tmp);
 tmp=strreplace("_00","_",tmp);
 return tmp;
}


stock udb_Exists(nickname[]) {
 new tmp[MAX_STRING];
 format(tmp,sizeof(tmp),"%s.dudb.sav",udb_encode(nickname));
 return fexist(tmp);
}


stock udb_Remove(nickname[]) {
 new tmp[MAX_STRING];
 format(tmp,sizeof(tmp),"%s.dudb.sav",udb_encode(nickname));
 return dini_Remove(tmp);
}

stock udb_UserSetInt(nickname[],key[],value) {
 new fname[MAX_STRING];
 format(fname,sizeof(fname),"%s.dudb.sav",udb_encode(nickname));
 return dini_IntSet(fname,key,value);
}

stock udb_UserSetFloat(nickname[],key[],Float:value) {
 new fname[MAX_STRING];
 format(fname,sizeof(fname),"%s.dudb.sav",udb_encode(nickname));
 return dini_FloatSet(fname,key,value);
}

stock udb_UserSet(nickname[],key[],value[]) {
 new fname[MAX_STRING];
 format(fname,sizeof(fname),"%s.dudb.sav",udb_encode(nickname));
 return dini_Set(fname,key,value);
}

stock udb_User(nickname[],key[]) {
 new fname[MAX_STRING];
 format(fname,sizeof(fname),"%s.dudb.sav",udb_encode(nickname));
 format(fname,sizeof(fname),dini_Get(fname,key));
 return fname;
}

stock Float:udb_UserFloat(nickname[],key[]) {
 new fname[MAX_STRING];
 format(fname,sizeof(fname),"%s.dudb.sav",udb_encode(nickname));
 return dini_Float(fname,key);
}

stock udb_UserInt(nickname[],key[]) {
 new fname[MAX_STRING];
 format(fname,sizeof(fname),"%s.dudb.sav",udb_encode(nickname));
 return dini_Int(fname,key);
}

stock udb_CheckLogin(nickname[],pwd[]) {
 new fname[MAX_STRING];
 format(fname,sizeof(fname),"%s.dudb.sav",udb_encode(nickname));
 if (udb_UserInt(nickname,"password_hash")==udb_hash(pwd)) return true;
 return false;
}


stock udb_Create(nickname[],pwd[]) {
 if (udb_Exists(nickname)) return false;
 new fname[MAX_STRING];
 format(fname,sizeof(fname),"%s.dudb.sav",udb_encode(nickname));
 dini_Create(fname);
 udb_UserSetInt(nickname,"password_hash",udb_hash(pwd));
 return true;
}
And still doesnt works...
Helps?
Reply
#14

http://forum.sa-mp.com/index.php?topic=684.0
Reply
#15

Code:
C:\Documents and C:\Documents and Settings\user\Desktop\SAMPS\filterscripts\SPK-admin.pwn(1826) : warning 203: symbol is never used: "gBotID"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
WTF??
The bots doesnt join IRC!
Reply
#16

Quote:
Originally Posted by MinZ|Spark
Code:
C:\Documents and C:\Documents and Settings\user\Desktop\SAMPS\filterscripts\SPK-admin.pwn(1826) : warning 203: symbol is never used: "gBotID"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
WTF??
The bots doesnt join IRC!
Make sure to uncomment "#Define IRC"
and select the server, channel etc.
Reply
#17

Code:
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
Well,thx!
But,the bots still doesnt join
Seriously,help
Reply
#18

Btw,look this pic:




Really need help!
Reply
#19

Quote:
Originally Posted by MinZ|Spark
Btw,look this pic:




Really need help!
It is loaded, but you have ladmin running too!
Reply
#20

It is loaded, but you have ladmin running too!
[/quote]

Yeah lol...
But,why?what happen?
o.O
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)