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

More help learning


Post New Thread Reply   
 
Thread Tools Display Modes
Peli
Veteran Member
Join Date: Mar 2004
Location: San Diego, CA
Old 03-21-2004 , 03:17  
Reply With Quote #41

Okay thanks I understand now.
Peli is offline
Send a message via MSN to Peli
Peli
Veteran Member
Join Date: Mar 2004
Location: San Diego, CA
Old 03-21-2004 , 03:42  
Reply With Quote #42

Okay , I made a plugin that displays a help message , it doesn't have much information because it is just a test , I made it for practice as Toxic said , can you guys check it.
Code:
/* Code help from Toxic. Commands : say serverhelp*/ #include <amxmodx> #include <amxmisc> public plugin_init(){   register_plugin("serverhelp", "0.1", "Peli")   register_concmd("say serverhelp", "amx_serverhelp",ADMIN_KICK,"- Displays a server help message")    } public serverhelp(id, level, cid){   set_hudmessage(0, 255, 0, -1.0, 0.3, 0, 1.0, 5.0, 0.1, 0.2, 5)   show_hudmessage(0,"Hello , welcome to my server.") }
Peli is offline
Send a message via MSN to Peli
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 03-21-2004 , 06:48  
Reply With Quote #43

Quote:
Originally Posted by IceMouse[WrG
]That is far too complex for him...
Code:
new target[50]; read_argv(1,target,50);
should be

Code:
new target[50] read_argv(1, target, 49)
Johnny got his gun is offline
[RED-Designs]
Senior Member
Join Date: Mar 2004
Location: .us
Old 03-21-2004 , 06:57  
Reply With Quote #44

Quote:
Originally Posted by Peli
Okay , I made a plugin that displays a help message , it doesn't have much information because it is just a test , I made it for practice as Toxic said , can you guys check it.
Code:
/* Code help from Toxic. Commands : say serverhelp*/ #include <amxmodx> #include <amxmisc> public plugin_init(){   register_plugin("serverhelp", "0.1", "Peli")   register_concmd("say serverhelp", "amx_serverhelp",ADMIN_KICK,"- Displays a server help message")    } public serverhelp(id, level, cid){   set_hudmessage(0, 255, 0, -1.0, 0.3, 0, 1.0, 5.0, 0.1, 0.2, 5)   show_hudmessage(0,"Hello , welcome to my server.") }
"amx_serverhelp" doesnt exist. Change "amx_serverhelp" to "serverhelp" for it to work.
__________________
.My personal Blog
."If the country were open on its borders, new
forms would certainly immigrate, and this also
would seriously disturb the relations of some
of the former inhabitants." - Charles Darwin
[RED-Designs] is offline
Send a message via AIM to [RED-Designs] Send a message via MSN to [RED-Designs] Send a message via Yahoo to [RED-Designs]
IceMouse[WrG]
Senior Member
Join Date: Mar 2004
Old 03-21-2004 , 12:21  
Reply With Quote #45

I've never worried about string size because I've always made them larger than they should be

Code:
public serverhelp(id, level, cid){
Becomes
Code:
public amx_serverhelp(id, level, cid){
Anyhow the as for the (id,level,cid) part... Those are variables standing for:
id: The id number of the person executing the command
level: I'm not completely sure... I think it may be the access level of the person or the level needed for the command
cid: The id of the command(Used in get_command_info() or something similar)
IceMouse[WrG] is offline
Send a message via AIM to IceMouse[WrG] Send a message via MSN to IceMouse[WrG] Send a message via Yahoo to IceMouse[WrG]
Peli
Veteran Member
Join Date: Mar 2004
Location: San Diego, CA
Old 03-21-2004 , 14:58  
Reply With Quote #46

Okay is it going to work if I change the part you told me to change Red?
Peli is offline
Send a message via MSN to Peli
MagicShot
Senior Member
Join Date: Mar 2004
Location: MN
Old 03-21-2004 , 15:56   hmm
Reply With Quote #47

Quote:
Originally Posted by Peli
Okay is it going to work if I change the part you told me to change Red?
Give it a try and see..
__________________
|v|agic$hot
.
Without a Sound
MagicShot is offline
Send a message via MSN to MagicShot Send a message via Yahoo to MagicShot
Peli
Veteran Member
Join Date: Mar 2004
Location: San Diego, CA
Old 03-21-2004 , 16:14  
Reply With Quote #48

Okay I will try it soon. Okay I am also trying to add more to the plugin , but I don't know how I should do it. Okay I want my plugin to open a window which I already did and then I want it to have 4 options giving free guns and equip. with no cost :

1.ak47/m4a1
2.glock/usp
3.kevlar vest and helm
4.flash/he/smoke

How would I make it like this , if user clicks option one then > give user ak47 or m4a1 , if user clicks option two > give user glock or usp etc. Thanks again guys.
Peli is offline
Send a message via MSN to Peli
MagicShot
Senior Member
Join Date: Mar 2004
Location: MN
Old 03-21-2004 , 18:26   hmm
Reply With Quote #49

I would suggest to finish your base and make sure that works and than grow from there...
__________________
|v|agic$hot
.
Without a Sound
MagicShot is offline
Send a message via MSN to MagicShot Send a message via Yahoo to MagicShot
knekter
Senior Member
Join Date: Mar 2004
Location: PA
Old 03-21-2004 , 18:36   Another plugin to help you out
Reply With Quote #50

Im not sure if this is to hard for you, but this would be great practice for learning for loops, and using numbers and new commands.

I want you to make a plugin that if an admin does amx_allrifles it will give everyone in the server every rifle with full ammo. Ask if you need some help
__________________
More updates for Matrix Mod!
knekter is offline
Send a message via AIM to knekter Send a message via MSN to knekter
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 02:43.


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