Raised This Month: $51 Target: $400
 12% 

[Help] Spawn a cs1.6 hostage with minimal code.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
metal_upa
Senior Member
Join Date: Jun 2016
Old 01-15-2017 , 04:28   [Help] Spawn a cs1.6 hostage with minimal code.
Reply With Quote #1

I found this code https://forums.alliedmods.net/showpo...0&postcount=11
but the code is a bit long.

Any shortest code that i can use?
metal_upa is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 01-15-2017 , 05:05   Re: [Help] Spawn a cs1.6 hostage with minimal code.
Reply With Quote #2

Why does the length of the code matter? Necessary is necessary.
__________________
Black Rose is offline
metal_upa
Senior Member
Join Date: Jun 2016
Old 01-15-2017 , 11:11   Re: [Help] Spawn a cs1.6 hostage with minimal code.
Reply With Quote #3

Quote:
Originally Posted by Black Rose View Post
Why does the length of the code matter? Necessary is necessary.
You are not helping me. It must be an efficient way for this.
Why would you choose a long road if there were a shortcut nearby.
metal_upa is offline
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 01-15-2017 , 13:45   Re: [Help] Spawn a cs1.6 hostage with minimal code.
Reply With Quote #4

Quote:
Originally Posted by metal_upa View Post
if there were a shortcut nearby.
because it doesn't exist something like that.

Just add emp code in a stock and use when you want.
__________________
Project: Among Us
Craxor is offline
Send a message via ICQ to Craxor
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 01-15-2017 , 14:03   Re: [Help] Spawn a cs1.6 hostage with minimal code.
Reply With Quote #5

Quote:
Originally Posted by metal_upa View Post
You are not helping me. It must be an efficient way for this.
Why would you choose a long road if there were a shortcut nearby.
See by yourself here how game creates a hostage: https://github.com/s1lentq/ReGameDLL...stage.cpp#L176

You have two options:
-redo that code(which is what emp mostly did, with few differences)
-I can show you how to call that function with orpheu/okapi, so you would have 3 or 4 lines of code, but I'm almost sure you'll say you don't want to use this modules.
__________________

Last edited by HamletEagle; 01-15-2017 at 14:23.
HamletEagle is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 01-15-2017 , 17:03   Re: [Help] Spawn a cs1.6 hostage with minimal code.
Reply With Quote #6

Quote:
Originally Posted by metal_upa View Post
You are not helping me. It must be an efficient way for this.
Why would you choose a long road if there were a shortcut nearby.
I am helping you to avoid making a beginner mistake.

This is very efficient. We're talking milliseconds, if even that. If Emp` wrote it I trust it to be good. You could time it using tickcount() if you want to.

Number of lines has very little to do with efficiency. If you read the lines you see that they all do something that is required. Of course you can remove lines and increase speed but you will also lose something in terms of function whenever doing so. As long as you don't call it at every server frame it really doesn't matter.
__________________
Black Rose is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 01-15-2017 , 17:08   Re: [Help] Spawn a cs1.6 hostage with minimal code.
Reply With Quote #7

I don't got it. Whats the problem with code's size? If it works, who cares?
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 01-15-2017 at 17:08.
EFFx is offline
metal_upa
Senior Member
Join Date: Jun 2016
Old 01-15-2017 , 19:53   Re: [Help] Spawn a cs1.6 hostage with minimal code.
Reply With Quote #8

Quote:
Originally Posted by HamletEagle View Post
See by yourself here how game creates a hostage: https://github.com/s1lentq/ReGameDLL...stage.cpp#L176

You have two options:
-redo that code(which is what emp mostly did, with few differences)
-I can show you how to call that function with orpheu/okapi, so you would have 3 or 4 lines of code, but I'm almost sure you'll say you don't want to use this modules.
I'm not sure memory patcher module work in ReGameDLL_CS.
Ok show me the method that use the memory pather module, please don't orpheu, i don't want a complex module. Show me the okapi method.

Quote:
Originally Posted by EFFx View Post
I don't got it. Whats the problem with code's size? If it works, who cares?
That is the problem, the long code. It would be better if i can just call 1 function directly from the gamedll. So i don't need to rewrite the whole hostage spawn code.

Last edited by metal_upa; 01-15-2017 at 19:55.
metal_upa is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 01-16-2017 , 08:10   Re: [Help] Spawn a cs1.6 hostage with minimal code.
Reply With Quote #9

okapi and orpheu are the same, the difference is that okapi does not use configuration files. If you use regamedll the signatures from default won't work.

Just redo that code and you are good.
__________________

Last edited by HamletEagle; 01-16-2017 at 08:10.
HamletEagle is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 01-16-2017 , 08:30   Re: [Help] Spawn a cs1.6 hostage with minimal code.
Reply With Quote #10

Quote:
Originally Posted by metal_upa View Post
I found this code https://forums.alliedmods.net/showpo...0&postcount=11
but the code is a bit long.

Any shortest code that i can use?
Seriously ? It's just like 20-25 lines of code.
__________________
edon1337 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:29.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode