Converting AMX to AMXX
I was wondering if there was anyway of converting an AMX file to an AMXX file without rewriting it? If not, how do you do it?
|
a) Change any hard-coded paths that lead to the "addons/amx/" directory so that they lead to the "addons/amxmodx/" directory, and change any file names that AMX may have used that AMXx doesn't.
b) Compile. AMX scripts should compile fine with AMXx. If you REALLY want to "convert" it, then change the "#include <amxmod>" to "#include <amxmodx>" and "#include <VexdUM>" to "#include <engine>", and change all the old function names to the new ones. |
what are the new ones and old ones?
edit: also, some of the .sma's dont lead to the directory .../amx. Im a little confused. Also, to make sure im doing everything right, do i edit the .sma file or .amx file? |
I doubt you will find any that have a hard-coded path to the amx directory, that was a just-in-case thing. You will need to edit the sma files, as that is the source file. If you change amxmod to amxmodx and compile, it will might you "unknown function so-and-so" errors, in which case you change those functions to the new ones.
|
oh ok. Yeah, i got that error a couple times.
What are the new and old functions? |
Look them up in the include files....
|
im asuming these are them:
Core Fun Engine Cstrike SQL NS DoDX TFCX GeoIP Sockets Array DoDFun Fakemeta Regex Although i still have no idea what this means... I mean, it doesnt tell me what ones to replace... it just gives me the link.. Can you explain step-by-step how to convert it? |
user_spawn to spawn
get_user_money to cs_get_user_money set_user_money to cs_set_user_money numtostr to num_to_str strtonum to str_to_num Entvars_Get_Int to entity_get_int Entvars_Set_Int to entity_set_int Entvars_Get_Float to entity_get_float Entvars_Set_Float to entity_set_float Entvars_Get_Vector to entity_get_vector Entvars_Set_Vector to entity_set_vector Entvars_Get_Edict to entity_get_edict Entvars_Set_Edict to entity_set_edict Entvars_Get_String to entity_get_string Entvars_Set_String to entity_set_string Entvars_Get_Byte to entity_get_byte Entvars_Set_Byte to entity_set_byte CreateEntity to create_entity ENT_SetModel to entity_set_model ENT_SetOrigin to entity_set_origin FindEntity to find_ent_by_class RemoveEntity to remove_entity TraceLn to trace_line VecToAngles to vector_to_angle VecLength to vector_length VecDist to vector_distance MessageBlock to set_msg_block GetMessageBlock to get_msg_block HLTime to halflife_time FakeTouch to fake_touch AttachView to attach_view SetView to set_view SetSpeak to set_speak |
ok i replaced all those, now is that all i do to the .sma file?
edit: im getting this: Code:
/home/users/amxmodx/tmp/php0yzpiq.sma(345) : error 017: undefined symbol "strtonum" |
str_to_num
|
| All times are GMT -4. The time now is 19:23. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.