AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Can one plugin call(exec) onother one in his functions ? (https://forums.alliedmods.net/showthread.php?t=126911)

Mitev 05-15-2010 05:54

Can one plugin call(exec) onother one in his functions ?
 
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)


joropito 05-15-2010 10:05

Re: Can one plugin call(exec) onother one in his functions ?
 
Check callfunc_* functions

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

There's some tutorials about that. Just search.

Mitev 05-16-2010 11:12

Re: Can one plugin call(exec) onother one in his functions ?
 
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

joropito 05-16-2010 11:40

Re: Can one plugin call(exec) onother one in his functions ?
 
How could you think to do something like that where you don't know what you want to do?

You could try this bellow :P

http://www.e-tarocchi.com/crystalbal...ystalBall1.jpg

wrecked_ 05-16-2010 11:50

Re: Can one plugin call(exec) onother one in his functions ?
 
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" )

Mitev 05-16-2010 13:20

Re: Can one plugin call(exec) onother one in his functions ?
 
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 :) :o


All times are GMT -4. The time now is 03:39.

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