Skip to content
This repository has been archived by the owner on Aug 13, 2024. It is now read-only.

Commit

Permalink
Merge pull request #47 from Nerus87/master
Browse files Browse the repository at this point in the history
Plugins' file names have been changed and the project has been cleaned of unnecessary files
  • Loading branch information
neatek committed May 24, 2020
2 parents 00a3321 + 9c98f1b commit 7b80547
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 14 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,9 @@ $RECYCLE.BIN/
Network Trash Folder
Temporary Items
.apdisk

# Plugin Logs
addons/sourcemod/logs/gamevoting

# Plugin *.smx
addons/sourcemod/plugins
4 changes: 0 additions & 4 deletions addons/sourcemod/logs/gamevoting/gv08-07.txt

This file was deleted.

Binary file removed addons/sourcemod/plugins/gv.smx
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <materialadmin>
#pragma semicolon 1
#pragma newdecls required
#define VERSION "1.9.2"
#define VERSION "1.9.3"
#define REASON_LEN 68
#define EVENT_PARAMS Handle event, const char[] name, bool dontBroadcast
#define VALID_PLAYER if(IsCorrectPlayer(client))
Expand Down Expand Up @@ -238,8 +238,8 @@ public void register_ConVars() {
AddCommandListener(OnClientCommands, "say");
AddCommandListener(OnClientCommands, "say_team");
// Configs&Translations
AutoExecConfig(true, "Gamevoting");
LoadTranslations("phrases.gv");
AutoExecConfig(true, "gamevoting");
LoadTranslations("gamevoting.phrases");
}


Expand Down Expand Up @@ -373,20 +373,22 @@ public int FindFreeSlot() {
return -1;
}

public bool isadmin(int client)
stock bool IsAdmin(int client)
{
if(GetUserAdmin(client) != INVALID_ADMIN_ID)
return true;

return false;
AdminId admin = GetUserAdmin(client);

if(admin == INVALID_ADMIN_ID)
return false;

return GetAdminFlag(admin, Admin_Generic);
}

public bool adminsonserver()
{
bool result = false;
for(int i=0; i < MaxClients; ++i) {
if(IsCorrectPlayer(i)) {
if(isadmin(i)) {
if(IsAdmin(i)) {
result = true;
break;
}
Expand All @@ -395,7 +397,6 @@ public bool adminsonserver()
return result;
}


public void ClearVotesForClient(int client, int type) {
VALID_PLAYER {
char auth[32];
Expand Down

0 comments on commit 7b80547

Please sign in to comment.