AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   scriptig problem (https://forums.alliedmods.net/showthread.php?t=82798)

rika 12-30-2008 04:31

scriptig problem
 
my problem is that i don"know how to create codes for sma smx or modify pluginsto suite my desire so i've seen on a server and i want to know how it is done .how can i make say commands usually made by statsme like /top10that show's modt with top10 and make more of this commands.is it a statsme scripting modification or a plugin.

SnoW 12-30-2008 05:21

Re: scriptig problem
 
Code:

#include <amxmodx>
public plugin_init()
register_clcmd("/maps", "Function");
 
public Function(id)
show_motd(id, "maps.txt", "Maps");

The place where that goes straigth is Dedicated server/Cstrike folder. If you want the file to other place, like from already existing file like maps.ini or from mapcyckle.txt, all you have to do is make there the url from Cstrike.
If you want first read some values (like kills from cstats)and then make your own motd (like top10) with format(...) ofc it's possible too.
Just say if you don't get something, did I explain badly last time? :)

rika 12-30-2008 12:04

Re: scriptig problem
 
i'm a litlle stupid so correct me .you want me to make a file with your script in servers /cstrike folder but were do i put the modt's htlm

Dr.G 12-30-2008 12:20

Re: scriptig problem
 
in the the mod folder (cstrike) and dont make it call a .html file. Just a .txt file with at html code inside...

SnoW 12-30-2008 13:10

Re: scriptig problem
 
Quote:

Originally Posted by Dr.G (Post 735572)
in the the mod folder (cstrike) and dont make it call a .html file. Just a .txt file with at html code inside...

The file can be HTML or HTM file just fine. It supports them too.
Quote:

i'm a litlle stupid so correct me .you want me to make a file with your script in servers /cstrike folder but were do i put the modt's htlm
That text I did what you called "my script" is a plugin, you can compile it with web compiler or with your own, then you have to place it to your plugins, and write the name to plugins.ini. Your text that you wanna be showed in the motd, you can place to HTML file. There you can make html or then just make txt file with normal text. It gets the files from cstrike folder, but if you want read a file from other place you can replace the name with url, cstrike/other folder/mytext.HTML. What I meant also, was that if you want to read maps from mapcyckle.txt it's possible too. So you don't need to make own file. If you want to make your own text in the sma, just say I can show it too.
Hope this helps a little bit.

rika 12-30-2008 16:21

Re: scriptig problem
 
the plugin works

unknown unknown unknown mapcycle.amxx runnin

but perhaps i've missplaced the file that had to be shown because when i type the say command /maps nothig hapenns .forget this what did you mean by "If you want to make your own text in the sma, just say I can show it too. ":cry:

SnoW 12-30-2008 16:34

Re: scriptig problem
 
I meant that if you want to show some kind of top by killers or anything else, it can't be done with file(The information isn't in any file). So you should make the text with format(after reading the information) and then show the motd you created.

Anyway, it isn't working? Are you sure you have the file in Cstrike folder, or with url? If you made your own plugin, you can always post it here, so we can check it if it's right.

rika 01-01-2009 05:02

Re: scriptig problem
 
happy new year Snow the plugin work's just fine the problem was with the registered command so watch :
#include <amxmodx>
public plugin_init()
register_clcmd("say /maps", "Function");
public Function(id)
show_motd(id, "master", "Mapcycle");
the plugin work's with txt and url but it doesn't work with html
anyway it does what i expected from it . and many thanks

Now another problem how do i make it run multiple of this commands so i don't have to do to many of this pugin and how do i make the txt a sma because now it's work's just with a web compiler not with the one from scripts

SnoW 01-01-2009 06:50

Re: scriptig problem
 
Nice that it works.
Quote:

Now another problem how do i make it run multiple of this commands so i don't have to do to many of this pugin
Just register many commands and make many functions.
Quote:

and how do i make the txt a sma
Just copy it to notepad, and save as sma. You can also change any txt file's name to sma and it works too.
Quote:

because now it's work's just with a web compiler not with the one from scripts
I don't really get that "work with one from scripts"? The plugin should compile with web compilers and local compilers.


All times are GMT -4. The time now is 09:05.

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