Help please *MODDING DEAGLE FOR ADMIN ONLY*

Have a question about modding, modelling or skinning? Have a tutorial to post? Post here!

Moderator: Core Staff

Post Reply
JORDYY
CJ Wannabe
CJ Wannabe
Posts: 3
Joined: April 3rd, 2011, 1:01 am
Gamertag: xFusR
PSN ID: zFusR

Help please *MODDING DEAGLE FOR ADMIN ONLY*

Post by JORDYY » April 3rd, 2011, 1:07 am

Hew im NOT using the CJ mod my team and I have made a sniper lobby but we want to disable the desert eagle for everyone but make it so admins can have it I know its in the CJ mod but i need it in a different mod! :)
I hope somebody can help,
Thanks in advance.
JORDYY

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: Help please *MODDING DEAGLE FOR ADMIN ONLY*

Post by Drofder2004 » April 3rd, 2011, 9:07 am

1. GetGUIDs of all team
2. Save GUID in a DVAR
3. Createa function to parse the DVAR and create an array of GUIDs
4. When a player connects, check their GUID and compare against array
5. Give gun based on true/false.

Thats the concept for you, but I am not writing the full code.
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

Moustache
CJ Worshipper
CJ Worshipper
Posts: 476
Joined: August 18th, 2008, 9:30 am

Re: Help please *MODDING DEAGLE FOR ADMIN ONLY*

Post by Moustache » April 3rd, 2011, 10:37 am

Isn't it easier just to disable the deagle and only give it to admins?

When a player connects you should check if his guid is in array of the dvar admin_guids. Then set self.admin = true; And place something in the class.gsc if self.admin then give deagle.

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Re: Help please *MODDING DEAGLE FOR ADMIN ONLY*

Post by Drofder2004 » April 3rd, 2011, 11:51 am

Drofder2004 wrote:1. GetGUIDs of all team
2. Save GUID in a DVAR
3. Createa function to parse the DVAR and create an array of GUIDs
Moustache wrote:When a player connects you should check if his guid is in array of the dvar admin_guids.
Drofder2004 wrote:4. When a player connects, check their GUID and compare against array
5. Give gun based on true/false.
Moustache wrote:Then set self.admin = true; And place something in the class.gsc if self.admin then give deagle.
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

Moustache
CJ Worshipper
CJ Worshipper
Posts: 476
Joined: August 18th, 2008, 9:30 am

Re: Help please *MODDING DEAGLE FOR ADMIN ONLY*

Post by Moustache » April 3rd, 2011, 12:00 pm

/Sunday-morning-fail
I misunderstood line 1 :oops:

JORDYY
CJ Wannabe
CJ Wannabe
Posts: 3
Joined: April 3rd, 2011, 1:01 am
Gamertag: xFusR
PSN ID: zFusR

Re: Help please *MODDING DEAGLE FOR ADMIN ONLY*

Post by JORDYY » April 3rd, 2011, 12:49 pm

Thanks guys!

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests