• Need help with forceswap.lua
    3 replies, posted
Hi i need to add a ulx_forceswap command to my gmod jailbreak server and i have tried using this .lua but it does not want to work. I tried adding it into the util.lua and also tried creating its own .lua file in the sh. The ulx_forceswap come up in my ulx command gui but when i click the swap player button nothing happens and also when i type the command in console. Can anyone help me please? Thanks [CODE] function ulx.forceswap( calling_ply, target_ply ) if target_ply:GetJBTeam() == TEAM_PRISONER then target_ply:Kill() target_ply:SetJBTeam(TEAM_GUARD) elseif target_ply:GetJBTeam() == TEAM_GUARD then target_ply:Kill() target_ply:SetJBTeam(TEAM_PRISONER) end ulx.fancyLogAdmin( calling_ply, "#A has forced #T to switch teams.", target_ply ) end local forceswap = ulx.command( CATEGORY_NAME, "ulx forceswap", ulx.forceswap, "!forceswap" ) forceswap:defaultAccess( ULib.ACCESS_ADMIN ) forceswap:addParam{ type=ULib.cmds.PlayerArg } forceswap:help( "Swaps a players team" )[/CODE]
bumpppp
bummmmpppp help please
-snip- cloud flare fucked up my code six times
Sorry, you need to Log In to post a reply to this thread.