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

Change string in compiled plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mabaclu
Senior Member
Join Date: Jun 2010
Location: Portugal
Old 05-11-2011 , 10:13   Change string in compiled plugin
Reply With Quote #1

Hello,
I've got a plugin that changes players models but I haven't got the source code of it. I can't use other plugins because clients get kicked with the error "Reliable channel overflowed" even if I increase the delay between round start and model change.
Basically I need to change the strings that contain the models name for T and CT. I've already used an AMXX Decompiler to see the code but I don't know how to edit it. Can you help me?
I hope this is in the right section.
__________________
mabaclu is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-11-2011 , 10:15   Re: Change string in compiled plugin
Reply With Quote #2

Use this plugin : http://forums.alliedmods.net/showthread.php?p=958925
__________________
Arkshine is offline
Old 05-11-2011, 10:26
mabaclu
This message has been deleted by mabaclu.
mabaclu
Senior Member
Join Date: Jun 2010
Location: Portugal
Old 05-11-2011 , 18:21   Re: Change string in compiled plugin
Reply With Quote #3

Hm... I tried with a similar one that seemed to have more features but that one is working properly. Thanks.
__________________
mabaclu is offline
capozblack
Member
Join Date: Mar 2011
Location: Portugal
Old 05-14-2011 , 09:45   Re: Change string in compiled plugin
Reply With Quote #4

I created a plugin that changes the players to cts / trs but it is not always the same makes a random models.

Could be useful for you

#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>

#define PLUGIN "Model Random"
#define VERSION "0.1"
#define AUTHOR "Capoz"

new const TrModel[][] = { "tr7", "tr5", "tr4" }
new const CtModel[][] = { "ct3", "ct1", "ct2" }

public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)

RegisterHam( Ham_Spawn, "player", "PlayerSpawn_Post", 1 )
register_forward( FM_SetClientKeyValue, "fw_SetClientKeyValue" )
}

public plugin_precache() {
new TrPrecache[ 64 ], CtPrecache[ 64 ]

for( new i; i < sizeof( TrModel ); i++ ) {
format( TrPrecache, 63, "models/player/%s/%s.mdl", TrModel[ i ], TrModel[ i ] )
precache_model( TrPrecache );
}

for( new i; i < sizeof( CtModel ); i++ ) {
format( CtPrecache, 63, "models/player/%s/%s.mdl", CtModel[ i ], CtModel[ i ] )
precache_model( CtPrecache );
}
}

public fw_SetClientKeyValue( id, const infobuffer[], const key[] ) {
if( equal( key, "model" ) )
return FMRES_SUPERCEDE

return FMRES_IGNORED
}

public PlayerSpawn_Post( id ) {
if( !is_user_connected( id ) | !is_user_alive( id ) )
return HAM_IGNORED

switch( get_user_team( id ) ) {
case 1: set_user_info( id, "model", TrModel[ random( sizeof( TrModel )-1 ) ] )
case 2: set_user_info( id, "model", CtModel[ random( sizeof( CtModel )-1 ) ] )
}
return HAM_IGNORED
}
__________________
capozblack is offline
Send a message via MSN to capozblack
mabaclu
Senior Member
Join Date: Jun 2010
Location: Portugal
Old 05-14-2011 , 10:24   Re: Change string in compiled plugin
Reply With Quote #5

Thanks, but the problem seems solved for now.
__________________
mabaclu 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 01:21.


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