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

AMXx 1.50 Scripting Changes


Post New Thread Reply   
 
Thread Tools Display Modes
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 07-25-2005 , 03:23  
Reply With Quote #11

Hmm, "Pawn", odd name.

Can't wait for this new menu system! ;)

Now I can say I'm a Pawn Scriptor.
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 07-25-2005 , 03:35  
Reply With Quote #12

Damn do you know what this means for me and xeroblood
Think....UAIO has to be redone....or stay depreciated :(
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
BAILOPAN
Join Date: Jan 2004
Old 07-25-2005 , 03:48  
Reply With Quote #13

Tell me specifically what you use that's deprecated and I'll tell you whether you're actually affected.

Most likely you're not, I try very hard to maintain backward compatibility. I have a list of all the natives every script uses and how often every native is used...

(the five most popular are client_print, format, write_byte, get_cvar_num, and set_task)

I've updated my show_menu notice because "deprecated" was a little harsh. It's still there and works fine, just the new menu builder system is far easier to use.
__________________
egg
BAILOPAN is offline
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 07-25-2005 , 04:05  
Reply With Quote #14

If we can still use show_menu then we will leave it but its still depricated...
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
Isobold
Veteran Member
Join Date: Mar 2004
Old 07-25-2005 , 14:10  
Reply With Quote #15

Can't wait for it to release as I'm working right now on a multipage-menu and I just can't get this **&%§$&)&(/)&%** menu to work ... ;)
Isobold is offline
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 07-26-2005 , 23:48  
Reply With Quote #16

i think what bail is trying to say is ur menu will still work but he recommends that u use the new menu system
Freecode is offline
BAILOPAN
Join Date: Jan 2004
Old 07-31-2005 , 16:15  
Reply With Quote #17

One last feature was added today.

This is register_native, which lets you add natives with plugins. This was based on a never-completed concept by dJeyL. I have finished+implemented it at the request of T(+)rget.

Here is how it looks:
Code:
#include <amxmodx> //I'd put these in an inc file or something <_< native mynative(str[]); native mynative2(str[]); public plugin_init() {     register_plugin("test", "1.0", "BAILOPAN")     register_srvcmd("test", "test")     register_srvcmd("test2", "test2") } //This is called before anything else, only these will work here. public plugin_natives() {     //Bail's method     register_native("mynative", "mynative_impl")     //dJeyL's method     register_native("mynative2", "mynative2_impl", 1) } public mynative2_impl(str[]) {     param_convert(1)     new num = str_to_num(str)     copy(str, 3, "XXX")     return num } public mynative_impl(id, numparams) {     if (numparams != 1)         return log_error(10, "Bad native parameters")     new localstr[256]     get_string(1, localstr, 255)     set_string(1, "XXX", 3)     return str_to_num(localstr) } public test() {     new str[10] = "123"     server_print("Result of my native: %d", mynative(str))     server_print("Modified: %s", str) } public test2() {     new str[10] = "123"     server_print("Result of my native2: %d", mynative2(str))     server_print("Modified: %s", str) }

This is very powerful, as it eliminates callfunc. You can now dynamically add natives to scripts!
__________________
egg
BAILOPAN is offline
nightscreem
Veteran Member
Join Date: Jul 2004
Location: Belgium
Old 07-31-2005 , 16:18  
Reply With Quote #18

k cool thx bailopan
and don't forget to change the doc if this is finished so we can view it in the scripting doc
and i'm not a pro scripter and i don't get it because i never understanded the strings
__________________
- Bye bye!
nightscreem is offline
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 08-01-2005 , 19:11  
Reply With Quote #19

Great. Another method to add to Xeno Core. Thanks
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
BAILOPAN
Join Date: Jan 2004
Old 08-02-2005 , 20:41  
Reply With Quote #20

This took a lot of work to implement and I had models like yours, Twilight, in mind while doing it. You'd be better off removing callfunc stuff with this, it greatly simplifies things.

I've also given the code back to the AMX Mod guys, because they plan to use it, so it'll be compatible.
__________________
egg
BAILOPAN 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 22:15.


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