Raised This Month: $ Target: $400
 0% 

Native help


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 05-01-2018 , 17:20   Native help
Reply With Quote #1

I'm trying to test some stuff but it doesn't work.

get_user_level(id) simply returns 0 while i set iLevel[33] = 5 in the main plugin. what's wrong?

my include file is called level_test.inc

Code:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #define PLUGIN "Native Test" #define VERSION "1.0" #define AUTHOR "author" new iLevel[33] = 5 public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     } public plugin_natives() {     register_library("level_test")         register_native("get_user_level", "_get_user_level") } public _get_user_level(iPlugin, iParams) {     if(iParams != 1) {         return PLUGIN_CONTINUE     }         new id = get_param(1)         if(!id) {         return PLUGIN_CONTINUE     }         return iLevel[id] }

Code:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #include <level_test> #define PLUGIN "Test Plugin" #define VERSION "1.0" #define AUTHOR "author" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)         register_clcmd("say /test", "Test") } public Test(id) {     client_print(id, print_chat, "level: %d", get_user_level(id)) }

Code:
#pragma reqlib "level_test" native get_user_level(id)
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
 



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 04:43.


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