Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. local PLUGIN = {}
  2. PLUGIN.Name = "Spawn"
  3. PLUGIN.Desc = "Spawn player(s) on your server."
  4. PLUGIN.Author = "AC2"
  5. PLUGIN.CMD = "da_spawn"
  6. PLUGIN.Chat = "spawn"
  7. PLUGIN.Menu = true
  8.  
  9. local function Spawn( pl, cmd, args )
  10.  
  11. if !IsValid( pl ) or args[1] == nil then return end
  12. if !pl:IsAdmin( ) then pl:ChatPrint("[ADMIN] You don't have access to this command.") return end
  13.  
  14. local Target = GetPlayerID( tonumber( args[1] ) )
  15. if !Target then pl:ChatPrint("[ADMIN] Player was not found.") return end
  16.  
  17. Target:SetTeam( 2 )
  18. Target:Spawn( )
  19. Target:SetMoveType( MOVETYPE_WALK )
  20. Target:ChatPrint("You have been spawned by "..pl:Name( )..".")
  21. end
  22. concommand.Add(PLUGIN.CMD, Spawn )
  23.  
  24. StorePlugin( PLUGIN )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement