Raised This Month: $ Target: $400
 0% 

Can one plugin call(exec) onother one in his functions ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mitev
Junior Member
Join Date: Feb 2010
Old 05-15-2010 , 05:54   Can one plugin call(exec) onother one in his functions ?
Reply With Quote #1

is it possible that one function in 1 plugin to call another plugin ??
i don't have .sma file

example
Quote:
accessUser(id, name[] = "")
{
remove_user_flags(id)

new userip[32], userauthid[32], password[32], passfield[32], username[32]

get_user_ip(id, userip, 31, 1)
get_user_authid(id, userauthid, 31)
Quote:
accessUser(id, name[] = "")
{
remove_user_flags(id)

---> here to call(run) another plugin

new userip[32], userauthid[32], password[32], passfield[32], username[32]

get_user_ip(id, userip, 31, 1)
get_user_authid(id, userauthid, 31)

Last edited by Mitev; 05-15-2010 at 18:50.
Mitev is offline
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 05-15-2010 , 10:05   Re: Can one plugin call(exec) onother one in his functions ?
Reply With Quote #2

Check callfunc_* functions

http://www.amxmodx.org/funcwiki.php?...func&go=search

There's some tutorials about that. Just search.
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.
joropito is offline
Send a message via MSN to joropito
Mitev
Junior Member
Join Date: Feb 2010
Old 05-16-2010 , 11:12   Re: Can one plugin call(exec) onother one in his functions ?
Reply With Quote #3

i found only that function can call onother one from another pluign

but i don't know the name of that function.

so i want the plugin to be started(run)


the second plugin to be run in the first plugin
Mitev is offline
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 05-16-2010 , 11:40   Re: Can one plugin call(exec) onother one in his functions ?
Reply With Quote #4

How could you think to do something like that where you don't know what you want to do?

You could try this bellow

__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.
joropito is offline
Send a message via MSN to joropito
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 05-16-2010 , 11:50   Re: Can one plugin call(exec) onother one in his functions ?
Reply With Quote #5

pause()
unpause()

Use the flags "ac" when you're accessing an outside plugin. The second parameter for each of them should be the plugin name.

ex:
pause( "ac", "myplugin.amxx" )
unpause( "ac", "myplugin.amxx" )
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ is offline
Mitev
Junior Member
Join Date: Feb 2010
Old 05-16-2010 , 13:20   Re: Can one plugin call(exec) onother one in his functions ?
Reply With Quote #6

so..
one cs server .. two plugins for admins

i use admin_amxbans ---> amx admins from amxbans system.
sms-admins.amxx --> another plugin from www.amxmodxbg.org
i am from bulgaria.

both plugins read info form mysql.
each plugin use different setinfo

admin_amxbans --> setinfo _pw
sms-admins ----> setinfo _smsadmins

the problem is that , sms-admins plugin is writen with one "error"
------------------------------------
1. player connect to the server..
first admin_amxbans is started and he begin his work

first he remove all user flags form client, after that check in his database if the client hass access tho the server and grant or reject him

kick, or allow.

so.. on every connected user , their flag are removed ..


2. sms-admins plugin read from his database and give flags to the player which authenitacate them self correctly..

but.
the problem comes when sms-admin try to connect. The reserve slot is not working for that admin.

cause his flags are already removed.

and i want to exec sms-admins right after the function where user flags are removed ..

Quote:
Quote:
accessUser(id, name[] = "")
{
remove_user_flags(id)

new userip[32], userauthid[32], password[32], passfield[32], username[32]

get_user_ip(id, userip, 31, 1)
get_user_authid(id, userauthid, 31)
Quote:
accessUser(id, name[] = "")
{
remove_user_flags(id)

---> here to call(run) another plugin

new userip[32], userauthid[32], password[32], passfield[32], username[32]

get_user_ip(id, userip, 31, 1)
get_user_authid(id, userauthid, 31)
am i little more clear now

Last edited by Mitev; 05-16-2010 at 13:48.
Mitev 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 03:39.


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