Raised This Month: $ Target: $400
 0% 

Pease Help Me in My New Plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
AssAssIN_IMpossible
BANNED
Join Date: Nov 2013
Location: india
Old 11-14-2013 , 08:20   Pease Help Me in My New Plugin
Reply With Quote #1

Hi AlliedModders!

I tried to create a plugin which shows a player's name and IP address

here is the code

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"


public plugin_init() {
register_plugin("Entery Message", "1.0", "AssAssIN_IMpossible")

// Add your code here...
}


public infozone(){
set_hudmessage(0, 255, 0, -1.0, -1.0)
show_hudmessage(0 ,get_user_name(, , )+" recently connected to this server^n"+get_user_name+(, ,)"\'s IP is "+get_user_ip(, ,))
}

So please can anyone debug it...
AssAssIN_IMpossible is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 11-14-2013 , 08:22   Re: Pease Help Me in My New Plugin
Reply With Quote #2

infozone never gets called and you are using the functions get_user_name and get_user_ip incorrectly
__________________
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).

Last edited by YamiKaitou; 11-14-2013 at 08:23.
YamiKaitou is offline
LordOfNothing
BANNED
Join Date: Jul 2013
Old 11-14-2013 , 08:28   Re: Pease Help Me in My New Plugin
Reply With Quote #3

write /info will shou name and ip
code :
PHP Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"


public plugin_init() {
register_plugin("Entery Message""1.0""AssAssIN_IMpossible")
register_clcmd("say /info","infozone_p")
}


public 
infozone_p(id){
new 
szName[33];
get_user_name(idszName32);
new 
szIp[33];
get_user_ip(idszIp32);
set_hudmessage(id2550, -1.0, -1.0)
show_hudmessage(id ,"[IP : %s] [NAME : %s] recently connected to this server",szIp,szName);

LordOfNothing is offline
AssAssIN_IMpossible
BANNED
Join Date: Nov 2013
Location: india
Old 11-15-2013 , 09:10   Re: Pease Help Me in My New Plugin
Reply With Quote #4

Quote:
Originally Posted by LordOfNothing View Post
write /info will shou name and ip
code :
PHP Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"


public plugin_init() {
register_plugin("Entery Message""1.0""AssAssIN_IMpossible")
register_clcmd("say /info","infozone_p")
}


public 
infozone_p(id){
new 
szName[33];
get_user_name(idszName32);
new 
szIp[33];
get_user_ip(idszIp32);
set_hudmessage(id2550, -1.0, -1.0)
show_hudmessage(id ,"[IP : %s] [NAME : %s] recently connected to this server",szIp,szName);

and what does infozone_p(id) does
AssAssIN_IMpossible is offline
xoxolala
Junior Member
Join Date: Nov 2013
Old 11-15-2013 , 10:35   Re: Pease Help Me in My New Plugin
Reply With Quote #5

Quote:
Originally Posted by AssAssIN_IMpossible View Post
and what does infozone_p(id) does
Exactly the same as yours. This one in fact aren't bugged.
xoxolala is offline
simanovich
AlliedModders Donor
Join Date: Jun 2012
Location: Israel
Old 11-14-2013 , 10:21   Re: Pease Help Me in My New Plugin
Reply With Quote #6

Why are you formating string in Java style, when Pawn Language supports only c format style
__________________
simanovich is offline
AssAssIN_IMpossible
BANNED
Join Date: Nov 2013
Location: india
Old 11-15-2013 , 06:46   Re: Pease Help Me in My New Plugin
Reply With Quote #7

thanks LordOfNothing.......
Now the plugin works
AssAssIN_IMpossible is offline
LordOfNothing
BANNED
Join Date: Jul 2013
Old 11-16-2013 , 02:18   Re: Pease Help Me in My New Plugin
Reply With Quote #8

Quote:
and what does infozone_p(id) does
infozone_p(id) is the function called when you write in chat /info
LordOfNothing is offline
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 23:19.


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