green chat/days menu/admin tag help!
hey,
1- i would like to know how can i execute admin commands using a plugin eg : lets say that i want to make new command called amx_Shark this command will excute two other commands amx_gravity 100 amx_noclip @ct any thoughts how can i do such thing ? any help will be appreciated 2- i would like to know how can i add a simple tag before the user with flag that i choose lets say flag b if the user had it i want to add [admin] tag before his name any thoughts how can i do that? 3- making a menu just like the guns menu in jailbreak but i want to change the functions like if you choose 1 the gravity will be changed and stuff like that that is it i guess :) regards, |
Re: Scripting Help
1. server_cmd(const szCommand[], any . . .)
2. You'll have to catch each say, grab what they said, then add it to a string of what you want it to say and print it through a "SayText" message or client_print(0, print_chat, szMessage) 3. http://forums.alliedmods.net/showthread.php?t=46364 good tut on menus. |
Re: Scripting Help
Quote:
i can't understand what to do with the first,second answers i'm new to amxmodx scripting :) if it is possible can you explain more ? , the third answer worked perfectly |
Re: Scripting Help
server_cmd is a function in amxmdx.inc
const szCommand[] is the main parameter (its the command you want to execute inputted as a string) , any . . . means you're able to put in variables to the previous string. for example..... Code:
server_cmd("amx_gravity %d", iGravityToSet)PHP Code:
I wrote a plugin that does soemthing of this nature (plus lots of other crap) its called Private Message. You'll find it in new plugin submissions. It'll give you an example of grabbing text, minipulating it, and printing it using SayText messages |
Re: Scripting Help
Quote:
can you make a simple menu for me ? if yes then 1- change gravity to 30 and slap the username who executed it 2- change gravity to 70 and noclip @ct players it will be appreciated , i need this menu to learn from it how you did it , etc.. i will change the functions later and about the chat plugin can you tell me how can i connect it to a flag like if i had flag x then i can have the [admin] tag before my name |
Re: Scripting Help
Quote:
|
Re: Scripting Help
go to the request section. I gave you one plugin already....and i'm lazy tonight.
Or just go reading codes that are already written. Pleanty of examples out there. Also look around the tuts and code snippets section. Lots of good stuff there too. |
Re: Scripting Help
Quote:
Quote:
can you provide links ? |
Re: Scripting Help
|
Re: Scripting Help
Quote:
|
| All times are GMT -4. The time now is 05:42. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.