SA-MP Forums Archive
[FilterScript] [FS] SPK Admin v1 (Beta) | 21 commands | IRC Support | Whirlpool - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] [FS] SPK Admin v1 (Beta) | 21 commands | IRC Support | Whirlpool (/showthread.php?tid=128073)

Pages: 1 2 3


SPK Admin v1.1_01| 34 commands | zcmd, whirlpool, dini, sscanf2 - SloProKiller - 16.02.2010

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



Re: [FS] SPK Admin v0.1 | 20 commands - Roperr - 16.02.2010

Nice and simple admin script.



Re: [FS] SPK Admin v0.1 | 20 commands - »»»Hakam - 16.02.2010

Not bad for a simple script.

~Hakam.


Re: [FS] SPK Admin v0.1 | 20 commands - MaykoX - 16.02.2010

Nice admin system. Useful


Re: [FS] SPK Admin v0.1 | 20 commands - SloProKiller - 16.02.2010

Thanks guys!


Re: [FS] SPK Admin v0.1 | 20 commands - Souvlaki - 16.02.2010

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


Re: [FS] SPK Admin v0.2 | 20 commands | IRC Support! - SloProKiller - 16.02.2010

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


Re: [FS] SPK Admin v0.2 | 20 commands | IRC Support! - Aur0nX390 - 17.02.2010

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


Re: [FS] SPK Admin v0.2 | 20 commands | IRC Support! - Naruto4 - 20.02.2010

nice one dude


Re: [FS] SPK Admin v0.2 | 20 commands | IRC Support! - MinZ|Spark - 23.02.2010

Код:
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?


Re: [FS] SPK Admin v0.2 | 20 commands | IRC Support! - MaykoX - 23.02.2010

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.


Re: [FS] SPK Admin v0.2 | 20 commands | IRC Support! - »»»Hakam - 23.02.2010

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.


Re: [FS] SPK Admin v0.2 | 20 commands | IRC Support! - MinZ|Spark - 24.02.2010

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?



Re: [FS] SPK Admin v0.2 | 20 commands | IRC Support! - SloProKiller - 24.02.2010

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


Re: [FS] SPK Admin v0.2 | 20 commands | IRC Support! - MinZ|Spark - 25.02.2010

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!


Re: [FS] SPK Admin v0.2 | 20 commands | IRC Support! - SloProKiller - 25.02.2010

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.


Re: [FS] SPK Admin v0.2 | 20 commands | IRC Support! - MinZ|Spark - 26.02.2010

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


Re: [FS] SPK Admin v0.2 | 20 commands | IRC Support! - MinZ|Spark - 26.02.2010

Btw,look this pic:




Really need help!


Re: [FS] SPK Admin v0.2 | 20 commands | IRC Support! - SloProKiller - 26.02.2010

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




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


Re: [FS] SPK Admin v0.2 | 20 commands | IRC Support! - MinZ|Spark - 27.02.2010

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

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