Raised This Month: $ Target: $400
 0% 

scriptig problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
rika
Junior Member
Join Date: Dec 2008
Old 12-30-2008 , 04:31   scriptig problem
Reply With Quote #1

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.
rika is offline
Send a message via Yahoo to rika
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 12-30-2008 , 05:21   Re: scriptig problem
Reply With Quote #2

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?

Last edited by SnoW; 12-30-2008 at 05:23.
SnoW is offline
Send a message via MSN to SnoW
rika
Junior Member
Join Date: Dec 2008
Old 12-30-2008 , 12:04   Re: scriptig problem
Reply With Quote #3

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
rika is offline
Send a message via Yahoo to rika
Dr.G
Senior Member
Join Date: Nov 2008
Old 12-30-2008 , 12:20   Re: scriptig problem
Reply With Quote #4

in the the mod folder (cstrike) and dont make it call a .html file. Just a .txt file with at html code inside...
__________________
Dr.G is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 12-30-2008 , 13:10   Re: scriptig problem
Reply With Quote #5

Quote:
Originally Posted by Dr.G View Post
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.
SnoW is offline
Send a message via MSN to SnoW
rika
Junior Member
Join Date: Dec 2008
Old 12-30-2008 , 16:21   Re: scriptig problem
Reply With Quote #6

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. "

Last edited by rika; 12-30-2008 at 16:22. Reason: inconplete
rika is offline
Send a message via Yahoo to rika
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 12-30-2008 , 16:34   Re: scriptig problem
Reply With Quote #7

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.
SnoW is offline
Send a message via MSN to SnoW
rika
Junior Member
Join Date: Dec 2008
Old 01-01-2009 , 05:02   Re: scriptig problem
Reply With Quote #8

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
rika is offline
Send a message via Yahoo to rika
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 01-01-2009 , 06:50   Re: scriptig problem
Reply With Quote #9

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.
SnoW is offline
Send a message via MSN to SnoW
Reply


Thread Tools
Display Modes

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 09:05.


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