Author
|
Message
|
Member
|
09-27-2012
, 11:57
Some help
|
#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...
|
|
|
|