Advertisement
Rochet2

Face command

Jul 8th, 2012
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.44 KB | None | 0 0
  1. local command = ".face"
  2. local function ChangeOrientationCommand(event, pPlayer, Message, Type, Language, Misc)
  3.     if(pPlayer:CanUseCommand("o")) then
  4.         local CMD, ARG = Message:lower():match("^[.!#](%a+) (%d)$")
  5.         if(CMD == command and ARG and ARG ~= '') then
  6.             pPlayer:SetPosition(pPlayer:GetX(), pPlayer:GetY(), pPlayer:GetZ(), (tonumber(ARG)*(math.pi/2)))
  7.             return false
  8.         end
  9.     end
  10. end
  11.  
  12. RegisterServerHook(16, ChangeOrientationCommand)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement