Raised This Month: $ Target: $400
 0% 

Need help with (get/set)_pdata_string


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-09-2012 , 00:56   Re: Need help with (get/set)_pdata_string
Reply With Quote #1

You solved my problem with
Code:
224
{
	(1<<0) m_bChangeNameAtRespawn
	( 1<<1) m_szNewName[]
}
Real offset are in reality 896 and 897 but i didn't think we could directly pass them, could you explain it please, i don't understand well russian

Test plugin :
PHP Code:
#include <amxmodx>
#include <fakemeta>

#define VERSION "0.0.1"
#define PLUGIN ""

const XO_PLAYER 5
const m_bChangeNameAtRespawn 224
const m_szNewName 224*1

public plugin_init()
{
    
register_plugin(PLUGINVERSION"ConnorMcLeod")
    
register_clcmd("drop""drop")
}

public 
drop(id)
{
    if( 
get_pdata_int(idm_bChangeNameAtRespawnXO_PLAYER) & (1<<0) )
    {
        new 
szNewName[32]
        
get_pdata_string(idm_szNewNameszNewNamecharsmax(szNewName), 0XO_PLAYER)
        
client_print(idprint_chat"New Name gonna be : %s"szNewName)
    }


Edit : Haven't tested on linux but i believe you have to do *4 with extra offset as well
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 01-09-2012 at 02:13.
ConnorMcLeod 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 03:28.


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