SHOW:
|
|
- or go back to the newest paste.
| 1 | COMMAND = openAura.command:New(); | |
| 2 | COMMAND.tip = "Loko up a person's information!"; | |
| 3 | COMMAND.text = "<string Name>"; | |
| 4 | COMMAND.access = "o"; | |
| 5 | COMMAND.arguments = 1; | |
| 6 | ||
| 7 | function COMMAND:OnRun(player, arguments) | |
| 8 | if not args[1] then | |
| 9 | ply:PrintMessage(2, string.format(LANGUAGE.invalid_x, "argument", "")) | |
| 10 | return | |
| 11 | end; | |
| 12 | - | local P = openAura.player:Get(args[1]) |
| 12 | + | local P = openAura.player:Get( arguments[1] ) |
| 13 | if not ValidEntity(P) then | |
| 14 | if ply:EntIndex() ~= 0 then | |
| 15 | ply:PrintMessage(2, string.format(LANGUAGE.could_not_find, "player: "..tostring(args[1]))) | |
| 16 | else | |
| 17 | print(string.format(LANGUAGE.could_not_find, "player: "..tostring(args[1]))) | |
| 18 | end; | |
| 19 | return | |
| 20 | end; | |
| 21 | if ply:EntIndex() ~= 0 then | |
| 22 | ply:PrintMessage(2, "Nick: ".. P:Nick()) | |
| 23 | ply:PrintMessage(2, "Steam name: "..P:SteamName()) | |
| 24 | ply:PrintMessage(2, "Steam ID: "..P:SteamID()) | |
| 25 | else | |
| 26 | print("Nick: ".. P:Nick())
| |
| 27 | print("Steam name: "..P:SteamName())
| |
| 28 | print("Steam ID: "..P:SteamID())
| |
| 29 | end; | |
| 30 | end; | |
| 31 | openAura.command:Register(COMMAND, "Lookup"); |