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

.inc, functions that allready exists


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Obbin
Senior Member
Join Date: Mar 2005
Location: 192.168.1.3
Old 08-31-2006 , 08:22   .inc, functions that allready exists
Reply With Quote #1

Okay here goes!

Lets say I want to modify the input of server_print when my script uses it.
It has to be in the .inc file and may not have a different name!

Eh a bit messy but, example:

script.sma
Code:
#include <amxmodx> #include <myinc> myfunc() {     server_print("Hello") }

myinc.inc
Code:
stock server_print(input) {     if( input == "hello" )     {         input = "hello pm"     }     server_print( input ) //Now this should call the original server_print function! }

Now I want to pass the modified server_print string to the original server_print function, how?

Before you ask, I need this to make certain amxmod scripts compile without modification ;)
__________________
Sig(h)!

Last edited by Obbin; 08-31-2006 at 12:54.
Obbin is offline
BAILOPAN
Join Date: Jan 2004
Old 08-31-2006 , 15:21   Re: .inc, functions that allready exists
Reply With Quote #2

You cannot overload functions. Just a note your logic doesn't make much sense there anyway, server_print takes in a formatted string, you're passing it a number.

If you want to make AMX Mod scripts compile without modification, and are willing to do some testing/scripting, contact me. We have an internal project going on that's gonna be distributed to beta testers soon and you might be interested.
__________________
egg

Last edited by BAILOPAN; 08-31-2006 at 15:23.
BAILOPAN is offline
Dancing Bread
BANNED
Join Date: Aug 2006
Location: 714 cuz
Old 08-31-2006 , 16:24   Re: .inc, functions that allready exists
Reply With Quote #3

whats going here ? beta testing what? cool im down
Dancing Bread 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 19:31.


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