Skip to content

Commit

Permalink
Release 1.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dronelektron committed Dec 31, 2022
2 parents 6ee83c9 + fda1fda commit a40bbab
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion scripting/gravity-gun.sp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public Plugin myinfo = {
name = "Gravity gun",
author = "Dron-elektron",
description = "Allows you to grab, move and throw players",
version = "1.5.0",
version = "1.5.1",
url = "https://github.com/dronelektron/gravity-gun"
};

Expand Down
10 changes: 8 additions & 2 deletions scripting/modules/use-case.sp
Original file line number Diff line number Diff line change
Expand Up @@ -221,17 +221,23 @@ void UseCase_RestoreClientSpeedLimit(int client) {
}

void UseCase_LoadClientSettings(int client) {
if (UseCase_IsRealClient(client)) {
if (UseCase_IsAdmin(client) && UseCase_IsRealClient(client)) {
SettingsStorage_Apply(SettingsStorage_LoadClient, client);
}
}

void UseCase_SaveClientSettings(int client) {
if (UseCase_IsRealClient(client)) {
if (UseCase_IsAdmin(client) && UseCase_IsRealClient(client)) {
SettingsStorage_Apply(SettingsStorage_SaveClient, client);
}
}

bool UseCase_IsAdmin(int client) {
AdminId id = GetUserAdmin(client);

return id != INVALID_ADMIN_ID && GetAdminFlag(id, Admin_Generic, Access_Effective);
}

bool UseCase_IsRealClient(int client) {
return !IsFakeClient(client) && !IsClientSourceTV(client);
}

0 comments on commit a40bbab

Please sign in to comment.