Q:How to run commands from one plugin out of another plugin?
I'm runing the BlattMonster- and the Anticamping-Plugin and instead of slaping the user/player, like in "case 1", I'd like to spawn a monster on the camper, like bbmonster_spawn <monster> <player>, from the BlattMonster-Plugin!!!
How to do??? Any suggestions??? Code:
|
Execute the command on the server(servercmd(cmd[]), I think)
|
well ice you need to specify what to execute too.
|
okay, the command is
Code:
server_cmd("bbmonster_spawn agrunt RedBaron") green = plugincommand blue = monstername red = playername but now I'd like to know, how I get the playername, who is realy camping??? I know there is this cmd Code:
I'm to tiered immo to find out! Its 06:15am here in Germany and I'll try later again to solve my problem, but I'd be glad, if someone could help me out in the meanwhile! :wink: 8) Goodnight all and thx for ur help!!! |
Code:
|
thx Ice,
it now works pretty well for me, but it must be Code:
Code:
mucho thx |
There is no need to format the cammand as the newer versions of amx and amxmodx have built in format:
native server_cmd(const command[],{Float,_}:...); Which makes the code redundant and bloated. As for: Quote:
Cheers! and Luck! |
huh, Zor??? :shock:
This works just fine for me!!! :up: :mrgreen: Code:
|
Zor, call me old fashoned, then, but way back when thats how we did it!
|
No matter, thats just bloat but if it works good to go...didn't know you had solved it. And IceMouse[WrG], soakay we all begin somewhere! :wink: Anyway its because ppl wanted this ability without having to format a string that the code went this way, but as I say, its just easier now.
Cheers! |
If you want to run functions residing in other plugins:
Code:
|
It would be nice to note that (I'm pretty sure) you must push the values BEFORE calling the function
|
Jonny u forgot
Code:
|
Alright.. Then you push the vars inbetween callfunc_begin() and callfunc_end()
|
Okay guys,
so, how would the code look like with bbmonster_spawn agrunt RedBaron green = plugincommand blue = monstername red = playername but the monster- and playername should be variable!?!?!? P.S.: If someone wants to see how the "advanced" AntiCampingplugin works, just give me a PM!!! :wink: 8) |
Well since Zor is so picky:
Code:
|
| All times are GMT -4. The time now is 07:03. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.