Raised This Month: $ Target: $400
 0% 

[HELP] Coding


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
happy_2012
Senior Member
Join Date: Aug 2012
Old 09-26-2012 , 17:03   [HELP] Coding
Reply With Quote #1

[B]Hello ,[/B]
[B]I am trying to make a plugin which I can make advertisments in 'HUDMESSAGES'[/B]

[B]I did it but what I want to do is , link the '.sma' file to a '.ini' file so I can edit the messages which I want the advertisor show as 'HUDMESSAGE'[/B]

[B]My code :[/B]
Code:
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "Hudmessage"
#define VERSION "1.0"
#define AUTHOR "happy"
 
public plugin_init() {
 register_plugin(Hudmessage, 1.0, happy)
 
 set_hudmessage(0, 255, 0, -1.0, -1.0)
 show_hudmessage(id, "Welcome to ZE BaseBuilder Server")
 
 
}

Last edited by YamiKaitou; 09-26-2012 at 19:27.
happy_2012 is offline
quark
Veteran Member
Join Date: Oct 2011
Location: Your mind.
Old 09-26-2012 , 17:14   Re: [HELP] Coding
Reply With Quote #2

amxx default have it. You can change it on amxx.cfg.
__________________

Check out My Plugins:
qServerInfo ; ASKTAG
quark is offline
happy_2012
Senior Member
Join Date: Aug 2012
Old 09-26-2012 , 17:15   Re: [HELP] Coding
Reply With Quote #3

[B]And how can make it this way ?[/B]
[B]the code is two lines xD[/B]

Last edited by YamiKaitou; 09-26-2012 at 19:27.
happy_2012 is offline
avril-lavigne
Banned
Join Date: Apr 2009
Old 09-26-2012 , 17:16   Re: [HELP] Coding
Reply With Quote #4

new s_File[128];
get_configsdir(s_File,127);
format(s_File,127,"%s/hudmessages.ini",s_File);

use fopen / read_file

why not just use imessage from amxx default package ?
use amx_task plugin and make new messages every few secs
__________________
VDS in Europe 1 gb/s unmetered.Any configurations.
I accept Paypal, Moneybookers,etc

Last edited by avril-lavigne; 09-26-2012 at 17:17.
avril-lavigne is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 09-26-2012 , 17:18   Re: [HELP] Coding
Reply With Quote #5

http://forums.alliedmods.net/showthread.php?p=162423 or just use the amxx built in advertisement messages

if you want to make the plugin yourself, you should start learning the basics of scripting
jimaway is offline
Old 09-26-2012, 17:21
quark
This message has been deleted by quark. Reason: up
happy_2012
Senior Member
Join Date: Aug 2012
Old 09-26-2012 , 17:23   Re: [HELP] Coding
Reply With Quote #6

[B]Amx tasks -> just show the server name and other things which I don't want[/B]

[B]I want to make my own plugin so I can learn to code a better plugins sooner[/B]

[B]I want to know how to link it to .ini configuration file to edit my messages to show in the server as hud messages...[/B]

Last edited by YamiKaitou; 09-26-2012 at 19:27.
happy_2012 is offline
quark
Veteran Member
Join Date: Oct 2011
Location: Your mind.
Old 09-26-2012 , 17:49   Re: [HELP] Coding
Reply With Quote #7

Quote:
Originally Posted by avril-lavigne View Post
new s_File[128];
get_configsdir(s_File,127);
format(s_File,127,"%s/hudmessages.ini",s_File);

use fopen / read_file
and you dont need to write in bold.
__________________

Check out My Plugins:
qServerInfo ; ASKTAG
quark is offline
happy_2012
Senior Member
Join Date: Aug 2012
Old 09-26-2012 , 17:53   Re: [HELP] Coding
Reply With Quote #8

[B]Why can't I use 'bold' to type a message :P ?[/B]

[B]I can just type my message in blabla.ini if I added this ? and it will show up as HUDMESSAGE ?[/B]

Last edited by YamiKaitou; 09-26-2012 at 19:27.
happy_2012 is offline
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 09-26-2012 , 17:57   Re: [HELP] Coding
Reply With Quote #9

Quote:
Originally Posted by happy_2012 View Post
[B]Why can't I use 'bold' to type a message :P ?[/B]

[B]I can just type my message in blabla.ini if I added this ? and it will show up as HUDMESSAGE ?[/B]
my god....
1. bold is annoying to read. I feel like you're yelling at me
2. yes, you can pull text from a file and it will print itself as a hud message. Just like EVERY programming language EVER. Things just happen FOR you.
3. Dude, this is not so basic, but you're still missing the fundamentals of scripting. Read tuts, wikis, and documentation of pawn/small/AMXX THEN come back and ask specific, well thought out, and exemplified questions. Otherwise your help you will get from here will be about as sarcastic as mine.
__________________
What an elegant solution to a problem that doesn't need solving....

Last edited by YamiKaitou; 09-26-2012 at 19:27.
Liverwiz is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 09-26-2012 , 19:29   Re: [HELP] Coding
Reply With Quote #10

Quote:
Originally Posted by happy_2012 View Post
[B]Why can't I use 'bold' to type a message :P ?[/B]
Because it is in violation of the rules. I also go back and add [noparse] tags to posts that make unneeded alterations to the font style.
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou 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 08:17.


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