Raised This Month: $51 Target: $400
 12% 

Some help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ady20
Member
Join Date: Sep 2012
Old 09-27-2012 , 11:57   Some help
Reply With Quote #1

Here is my script
Quote:
#include <amxmodx>
#include <amxmisc>

#define ADVERTISING_TIME 10.0


stock const messages[][] = {
"* Daca vreti sa fiti unul din ADMINI uitati-va la preturile rangurilor tastand /preturi",
"* Ai citit regulile? Daca nu tasteaza /reguli in chat",
"* Nu stii cum se joaca? Tasteaza /help in chat"
}

public plugin_init() {
register_plugin("Preturi Ranguri (motd)","1.1","Ady20")
register_clcmd ("say /preturi" , "preturi" , -1);
register_clcmd ("say_team /preturi" , "preturi" , -1);
register_clcmd ("say /reguli" , "reguli" , -1);
register_clcmd ("say_team /reguli" , "reguli" , -1);
register_clcmd ("say /help" , "help" , -1);
register_clcmd ("say_team /help" , "help" , -1);
set_task(ADVERTISING_TIME, "show_messages", _, _, _,"b");
}

public preturi(id) show_motd(id,"/addons/amxmodx/configs/preturi.html")

public reguli(id) show_motd(id,"/addons/amxmodx/configs/reguli.html")

public help(id) show_motd(id,"/addons/amxmodx/configs/help.html")

public show_messages()
{
new Buffer[256];
formatex(Buffer, sizeof Buffer - 1, "^x02%s", messages[random(sizeof messages)]);

new players[32], num, id;
get_players(players, num);

for(new i = 0 ; i < num ; i++)
{
id = players[i]

message_begin(MSG_ONE, get_user_msgid("SayText"), _, id);
write_byte(id);
write_string(Buffer);
message_end();
}
}
When I type /help help window appears
When I type /reguli the windows with the rules appear
When I type /preturi the windows with admin prices should appear....But it won't. All that appears is a white motd saying "preturi.txt" the name of the file

Why is that 1 not working and the other 2 yes?
Thank you in advance...
Ady20 is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 09-27-2012 , 12:11   Re: Some help
Reply With Quote #2

file extension it's .html?
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
Ady20
Member
Join Date: Sep 2012
Old 09-27-2012 , 12:20   Re: Some help
Reply With Quote #3

Yes html for all of them... That the strange part
Ady20 is offline
Ady20
Member
Join Date: Sep 2012
Old 09-27-2012 , 15:10   Re: Some help
Reply With Quote #4

I guess the problem is with the cvars. I have no idea how to add them in amxx.cfg

cmd_who 2
who_typemeniu 1

....
Ady20 is offline
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 09-27-2012 , 22:12   Re: Some help
Reply With Quote #5

Quote:
Originally Posted by Ady20 View Post
I guess the problem is with the cvars. I have no idea how to add them in amxx.cfg

cmd_who 2
who_typemeniu 1

....
you just put the CVARs at the end of amxx.cfg
much like what you have there. But it doesn't look like you have any CVARs registered in your plugin....
__________________
What an elegant solution to a problem that doesn't need solving....
Liverwiz is offline
Reply



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 06:48.


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