Raised This Month: $ Target: $400
 0% 

Show Info on Screen


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Stephen
Senior Member
Join Date: Aug 2004
Old 04-12-2005 , 12:00   Show Info on Screen
Reply With Quote #1

Hi.

I am Making an Offset Plugin. The Plugin compiles without errors and the "Amxx Plugins" shwos my Plugin running, and i also get NO errors when i type then, get_offset.

Erm BUT ,I dunno how to display the Offsets now so i can see them on Screen.

Could anyone help me with that ?
Stephen is offline
xeroblood
BANNED
Join Date: Mar 2004
Location: Toronto, Canada
Old 04-12-2005 , 13:00  
Reply With Quote #2

What are the offset values? Ints or strings or what?

Also, posting some code would help, that way someone can just add to your existing to code for you, instead of having to write out a complete example from scratch..
xeroblood is offline
Send a message via MSN to xeroblood
Stephen
Senior Member
Join Date: Aug 2004
Old 04-12-2005 , 13:05  
Reply With Quote #3

Quote:
#include <amxmodx>
#include <fakemeta>
#include <engine>
#include <core>

new PLUGIN[]="Offset"
new AUTHOR[]="Stephenr"
new VERSION[]="0.1"

public plugin_init()
{
register_clcmd("amx_offset","get_offset")
register_plugin(PLUGIN, VERSION, AUTHOR)

return PLUGIN_CONTINUE
}

public get_offset(id)
{

get_pdata_int(id, 500)
get_pdata_int(id, 600)
get_pdata_int(id, 700)

return PLUGIN_HANDLED
}
Thx for the Reply.

here is the Code.
Also is there a way that i ont have to add every Offset Nr., instead have like everyOffset on command, like when i type offset 007 i get the offset value form that Nr.
Stephen is offline
xeroblood
BANNED
Join Date: Mar 2004
Location: Toronto, Canada
Old 04-12-2005 , 13:19  
Reply With Quote #4

First off, you dont need to include core, since amxmodx does that already..
and I added <amxmisc> for the cmd_access() function..
Oh, and the return value in plugin_init() is ignored, so you dont need it..
Edit: oooops.. you dont need engine module either..
Code:
#include <amxmodx> #include <amxmisc> #include <fakemeta> new PLUGIN[]="Offset" new AUTHOR[]="Stephenr" new VERSION[]="0.1" public plugin_init() {     register_clcmd("amx_offset","get_offset", ADMIN_LEVEL_A, "<offset>")     register_plugin(PLUGIN, VERSION, AUTHOR) } public get_offset(id, lvl, cid) {     if( !cmd_access( id, lvl, cid, 1 ) )         return PLUGIN_HANDLED     new szOffset[16]     read_argv( 1, szOffset, 15 )     new iOffset = str_to_num( szOffset )     if( iOffset > 0 )     {         new iPDataVal = get_pdata_int( id, iOffset )         client_print( id, print_chat, "Your Private Data at Offset %d is: %d", iOffset, iPDataVal )     }     return PLUGIN_HANDLED }

I hope that helps..
xeroblood is offline
Send a message via MSN to xeroblood
Stephen
Senior Member
Join Date: Aug 2004
Old 04-12-2005 , 13:26  
Reply With Quote #5

Thx.
It works.
Youre Great
Stephen 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 09:49.


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