Ulysses

Ulysses Stuff => Releases => Ulysses Release Archives => Topic started by: Neico on January 20, 2007, 01:22:05 PM

Title: PLG (ULib & Stand Alone Version)
Post by: Neico on January 20, 2007, 01:22:05 PM
Current Version: v1.0.2
Download: http://gmod.srcds.neic0.de/lua/ulx/modules/playergrab.lua (http://gmod.srcds.neic0.de/lua/ulx/modules/playergrab.lua) (Just right click on it and save it ;))

Changelog:
Quote
Quote
V 1.0.3 (Coming soon)
  • [Add] Freezing Player (and sure defreeezing :D)
  • [Add] PLG_Version to see what Version are currently running
  • [Add] Noclip Save so if you are in Noclip before you are again in Noclip :D
  • [MainChange] Changed Name because its not anymore just a modify its now a own script :D
  • [Change] Changed playergrab to PLG_Allow
  • [Change] PLG_Allow 1 to PLG_Allow <sadmin/admin/op/public/off> ( for SuperAdmin PLG_Allow sadmin; for Admin PLG_Allow admin; for Operator PLG_Allow op; for public PLG_Allow public; for off PLG_Allow off )
  • [Change] Most of the Code
  • [Fix] I really dont know if its fix the bug from Avien but i added to the playermove a froze so they cant move while moving :D
Quote
V 1.0.2
  • [Fix]Forgot to add the if user is user group line (that only an Superadmin can use the script how can i forget that its a main part of this script omg  ::)) :o
Quote
V 1.0.1
  • [Fix]Fixed the Bug that when you grab anything and you are in Noclip that you are going out of Noclip :o
  • [Fix]Fixed that the Player can still go out of the jail with this Script
  • [Change] Changed this Post here to a better style to make it better readable ;D
Quote
V 1.0
  • Release of the Modified Version :o

Features:
Quote
  • Can Grab a Player and move him to other places
  • Can Drop him and let him walk again (very good if you dont want that someone use Noclip :o)
  • And sure only ULib SuperAdmins (only works with ULib ;D im going to make it more felxibility with that like if no ULib use Standard Commands) Can use this Script

Bugs:
Quote
http://bugs.yet-another-server.com <----- Reports please to it ;)

Installation&Use:
Quote
  • First copy and paste it into a file that you call playergrab.lua } or just download it link is on the top of this post
  • Second put it into the ULib/modules folder and Start Gmod
  • And at last use it with physguning a player and to disable and reenable it write in the Console: playergrab <1 or 0>

ToDo:

Quote
  • Make A alternative Version without ULib.( coming ca. v1.0.4 )
  • Adding some other Commands
  • Adding some things what im not say at the moment  :P

Credits:

Quote
haloshadow: Who orginaly made a simple Version of it but now its different from it anyways thanks for the idea and that :D
Thanks to Megiddo who helped me a little to understand how ULib and ULX works^^".
and Thanks to all who supporting me and helping me with bug reports.

Test it and tell me if its work i cant test it because i cant host a server at the moment to test it to player  :-[
Enjoy  :o:
Code: [Select]
//Script by haloshadow all rights reserved to him. Script modified and adapted by [YaS] Neico™
if (!SERVER) then return end
function ULib.cc_playergrab(ply, target)
if util.tobool( GetConVarNumber( "playergrab" ) ) then
if ply:IsUserGroup( ULib.ACCESS_SUPERADMIN ) then
if not target:GetTable().jail then
if target:IsPlayer() then
target:SetMoveType(MOVETYPE_NOCLIP);
return true;
end
end
end
end
end

function ULib.cc_playerdrop(ply, target)
if target:IsPlayer() then
target:SetMoveType(MOVETYPE_WALK);
return true;
end
end
hook.Add("PhysgunPickup", "Playergrab", ULib.cc_playergrab);
hook.Add("PhysgunDrop" , "Playerdrop", ULib.cc_playerdrop);
ULib.convar( "playergrab", "1", "<0/1> - Turns off/on Playergrab", ULib.ACCESS_SUPERADMIN )

Title: Re: Playergrab modified
Post by: Mank on January 22, 2007, 03:41:45 PM
I'm sure I've used a script like this before.  Nice work though.
Title: Re: Playergrab modified
Post by: Terminal58 on January 22, 2007, 03:52:50 PM
How about you use get move type (http://www.garrysmod.com/wiki/?title=Entity.GetMoveType) so if I am in noclip I'll stay in noclip.
Title: Re: Playergrab modified
Post by: JamminR on January 22, 2007, 04:01:44 PM
I'm sure I've used a script like this before.  Nice work though.

He did say all he did was modify it for ULib access. :)
Title: Re: Playergrab modified
Post by: Aceo on January 23, 2007, 05:22:26 AM
Neico don't bother with the private message i sent its just i worked it out  :P i am learning lua myself and i am making a swep soon enough  ;D
Title: Re: Playergrab modified
Post by: Mank on January 24, 2007, 03:13:38 PM
He did say all he did was modify it for ULib access. :)


