write own inc's
hi,
idk which title i have to use. i'm writing a new jailmod and want to check if is my freeday manager running on server and if yes, give the Leader acces to use the new effects in new plugin. in freeday manager i have something like : player_is_leader[id] < do you have any ideas how can i catch the leader in new plugin? here link of plugin http://forums.alliedmods.net/showthread.php?t=117343 PS. if is there noway, i will attach a new plugin as freedaymanager to catch the leader. |
Re: get users info
Register a native in your main plugin and return the value of g_player_is_leader.
Code:
Then make an include file and add this: Code:
Then after that is done you just have to include the .inc file to your sub-plugin. Examples how to check: Code:
|
Re: get users info
awesome. ty. :D
i tough its imposs :D now i can upload more plugins :D and how is it to register a function in inc? i mean for example i have in the main plugin : public show_me_the_scores(id,test,test2) :D |
Re: get users info
sry for push or dubble post.
i tried to check it in csdm or zp inc but couldnt find anything which can help me. main plugin/test1.amxx PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
Re: get users info
Fixed my post above.
|
Re: get users info
ty :D its working but idk how to call a function.
main plugin function : player_menu(id) i want to call this function in sub plug :D so i think it's last post about this. i cant find any tuts for it or how i can make own inc :( oh && get the names of plugins which use the same inc. i want to show it in welcome menu like : main plugin = freeday manager subs = test1 subs = test2 in welcome menu : this server is using : freeday manager,test1 and test2 . something like this :D |
Re: write own inc's
[COLOR=#000000]public bool:_is_player_leader( iPlugin, iParams )
{ return g_player_is_leader[ get_param( 1 ) ]; } should be is_player_leader not _is_player_leader, and try to add this line in your inc file #pragma reqlib <library> library - your library name |
Re: get users info
Quote:
|
Re: write own inc's
ty. i tried to read the tut but...
please dont lol @ me :D main plugin : PHP Code:
PHP Code:
Dont lol @ me :( |
Re: write own inc's
Quote:
About the reqlib, that is not required unless you're running an outdated version of amxmodx. |
| All times are GMT -4. The time now is 08:46. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.