Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
f1e6262
Auto Commands Update Try again (#129)
N1Ran Sep 10, 2019
47bf34f
Revert "Auto Commands Update Try again (#129)"
rexxar-tc Sep 10, 2019
8864a16
Promised nothing is forgotten this time (#130)
N1Ran Sep 10, 2019
8ac340f
Stop fixing shit that ain't broke N1
N1Ran Sep 11, 2019
3818e63
Merge pull request #131 from N1Ran/master
Jimmacle Sep 12, 2019
c94132c
Ignore projected grids
Jimmacle Sep 20, 2019
4b70415
Added a few more convenience commands (#139)
LordTylus Nov 26, 2019
70fdb93
Clean up voxel reset code; fix an edge case bug
rexxar-tc Feb 12, 2020
1f82b65
Fix !sandbox clean breaking factions when removing founder (#147)
LordTylus Apr 22, 2020
5308d5f
Added PCU conditions for the Cleanup command. (#148)
SKO85 Apr 22, 2020
96b4154
add '!admin give' command (#154)
Bishbash777 May 11, 2020
0ba711d
Add a visible notification for the player to indicate when they have …
Bishbash777 May 12, 2020
e2a99d9
Add a visible notification for the player to indicate when they have …
Bishbash777 May 12, 2020
2ebeb92
Some requested commands (#152)
N1Ran May 12, 2020
8a18411
Update GridModule.cs (#153)
dylloop May 12, 2020
1ffb255
Added HasOwnerType condition for Cleanup command (#151)
SKO85 May 12, 2020
1361914
Revert "Update GridModule.cs (#153)"
rexxar-tc May 12, 2020
5f87e89
Merge branch 'master' of https://github.com/Bishbash777/Essentials
Bishbash777 May 13, 2020
e8085f7
Add new economy interaction commands for both players and admins
Bishbash777 May 14, 2020
17edcf6
Add a client popup message to signal if they have send/recieved credits
Bishbash777 May 14, 2020
d1a5f60
Fix voxel reset counting
rexxar-tc May 15, 2020
470fc4d
Merge branch 'master' of https://github.com/Bishbash777/Essentials
Bishbash777 May 15, 2020
4f04344
Updated incorrect grammar
Bishbash777 May 15, 2020
90cebb6
Add new economy interaction commands for both players and admins (#158)
Bishbash777 May 15, 2020
e77f39d
fix sandbox clean removing faction reputations (#159)
N1Ran May 15, 2020
188fc31
Add "!identity clear" command to clear an identity of a specific play…
Bishbash777 Jun 9, 2020
c62a602
Merge branch 'master' of https://github.com/Bishbash777/Essentials
Bishbash777 Jun 9, 2020
8fd659c
Merge pull request #162 from Bishbash777/master
Bishbash777 Jun 9, 2020
2ac4390
Only turn off blocks which are enabled
Bishbash777 Jun 18, 2020
ad8734e
Merge pull request #163 from Bishbash777/master
Bishbash777 Jun 18, 2020
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add a visible notification for the player to indicate when they have …
…been given items (#155)
  • Loading branch information
Bishbash777 authored May 12, 2020
commit e2a99d9a91e9f3d40ca8d1db8a677cc96e0fefb6
9 changes: 7 additions & 2 deletions Essentials/Commands/AdminModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -301,25 +301,30 @@ public void ListMute()

[Command("give", "Insert an item with a specific quanity into a players inventory")]
[Permission(MyPromoteLevel.Admin)]
public void give(string playerName, string type, string item, int quantity) {
type = "MyObjectBuilder_" + type;
public void give(string playerName, string itemType, string item, int quantity) {
string type = "MyObjectBuilder_" + itemType;
VRage.Game.MyDefinitionId.TryParse(type, item, out VRage.Game.MyDefinitionId defID);

if (defID.ToString().Contains("null")) {
Context.Respond("Invalid item type");
return;
}

if (playerName != "*") {
var p = Utilities.GetPlayerByNameOrId(playerName);
if (p == null) {
Context.Respond("Player not found");
return;
}
Sandbox.Game.MyVisualScriptLogicProvider.AddToPlayersInventory(p.IdentityId, defID, quantity);
ModCommunication.SendMessageTo(new NotificationMessage($"You have been given {quantity} {item} {itemType}", 5000, "Blue"), p.SteamUserId);
}

else {
foreach (var p in MySession.Static.Players.GetOnlinePlayers()) {
var player = Utilities.GetPlayerByNameOrId(p.DisplayName);
Sandbox.Game.MyVisualScriptLogicProvider.AddToPlayersInventory(p.Identity.IdentityId, defID, quantity);
ModCommunication.SendMessageTo(new NotificationMessage($"You have been given {quantity} {item} {itemType}", 5000, "Blue"), player.SteamUserId);
}
}
Context.Respond("Item(s) given!");
Expand Down