mirror of
https://github.com/Jackzmc/sourcemod-plugins.git
synced 2025-05-06 20:13:21 +00:00
Change permissions for commands
This commit is contained in:
parent
b4368b45f4
commit
14707a2098
4 changed files with 9 additions and 7 deletions
Binary file not shown.
Binary file not shown.
|
@ -146,9 +146,9 @@ public void OnPluginStart() {
|
|||
RegAdminCmd("sm_model", Command_SetClientModel, ADMFLAG_KICK);
|
||||
RegAdminCmd("sm_surv", Cmd_SetSurvivor, ADMFLAG_KICK);
|
||||
RegAdminCmd("sm_respawn_all", Command_RespawnAll, ADMFLAG_CHEATS, "Makes all dead players respawn in a closet");
|
||||
RegAdminCmd("sm_playsound", Command_PlaySound, ADMFLAG_CHEATS, "Plays a gamesound for player");
|
||||
RegAdminCmd("sm_stopsound", Command_StopSound, ADMFLAG_CHEATS, "Stops the last played gamesound for player");
|
||||
RegAdminCmd("sm_swap", Command_SwapPlayer, ADMFLAG_CHEATS, "Swarms two player's locations");
|
||||
RegAdminCmd("sm_playsound", Command_PlaySound, ADMFLAG_KICK, "Plays a gamesound for player");
|
||||
RegAdminCmd("sm_stopsound", Command_StopSound, ADMFLAG_GENERIC, "Stops the last played gamesound for player");
|
||||
RegAdminCmd("sm_swap", Command_SwapPlayer, ADMFLAG_KICK, "Swarms two player's locations");
|
||||
RegAdminCmd("sm_perm", Command_SetServerPermissions, ADMFLAG_KICK, "Sets the server's permissions.");
|
||||
RegAdminCmd("sm_perms", Command_SetServerPermissions, ADMFLAG_KICK, "Sets the server's permissions.");
|
||||
RegAdminCmd("sm_permissions", Command_SetServerPermissions, ADMFLAG_KICK, "Sets the server's permissions.");
|
||||
|
@ -304,7 +304,7 @@ public Action Command_SwapPlayer(int client, int args) {
|
|||
client,
|
||||
target_list,
|
||||
1,
|
||||
COMMAND_FILTER_CONNECTED,
|
||||
COMMAND_FILTER_CONNECTED | COMMAND_FILTER_NO_IMMUNITY,
|
||||
target_name,
|
||||
sizeof(target_name),
|
||||
tn_is_ml)) <= 0)
|
||||
|
@ -321,7 +321,7 @@ public Action Command_SwapPlayer(int client, int args) {
|
|||
client,
|
||||
target_list,
|
||||
1,
|
||||
COMMAND_FILTER_CONNECTED,
|
||||
COMMAND_FILTER_CONNECTED | COMMAND_FILTER_NO_IMMUNITY,
|
||||
target_name,
|
||||
sizeof(target_name),
|
||||
tn_is_ml)) <= 0)
|
||||
|
@ -649,7 +649,7 @@ public void OnClientPutInServer(int client) {
|
|||
public void OnClientDisconnect(int client) {
|
||||
isHighPingIdle[client] = false;
|
||||
iHighPingCount[client] = 0;
|
||||
if(IsClientConnected(client) && IsClientInGame(client) && botDropMeleeWeapon[client] > -1) {
|
||||
if(IsClientConnected(client) && IsClientInGame(client) && botDropMeleeWeapon[client] > -1 && IsValidEntity(botDropMeleeWeapon[client])) {
|
||||
float pos[3];
|
||||
GetClientAbsOrigin(client, pos);
|
||||
TeleportEntity(botDropMeleeWeapon[client], pos, NULL_VECTOR, NULL_VECTOR);
|
||||
|
@ -692,6 +692,8 @@ public void OnMapStart() {
|
|||
PrecacheSound("custom/xen_teleport.mp3");
|
||||
AddFileToDownloadsTable("sound/custom/mariokartmusic.mp3");
|
||||
PrecacheSound("custom/mariokartmusic.mp3");
|
||||
AddFileToDownloadsTable("sound/custom/spookyscaryskeletons.mp3");
|
||||
PrecacheSound("custom/spookyscaryskeletons.mp3");
|
||||
|
||||
HookEntityOutput("info_changelevel", "OnStartTouch", EntityOutput_OnStartTouchSaferoom);
|
||||
HookEntityOutput("trigger_changelevel", "OnStartTouch", EntityOutput_OnStartTouchSaferoom);
|
||||
|
|
|
@ -195,7 +195,7 @@ bool ConnectDB() {
|
|||
public void Event_FirstSpawn(Event event, const char[] name, bool dontBroadcast) {
|
||||
int client = GetClientOfUserId(event.GetInt("userid"));
|
||||
if(client > 0 && client <= MaxClients && !IsFakeClient(client)) {
|
||||
char auth[32];
|
||||
static char auth[32];
|
||||
GetClientAuthId(client, AuthId_Steam2, auth, sizeof(auth));
|
||||
DB.Format(query, sizeof(query), "SELECT notes.content, stats_users.last_alias FROM `notes` JOIN stats_users ON markedBy = stats_users.steamid WHERE notes.`steamid` = '%s'", auth);
|
||||
DB.Query(DB_FindNotes, query, GetClientUserId(client));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue