SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 12/04/2020, 11:42 PM   #41
OstGot
Gangsta
 
OstGot's Avatar
 
Join Date: Mar 2013
Location: Gomel, Belarus
Posts: 959
Reputation: 347
Default Re: Admin System - admin system with many features

v2.4

Changes:
Ability to define the settings before the include
OnPlayerBan, OnPlayerKick and OnPlayerWarn are now called from all filterscripts
Removed additional y_hooks support
Minor improvements and bug fixes
__________________
aka Nexius
Don't want to always check for updates of my scripts?
Include it the last, after all others
Nexius's Update Checker
OstGot is online now   Reply With Quote
Old 30/05/2020, 12:19 PM   #42
OstGot
Gangsta
 
OstGot's Avatar
 
Join Date: Mar 2013
Location: Gomel, Belarus
Posts: 959
Reputation: 347
Default Re: Admin System - admin system with many features

v2.5

Changes:
Added an ability to display player connection messages for admins
Added an ability to display kill list for admins (enabled by default)
Define "SEND_ACTION_MSGS_TO_ALL" renamed to "ADMSYS_SEND_ACTION_MSGS_TO_ALL"
Added alternative names for "/banip" and "/unbanip" commands ("/blockip" and "/unblockip")
__________________
aka Nexius
Don't want to always check for updates of my scripts?
Include it the last, after all others
Nexius's Update Checker
OstGot is online now   Reply With Quote
Old 30/05/2020, 12:42 PM   #43
Unrea1
Gangsta
 
Unrea1's Avatar
 
Join Date: Oct 2013
Location: Venezuela
Posts: 824
Reputation: 129
Default Re: Admin System - admin system with many features

Code:
SetTimer("UpdateMuteTime", 1000, 1);
Delete this and use gettime...
__________________
Unrea1 is offline   Reply With Quote
Old 30/05/2020, 12:49 PM   #44
OstGot
Gangsta
 
OstGot's Avatar
 
Join Date: Mar 2013
Location: Gomel, Belarus
Posts: 959
Reputation: 347
Default Re: Admin System - admin system with many features

Quote:
Originally Posted by Unrea1 View Post
Code:
SetTimer("UpdateMuteTime", 1000, 1);
Delete this and use gettime...
Using timer the script has ability to notify a player when his mute time has expired (so that he won't need to guess it himself).
__________________
aka Nexius
Don't want to always check for updates of my scripts?
Include it the last, after all others
Nexius's Update Checker
OstGot is online now   Reply With Quote
Old 04/06/2020, 06:23 PM   #45
OstGot
Gangsta
 
OstGot's Avatar
 
Join Date: Mar 2013
Location: Gomel, Belarus
Posts: 959
Reputation: 347
Default Re: Admin System - admin system with many features

v2.6

Changes:
* Added a shorter alternative names for several commands
__________________
aka Nexius
Don't want to always check for updates of my scripts?
Include it the last, after all others
Nexius's Update Checker
OstGot is online now   Reply With Quote
Old 30/06/2020, 06:59 AM   #46
STORIEL000
Big Clucker
 
Join Date: Jun 2020
Location: Tree
Posts: 68
Reputation: 6
Default Re: Admin System - admin system with many features

I don't understand. is this a filterscript? And if it is, does it save the admin level? Thanks!
STORIEL000 is offline   Reply With Quote
Old 01/07/2020, 11:47 AM   #47
OstGot
Gangsta
 
OstGot's Avatar
 
Join Date: Mar 2013
Location: Gomel, Belarus
Posts: 959
Reputation: 347
Default Re: Admin System - admin system with many features

Quote:
Originally Posted by STORIEL000 View Post
I don't understand. is this a filterscript? And if it is, does it save the admin level? Thanks!
No, it's an include and it has API concept (i.e. you can make saving system yourself but here is only some functions and callbacks that can help you do it with)
__________________
aka Nexius
Don't want to always check for updates of my scripts?
Include it the last, after all others
Nexius's Update Checker

Last edited by OstGot; 01/07/2020 at 09:13 PM.
OstGot is online now   Reply With Quote
Old 01/07/2020, 12:40 PM   #48
1sbedx
Huge Clucker
 
Join Date: Dec 2015
Posts: 366
Reputation: 50
Default Re: Admin System - admin system with many features

Quote:
Originally Posted by OstGot View Post
Using timer the script has ability to notify a player when his mute time has expired (so that he won't need to guess it himself).
You can do this with gettime as well. (much easier and simpler)

pawn Code:
new PlayerMuteTime[MAX_PLAYERS];

MutePlayer(playerid, seconds) {
  PlayerMuteTime[playerid] = gettime() + _: (!seconds ? -gettime() : seconds);
}

IsPlayerMuted(playerid) {
  return PlayerMuteTime[playerid];
}

public OnPlayerUpdate(playerid) {
  if (IsPlayerMuted(playerid) && PlayerMuteTime[playerid] < gettime()) {
    MutePlayer(playerid, 0);

    SendClientMessage(playerid, -1, "You are no longer muted.");
  }
  return 1;
}

It also allows you to easily show the remaining muted time.
pawn Code:
public OnPlayerText(playerid, text[]) {
  if (IsPlayerMuted(playerid)) {
    SendClientMessageEx(playerid, -1, "You are mutated. (%02i:%02i:%02i remaining)", (PlayerMuteTime[playerid] - gettime()) / 3600, ((PlayerMuteTime[playerid] - gettime()) % 3600) / 60, ((PlayerMuteTime[playerid] - gettime()) % 3600) % 60);
    return 0;
  }
  return 1;
}

Last edited by 1sbedx; 01/07/2020 at 01:26 PM.
1sbedx is offline   Reply With Quote
Old 01/07/2020, 09:07 PM   #49
OstGot
Gangsta
 
OstGot's Avatar
 
Join Date: Mar 2013
Location: Gomel, Belarus
Posts: 959
Reputation: 347
Default Re: Admin System - admin system with many features

Quote:
Originally Posted by 1sbedx View Post
pawn Code:
public OnPlayerUpdate(playerid) {
  if (IsPlayerMuted(playerid) && PlayerMuteTime[playerid] < gettime()) {
    MutePlayer(playerid, 0);

    SendClientMessage(playerid, -1, "You are no longer muted.");
  }
  return 1;
}
It is not easier nor simple at all: instead of using one timer you do this check every player's packet (as OnPlayerUpdate is calling for several synchronizations and it has a high call frequency) that is just overkill. Moreover you should consider the states when this callback can be called: it is not called if a player in AFK and (what is the biggest problem for your implementation besides its higher load) if that player is dead or not spawned at the moment, for example, if he stays in class selection for a long time choosing the team

Quote:
Originally Posted by 1sbedx View Post
It also allows you to easily show the remaining muted time.
pawn Code:
public OnPlayerText(playerid, text[]) {
  if (IsPlayerMuted(playerid)) {
    SendClientMessageEx(playerid, -1, "You are mutated. (%02i:%02i:%02i remaining)", (PlayerMuteTime[playerid] - gettime()) / 3600, ((PlayerMuteTime[playerid] - gettime()) % 3600) / 60, ((PlayerMuteTime[playerid] - gettime()) % 3600) % 60);
    return 0;
  }
  return 1;
}
Yeah, I'm already have such ability
__________________
aka Nexius
Don't want to always check for updates of my scripts?
Include it the last, after all others
Nexius's Update Checker
OstGot is online now   Reply With Quote
Old 01/07/2020, 09:30 PM   #50
1sbedx
Huge Clucker
 
Join Date: Dec 2015
Posts: 366
Reputation: 50
Default Re: Admin System - admin system with many features

Quote:
Originally Posted by OstGot View Post
It is not easier nor simple at all: instead of using one timer you do this check every player's packet (as OnPlayerUpdate is calling for several synchronizations so that it has a high call frequency) that is just overkill. Moreover you should consider the states when this callback can be called: it is not called if a player in AFK and (what is the biggest problem for your implementation besides its higher load) if that player is dead or not spawned at the moment, for example, if he stays in class selection for a long time choosing the team


Yeah, I'm already have such ability
You're right.

Quote:
Originally Posted by OstGot View Post
Using timer the script has ability to notify a player when his mute time has expired (so that he won't need to guess it himself).
You used this to "explain" why you used timers instead of gettime.

Quote:
Originally Posted by OstGot View Post
Using timer the script has ability to notify a player when his mute time has expired
And... I just pointed out the fact that yes, you can also do it using gettime.
1sbedx is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[FilterScript] Cross Admin System V1.3 [updated] Anti Cheat(sscanf, dcmd,y_ini) and lots more ! No.1 Admin System CROSS_Hunter Filterscripts 9 20/07/2014 06:45 AM
[FilterScript] Cross Admin System V1.2 [updated] + Added IRC System + Anti Cheat(sscanf, dcmd,y_ini) No.1 Admin System CROSS_Hunter Filterscripts 21 02/01/2013 06:32 PM
[FilterScript] Cross Admin System V1.1 [updated] + Added V.I.P System(sscanf, dcmd,y_ini) No.1 Admin System CROSS_Hunter Filterscripts 8 10/09/2012 11:18 AM
[FilterScript] Cross Admin System V1.0 (sscanf, dcmd,y_ini) No.1 Admin System CROSS_Hunter Filterscripts 6 09/09/2012 12:01 PM


All times are GMT. The time now is 06:19 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.