How about es.fire/es.give ?

Discuss API design here.
User avatar
BackRaw
Senior Member
Posts: 537
Joined: Sun Jul 15, 2012 1:46 am
Location: Germany
Contact:

How about es.fire/es.give ?

Postby BackRaw » Tue Jul 17, 2012 10:45 pm

Hey guys,

maybe this is way too early to ask, but since we talk about API design here, I'd like to ask if someone's already came up with something similar to the good ol' es.fire/es.give commands.

  • Decorators?
  • Just like Mattie implemented them to ES?
  • Something else?
Thanks :D

EDIT: Decorators aren't the case I guess... haha
Absolute
Junior Member
Posts: 13
Joined: Sat Jul 07, 2012 6:48 pm

Postby Absolute » Wed Jul 18, 2012 4:02 am

I think it will be more like SM does it.
User avatar
BackRaw
Senior Member
Posts: 537
Joined: Sun Jul 15, 2012 1:46 am
Location: Germany
Contact:

Postby BackRaw » Wed Jul 18, 2012 4:11 am

And how does SM do it? :D
User avatar
Monday
Administrator
Posts: 98
Joined: Thu Jul 12, 2012 4:15 am

Postby Monday » Wed Jul 18, 2012 5:56 am

I know one thing we have discussed is making sp.give (or whatever it ends up being) return an index for the item it created. We have also talked about adding sp.fire (or something) but I don't know if either one has been done yet. (Been sick for a few days :( )
User avatar
BackRaw
Senior Member
Posts: 537
Joined: Sun Jul 15, 2012 1:46 am
Location: Germany
Contact:

Postby BackRaw » Fri Aug 17, 2012 5:49 pm

Monday wrote:I know one thing we have discussed is making sp.give (or whatever it ends up being) return an index for the item it created. We have also talked about adding sp.fire (or something) but I don't know if either one has been done yet. (Been sick for a few days :( )

Alright cool, yeah returning something is always good... always.
User avatar
Monday
Administrator
Posts: 98
Joined: Thu Jul 12, 2012 4:15 am

Postby Monday » Wed Aug 29, 2012 8:52 am

You might be able to "give" by turning on sv_cheats 1, using the cheat command, and then turning sv_cheats back to 0 until we get a more elegant solution. I don't have any ideas for fire yet..
User avatar
BackRaw
Senior Member
Posts: 537
Joined: Sun Jul 15, 2012 1:46 am
Location: Germany
Contact:

Postby BackRaw » Wed Aug 29, 2012 11:38 am

Monday wrote:You might be able to "give" by turning on sv_cheats 1, using the cheat command, and then turning sv_cheats back to 0 until we get a more elegant solution. I don't have any ideas for fire yet..


We're in no hurry ;)
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Postby satoon101 » Wed Aug 29, 2012 1:13 pm

I think we plan on having dynamic function calling, like SPE, so "give" will probably be GiveNamedItem.

Satoon
User avatar
Monday
Administrator
Posts: 98
Joined: Thu Jul 12, 2012 4:15 am

Postby Monday » Wed Aug 29, 2012 3:44 pm

BackRaw wrote:We're in no hurry ;)


I believe that is how ES does it, it just happens on the cpp side.
Absolute
Junior Member
Posts: 13
Joined: Sat Jul 07, 2012 6:48 pm

Postby Absolute » Wed Aug 29, 2012 5:23 pm

Monday wrote:You might be able to "give" by turning on sv_cheats 1, using the cheat command, and then turning sv_cheats back to 0 until we get a more elegant solution. I don't have any ideas for fire yet..


ent_fire? or did they remove that command in csgo?
User avatar
Monday
Administrator
Posts: 98
Joined: Thu Jul 12, 2012 4:15 am

Postby Monday » Wed Aug 29, 2012 5:51 pm

Absolute wrote:ent_fire? or did they remove that command in csgo?


Looks like that works too!

Code: Select all

ent_fire
Can't use cheat command ent_fire in multiplayer, unless the server has sv_cheats set to 1.
User avatar
BackRaw
Senior Member
Posts: 537
Joined: Sun Jul 15, 2012 1:46 am
Location: Germany
Contact:

Postby BackRaw » Wed Aug 29, 2012 6:47 pm

I'd say, cheating (sv_cheats 1/command/sv_cheats 0) is OK when there is NO other way around that, only then, so I'd rather wait for SP to have the feature :)
your-name-here
Developer
Posts: 168
Joined: Sat Jul 07, 2012 1:58 am

Postby your-name-here » Wed Aug 29, 2012 7:15 pm

I am almost certain you can remove the cheat flags from ent_fire via the concommand class. Someone should try it and post back (busy with stuff currently). I think we have FindCommand for ICVar (not sure).
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Postby satoon101 » Thu Aug 30, 2012 2:40 am

I would imagine that would work, but that creates more issues than it solves. I agree that skirting sv_cheats is something that should be done almost never, and I especially do not think anything of that sort belongs "in" the plugin itself. If a script does it, that is fine, but we want to avoid such methods at all costs.

Satoon
User avatar
Monday
Administrator
Posts: 98
Joined: Thu Jul 12, 2012 4:15 am

Postby Monday » Thu Aug 30, 2012 2:46 am

satoon101 wrote:I would imagine that would work, but that creates more issues than it solves. I agree that skirting sv_cheats is something that should be done almost never, and I especially do not think anything of that sort belongs "in" the plugin itself. If a script does it, that is fine, but we want to avoid such methods at all costs.

Satoon


I completely agree, I suggested the cheat work around until we provide a more elegant solution for such things.

Return to “API Design”

Who is online

Users browsing this forum: No registered users and 18 guests