Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- libcod.cpp
- ----------
- */
- class cCallOfDuty2Pro
- {
- public:
- cCallOfDuty2Pro()
- {
- ......
- #elif COD_VERSION == COD2_1_0
- .....
- #if COMPILE_UTILS == 1
- memcpy((void *)(0x0808FB4F), &connect_string, 4); // 1.0
- #endif
- .....
- #elif COD_VERSION == COD2_1_3
- .....
- #if COMPILE_UTILS == 1
- memcpy((void *)(0x08091463), &connect_string, 4); // 1.3
- #endif
- .....
- }
- }
- /*
- gsc_utils.hpp
- -------------
- */
- void gsc_utils_settestclientname();
- extern char *connect_string;
- /*
- gsc_utils.cpp
- -------------
- */
- #if COD_VERSION == COD2_1_0
- static char connect_string_st[256] = "connect \"\\cg_predictItems\\1\\cl_anonymous\\0\\color\\4\\head\\default\\model\\multi\\snaps\\20\\rate\\5000\\name\\bot%d\\protocol\\%d\"";
- char *connect_string = &connect_string_st[0];
- char connect_string_p1[] = "connect \"\\cg_predictItems\\1\\cl_anonymous\\0\\color\\4\\head\\default\\model\\multi\\snaps\\20\\rate\\5000\\name\\";
- char connect_string_p2[] = "\\protocol\\115\"";
- #elif COD_VERSION == COD2_1_3
- static char connect_string_st[256] = "connect \"\\cg_predictItems\\1\\cl_punkbuster\\0\\cl_anonymous\\0\\color\\4\\head\\default\\model\\multi\\snaps\\20\\rate\\5000\\name\\bot%d\\protocol\\%d\""
- char *connect_string = &connect_string_st[0];
- char connect_string_p1[] = "connect \"\\cg_predictItems\\1\\cl_punkbuster\\0\\cl_anonymous\\0\\color\\4\\head\\default\\model\\multi\\snaps\\20\\rate\\5000\\name\\";
- char connect_string_p2[] = "\\protocol\\117\"";
- #endif
- void gsc_utils_settestclientname()
- {
- char *name;
- if ( ! stackGetParams("s", &name))
- {
- stackError("gsc_utils_setbotname() argument is undefined or has a wrong type");
- stackPushUndefined();
- return;
- }
- strcpy(connect_string, connect_string_p1);
- strcat(connect_string, name);
- strcat(connect_string, connect_string_p2);
- }
Add Comment
Please, Sign In to add comment