xD, didn't see that.
Title: Re: Playergrab modified
Post by: Neico on January 26, 2007, 11:40:48 PM
with the target: the script making only effect on the target (in that script the player XDD thats why target:IsPlayer) by the way if you have ideas what i can include in it say it im writing it in the ToDo ;)
Title: Re: Playergrab modified
Post by: Avien on March 21, 2007, 05:47:35 PM
Did the upcoming version die off?  Or did the new gmod update freeze your progress?


I did notice that when you pick someone up they seem to squirm a lot and tend to lose health if you hold them to close to the ground.  Anyway to fix that?  Like have them be frozen while being moved so they can't try to fight you?
Title: Re: Playergrab modified
Post by: Neico on March 30, 2007, 04:40:02 PM
im already at the new Version and thanks for finding that bug im going to look what i can do and if you want to see the current version at the moment i have a server On it begins with [YaS#2] the rest of the ServerName is dynamic as well the player slots so dont be scared :D see ya ;)

and to your problem i made a froze while moving but i cant see the bug :S anyways they frozen if the get grabed
Title: Re: PLG (ULib & Stand Alone Version)
Post by: Avien on April 05, 2007, 05:01:09 PM
Anymore news?
Title: Re: PLG (ULib & Stand Alone Version)
Post by: Neico on April 13, 2007, 03:31:37 PM
erm yes i made some things but im currently working on fixing that with freezing/defreezing it dont want to work as i will :S after that i think its finished but im working at the moment not many in lua because i have some other things to do RL etc. and i have a other Projekt XLib that will be only works at the YaS Server so its possible that the updates for this can take some time :D but dont worry ill release it soon

btw. i need some Testers because the Bots are shaking to many XD and i found some bugs as player was on so its better to test it at player :D

btw.2 i added to the Bug Thing the link to the Bug Report System that i installed ;) http://bugs.yet-another-server.com
Title: Re: PLG (ULib & Stand Alone Version)
Post by: HaloShadoW on April 26, 2007, 11:46:11 AM
If you wanted the state of the player movetype to be restored.  Just to a getmovetype on the grab, then change there movetype to none.  On the release then have the movetype to go back to the previous.
This would require a table too.
Title: Re: PLG (ULib & Stand Alone Version)
Post by: Neico on May 29, 2007, 11:14:54 AM
do my stupidness i have sometimes  ::) i deleted today the new version of the playergrab at a gmod cleanup i need to rewrite it but at the moment im too busy anyway to work on it and i hope that that:

Quote
v3.10 - *(05/05/07)*
   * [ADD] Admins with slap access can move players now.

is enaugh for the moment sorry about that  :-\
Title: Re: PLG (ULib & Stand Alone Version)
Post by: tssge on February 15, 2010, 06:09:59 AM
I'm sorry if i gravedigged, but i think this is broken or something... I really want to physgun ppl on my server :P

When i run this script i get:


] lua_openscript ulx\modules\playergrab.lua
Running script ulx\modules\playergrab.lua...
ulx\modules\playergrab.lua:24: attempt to call field 'convar' (a nil value)
Title: Re: PLG (ULib & Stand Alone Version)
Post by: JamminR on February 15, 2010, 06:41:21 AM
Requires ULib. What version of ULib are you running?
You're also running this on client.. you'd need to run it on server for it to work at all.

It's very possible, since this was last modified over three years ago, that the many changes to Gmod and even ULib itself have made it obsolete.
Title: Re: PLG (ULib & Stand Alone Version)
Post by: tssge on February 15, 2010, 06:43:22 AM
Well if i don't get it working (yes i have ulib, gonna test in on server tho) is there anything which would replace this ?
Title: Re: PLG (ULib & Stand Alone Version)
Post by: JamminR on February 15, 2010, 07:40:37 AM
No other 'stand alone' I know of... ULX has it's own.
The author of this one just wrote it because he didn't use ULX, but liked ULib group control (I think that's why)
Title: Re: PLG (ULib & Stand Alone Version)
Post by: vader0146 on February 15, 2010, 07:58:33 AM
http://wiki.garrysmod.com/?title=Gamemode.PhysgunPickup
Title: Re: PLG (ULib & Stand Alone Version)
Post by: Megiddo on February 15, 2010, 07:59:29 AM
I think this was written before ULX had a player grab, JamminR.
Title: Re: PLG (ULib & Stand Alone Version)
Post by: tssge on February 15, 2010, 08:10:44 AM
Oh yes, i realized it too while playing on my server :D Well thanks anyway. And sorry for the gravedigging.